{ "opencollection": "1.0.0", "info": { "name": "Coveo Activity Activities Search V2 API", "version": "1.0.0" }, "request": { "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "items": [ { "info": { "name": "Search V2", "type": "folder" }, "items": [ { "info": { "name": "Send Search Request", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2", "params": [ { "name": "q", "value": "", "type": "query", "description": "The basic query expression, typically the keywords entered by the end user in a query box.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `queryText` field of that event should be set to the `q` value of the corresponding query.\n" }, { "name": "aq", "value": "", "type": "query", "description": "The advanced query expression, typically generated by code (e.g., when toggling facet values).\n\n**Note:** When logging a **Search** usage analytics event for a query, the `advancedQuery` field of that event should be set to the `aq` value of the corresponding query (for reporting purposes).\n" }, { "name": "cq", "value": "", "type": "query", "description": "The constant query expression, typically populated with expressions that must apply to all queries sent from a specific search interface (e.g., from a specific tab). Once evaluated, the result sets of those expressions are kept in a special cache.\n\n**Tip:** Avoid including dynamic content in the constant query expression. Otherwise you risk filling up the cache with useless data, which can have a negative impact on performance.\n\n**Notes:**\n\n- Other parts of the query expression can also benefit from the index cache (see the `maximumAge` parameter). However, using the constant query expression allows you to explicitly cache specific result sets.\n- Temporal keywords (`now`, `today`, `yesterday`) in the constant query expression are only re-evaluated once per 3-4 minutes; therefore, you should avoid basing `cq` expressions on temporal keywords if you require split second accuracy.\n" }, { "name": "dq", "value": "", "type": "query", "description": "The disjunction query expression, typically populated by Coveo ML automatic relevance tuning models to ensure that relevant items are included in the query results. The disjunction query expression is merged with the other parts of the query expression using an `OR` operator. The resulting query expression is `(((q aq) OR (dq)) cq)`.\n" }, { "name": "lq", "value": "", "type": "query", "description": "The large query expression, typically populated with a case description, long textual query, or any other form of text that can help refine a query. The Coveo ML Intelligent Term Detection (ITD) feature can extract relevant keywords from the large query expression and inject those keywords in the basic query expression (see the `q` parameter).\n" }, { "name": "enableDidYouMean", "value": "", "type": "query", "description": "Whether to enable the _Did You Mean_ feature of the index, which populates the `queryCorrections` property of a successful response with keyword correction suggestions.\n\n**Notes:**\n\n- The Did You Mean feature only processes the basic query expression (see the `q` parameter).\n- When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array.\n- The Did You Mean feature will return no corrections when the query is processed by an automatic relevance tuning (ART) model whose Intelligent Term Detection (ITD) feature is enabled.\n\n**Default:** `false`\n" }, { "name": "mlDidYouMeanMaxCandidates", "value": "", "type": "query", "description": "The maximum number of Coveo ML Did You Mean candidates to request from the query suggestions model.\n\n**Default:** `3`\n" }, { "name": "mlDidYouMeanMinScore", "value": "", "type": "query", "description": "The minimum score a query suggestion may have to be allowed as a candidate for the Coveo ML query suggestions Did You Mean feature. For best results, value should typically be in range [`0.8`, `2`].\n\n**Default:** `1.0`\n" }, { "name": "mlDidYouMeanUseFacetCount", "value": "", "type": "query", "description": "Whether to use facet counts for the Coveo ML Did You Mean feature. Can improve results, but requires more processing.\n\n**Default:** `false`\n" }, { "name": "enableMLDidYouMean", "value": "", "type": "query", "description": "**Important:** This feature is still in an experimental state.\n\nWhether to enable the Coveo ML query suggestions _Did You Mean_ feature, which populates the `queryCorrections` property of a successful response with keyword correction suggestions.\n\n**Notes:**\n\n- The Coveo ML query suggestions Did You Mean feature only processes the basic query expression (see the `q` parameter).\n- When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array.\n\n**Default:** `false`\n" }, { "name": "partialMatch", "value": "", "type": "query", "description": "Whether to convert a basic expression containing at least `partialMatchKeywords` to a _partial match expression_, so that any item containing at least `partialMatchThreshold` of those keywords will match the expression.\n\nIf you do not set this parameter to `true`, an item must contain all of the basic expression keywords to match the expression.\n\n**Notes:**\n\n- This feature only applies to the basic expression (`q`) of a query, and to the basic `queryOverride` of its Group By operations.\n- When the `enableQuerySyntax` parameter is set to `true`, this feature has no effect on a basic expression containing advanced Coveo Cloud query syntax (field expressions, operators, etc.).\n\n**Default:** `false`\n" }, { "name": "partialMatchKeywords", "value": "", "type": "query", "description": "The minimum number of keywords that need to be present in a basic expression to convert it to a partial match expression.\n\n**Notes:**\n\n- This parameter has no meaning unless the `partialMatch` parameter is set to `true`.\n- Repeated keywords in a basic expression count as a single keyword.\n- Thesaurus expansions in a basic expression count towards the `partialMatchKeywords` count.\n- Stemming expansions **do not** count towards the `partialMatchKeywords` count.\n\nSee also the `partialMatchThreshold` parameter.\n\n**Default:** `5`\n" }, { "name": "partialMatchThreshold", "value": "", "type": "query", "description": "An absolute or relative value indicating the minimum number (rounded up) of partial match expression keywords an item must contain to match the expression.\n\nIf specified, the `partialMatchThreshold` value must either be:\n\n- a 32-bits unsigned integer (e.g., `3`),\n- a percentage value between 0% and 100% (e.g., `75%`),\n- the empty string, or\n- the `all` string.\n\nThe `\"\"` and the `all` value are both equivalent to `100%`.\n\n**Notes:**\n\n- This parameter has no meaning unless the `partialMatch` parameter is set to `true`.\n- A keyword and its stemming expansions count as a single keyword when evaluating whether an item meets the `partialMatchThreshold`.\n\nSee also the `partialMatchKeywords` parameter.\n\n**Examples:**\n\n- `3`\n- `75%`\n- `all`\n\n**Default:** `50%`" }, { "name": "lqPartialMatchMaxKeywords", "value": "", "type": "query", "description": "The maximum number of keywords from the large query expression (see the `lq` parameter) that will be included in the partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\n**Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSetting this parameter to a high value can negatively impact the performance of queries, while setting it too low can produce less relevant results.\n\nSee also the `lqPartialMatchThreshold` parameter.\n\n**Default**: `100`\n" }, { "name": "lqPartialMatchKeywords", "value": "", "type": "query", "description": "The minimum number of keywords that need to be present in the large query expression (see the `lq` parameter) to convert it to a partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\n**Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSee also the `lqPartialMatchThreshold` parameter.\n\n**Default**: `5`\n" }, { "name": "lqPartialMatchThreshold", "value": "", "type": "query", "description": "An absolute or relative value indicating the minimum number of partial match expression keywords an item must contain to match the large query expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\nIf specified, the `lqPartialMatchThreshold` value must either be:\n\n- a 32-bits unsigned integer (e.g., `3`),\n- a percentage value between 0% and 100% (e.g., `75%`),\n- the empty string (`\"\"`), or\n- the `all` string.\n\nThe `\"\"` and `all` values are both equivalent to `100%`.\n\n**Note:** This parameter applies when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSee also the `lqPartialMatchKeywords` parameter.\n\n**Examples:**\n\n- `3`\n- `75%`\n- `all`\n\n**Default:** `50%`\n" }, { "name": "wildcards", "value": "", "type": "query", "description": "Whether to enable the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing wildcard characters (`*`) to the possible matching keywords. See also the `questionMark` parameter.\n\nSee [Using Wildcards in Queries](https://docs.coveo.com/en/1580/).\n\n**Default:** `false`\n" }, { "name": "questionMark", "value": "", "type": "query", "description": "Whether to enable question mark characters (`?`) in the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing question mark characters (`?`) to the possible matching keywords.\n\n**Note:** Setting this parameter to `true` has no effect unless you also set the `wildcards` parameter to `true`.\n\nSee [Using Wildcards in Queries](https://docs.coveo.com/en/1580/).\n\n**Default:** `false`\n" }, { "name": "enableQuerySyntax", "value": "", "type": "query", "description": "Whether to interpret advanced Coveo Cloud query syntax as such in the basic query expression (see the `q` parameter). See also the `lowercaseOperators` parameter.\n\n**Default:** `true`\n" }, { "name": "lowercaseOperators", "value": "", "type": "query", "description": "Whether to treat the `AND`, `NEAR`, `NOT`, and `OR` keywords in the basic query expression (see the `q` parameter) as Coveo Cloud query syntax operators even if those keywords are in lowercase.\n\n**Note:** Setting this parameter to `true` has no effect unless you also set the `enableQuerySyntax` parameter to `true`.\n\n**Example:** If you set this parameter, and the `enableQuerySyntax` parameter to `true`, the index interprets the `near` keyword in the basic query expression `service center near me` as the `NEAR` Coveo Cloud query syntax operator.\n\n**Default:** `false`\n" }, { "name": "excerptLength", "value": "", "type": "query", "description": "The maximum length of result excerpts (in number of characters).\n\nAn *excerpt* is a segmented text generated at query time by the index from the body of an item. When a query is performed, the *excerpt* yields relevant item body sections in which the queried terms are highlighted.\n\nAn *excerpt* includes the most relevant sentences in which the queried keywords appear, in the order in which they appear in the item, up to the specified number of characters.\n\n**Note:** The maximum length you set using this parameter also applies to retrieved first sentences, if those are included in the results (see the `retrieveFirstSentences` parameter).\n\n**Default:** `200`\n" }, { "name": "retrieveFirstSentences", "value": "", "type": "query", "description": "Whether to include the first sentences of textual items in the query results.\n\nFirst sentences are typically useful when rendering result items such as emails, since the first few sentences of these kinds of items are often more relevant than a contextually generated excerpt (see the `excerptLength` parameter).\n\n**Note:** The maximum length of the retrieved sentences (in number of characters) is determined by the value of the `excerptLength` parameter.\n\n**Default:** `false`\n" }, { "name": "fieldsToInclude", "value": "", "type": "query", "description": "The names of the fields to include with each item in the query results. If specified, no other fields will be included.\n\n**Note:** If you specify both an array of fields to include and an array of fields to exclude (see the `fieldsToExclude` parameter), the `fieldsToExclude` parameter has no effect at all.\n\nIf you do not explicitly specify an array of values for this parameter (or for the `fieldsToExclude` parameter), each query result item will include all of its available fields.\n" }, { "name": "fieldsToExclude", "value": "", "type": "query", "description": "The names of the fields to exclude from the query results. All other fields will be included with each item in the query result.\n\n**Note:** If you specify both an array of fields to include (see the `fieldsToInclude` parameter) and an array of fields to exclude, the `fieldsToExclude` parameter has no effect at all.\n\nIf you do not explicitly specify an array of values for this parameter (or for the `fieldsToInclude` parameter), each query result item will include all of its available fields.\n" }, { "name": "groupBy", "value": "", "type": "query", "description": "The Group By operations to perform on the query results, typically to extract facets.\n" }, { "name": "facets", "value": "", "type": "query", "description": "The facet operations to perform on the query results.\n" }, { "name": "facetOptions", "value": "", "type": "query", "description": "The global configuration options that apply to all facet requests performed along with the query (see the `facets` query parameter).\n" }, { "name": "categoryFacets", "value": "", "type": "query", "description": "Data to easily query a hierarchical field using a path of hierarchical values.\n" }, { "name": "sortCriteria", "value": "", "type": "query", "description": "The criteria to use for sorting the query results.\n\n**Allowed values:**\n\n- `relevancy`: use standard index ranking factors (adjacency, TDIDF, etc.) and custom ranking expressions (QREs and QRFs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value.\n- `date ascending`/`date descending`: use the `@date` field to sort the query results. This field typically contains the last modification date of each item.\n- `qre`: use only custom ranking expressions (QREs and QRFs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value.\n- `nosort`: do not sort the query results; the index will return result items in an essentially random order.\n- `@[field] ascending`/`@[field] descending`: sort using the value of a specific sortable field (replace `[field]` by the target field name).\n\nYou can specify a list of comma-separated sort criteria which will be applied sequentially, i.e., if there's a tie on the 1st criterion, the API uses the 2nd criterion to break the tie.\nHowever, this only works when combining:\n- a `relevancy` criterion followed by one or more field or `date` criteria.\n- a `qre` criterion followed by one or more field or `date` criteria.\n- two or more field criteria (e.g., `@views descending,@likes descending`).\n- a single `date` criterion and one or more field criteria in any order (e.g., `@views descending, date ascending`).\n\n**Examples:**\n\n- `date ascending`\n- `@author ascending`\n- `date descending,@views descending,@likes descending`\n\n**Default:** `relevancy`\n" }, { "name": "rankingFunctions", "value": "", "type": "query", "description": "The array of [ranking functions](https://docs.coveo.com/en/1448/) to execute on each query result item.\n\nThe result of a ranking function is added to the result score, which can affect sorting (see the `Relevancy` and `qre` values of the `sortCriteria` parameter).\n" }, { "name": "queryFunctions", "value": "", "type": "query", "description": "The array of [query functions](https://docs.coveo.com/en/1451/) to execute on each query result item.\n\nThe result of a query function is stored in a temporary, dynamic field created at query time.\n" }, { "name": "firstResult", "value": "", "type": "query", "description": "The 0-based position of the first result to return in the non-paginated result set.\n\nAlong with the `numberOfResults` parameter, this allows you to retrieve a specific page of result items.\n\n**Note:** This can't be greater than the `maximumResults` value configured for your index. By default, `maximumResults` is set to 5,000 items.\n\n**Default:** `0`\n" }, { "name": "numberOfResults", "value": "", "type": "query", "description": "The number of results to return.\n\nAlong with the `firstResult` parameter, this allows you to retrieve a specific page of result items.\n\nThis parameter also defines the maximum number of results which can be returned by the Coveo ML Recommendations feature.\n\n**Note:** The maximum `numberOfResults` value is 2,000 items.\n\n**Default:** `10`\n" }, { "name": "enableDuplicateFiltering", "value": "", "type": "query", "description": "Whether to filter out duplicates, so that items resembling one another only appear once in the query results.\n\n**Notes:**\n- Two items must be at least 85% similar to one another to be considered duplicates.\n- When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set.\n- Enabling this feature can make the total result count less precise, since only results up to those being retrieved (see the `firstResult` and `numberOfResults` parameters) are submitted to duplicate filtering.\n- Duplicate filtering and [result folding](https://docs.coveo.com/en/1466/) are mutually exclusive.\n\n**Default:** `false`\n" }, { "name": "filterField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to group items into distinct folded query results (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value is identical for all items to group under the same folded query result.\n\nSee also the `parentField`, `childField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "parentField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to be able to identify an item as a parent in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value can uniquely identify each item. All items whose `childField` value is identical to the `parentField` value of another item are considered children of that other item.\n\nSee also the `filterField`, `childField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- In the index, the values of the `parentField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail.\n- The values of the `parentField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index).\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "childField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to be able to identify an item as a child of another item in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value points to the `parentField` value of the intended parent. Whenever an item is a child of another item, its `childField` value must be identical to the `parentField` value of that other item.\n\nSee also the `filterField`, `parentField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- In the index, the values of the `childField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail.\n- The values of the `childField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index).\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "filterFieldRange", "value": "", "type": "query", "description": "The maximum number of items to include in the `childResults` array of a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nSee also the `filterField`, `parentField`, and `childField`.\n\n**Notes:**\n\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n\n**Default:** `5`\n" }, { "name": "summaryLength", "value": "", "type": "query", "description": "The length of the automatically generated item summary.\n\nThe Coveo Platform uses a linguistic algorithm that relies on term frequency and proximity to generate an item *summary* made of sentences identified to be the most important ones in the item.\n\nThis *summary* is generated independently from the query, as opposed to a result item *excerpt*, which is generated based on query keywords.\n\n**Default:** `0`\n" }, { "name": "sortField", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `sortCriteria` parameter along with the `@[field] ascending/@[field] descending` syntax instead." }, { "name": "disableQuerySyntax", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `enableQuerySyntax` parameter instead." }, { "name": "staticQuery", "value": "", "type": "query", "description": "Whether to execute this query in a way that does not count against the allowed number of queries per month of a Coveo Cloud organization (QPM), but may produce cached/outdated query results (see [Rendering Static Content Using Persistent Queries](https://docs.coveo.com/en/1009/)).\n\n**Note:** Setting this parameter to `true` overwrites the `maximumAge` parameter value for this query.\n\n**Default:** `false`\n" }, { "name": "userActions", "value": "", "type": "query", "description": "The parameters allowing user actions to be retrieved in query results." }, { "name": "commerce", "value": "", "type": "query", "description": "The parameters for Coveo for Commerce." }, { "name": "dictionaryFieldContext", "value": "", "type": "query", "description": "A key-value store where each pair corresponds to the name of a dictionary field to query, along with the key to target within that field.\n\n**Example:** Suppose that in your index, the `@price` dictionary field contains different values for its `storeA` and `storeB` keys. Including `\"dictionaryFieldContext\": { \"price\": \"storeA\" }` in the query means that any part of the query expression that targets the `@price` field will in fact only query the `storeA` values of that field.\n\n**Note:** This cannot be used at the same time as `fieldAliases`.\n\n**Note:** This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`dictionaryFieldContext`](https://docs.coveo.com/en/56/#dictionaryfieldcontext-object-optional).\n" }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "maximumAge", "value": "", "type": "query", "description": "The maximum age of cached results, in milliseconds.\n\nIf the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index.\n\nSuch cache hits improve responsiveness but still count as queries in your queries per month (QPM) count.\n\n**Note:** This parameter is automatically overridden when `staticQuery` is set to `true`.\n\n**Default:** `-1` (which corresponds to the internal default value (15 minutes)\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" }, { "name": "actionsHistory", "value": "", "type": "query", "description": "The query and page view actions previously made by the current user.\n\nCoveo Machine Learning event recommendations models use this information to provide contextually relevant output.\n\n**Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script." }, { "name": "recommendation", "value": "", "type": "query", "description": "The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)).\n\nCoveo Machine Learning event recommendations models may use this information to provide contextually relevant output.\n" }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "format", "value": "", "type": "query", "description": "The format of a successful response.\n\n- Use `json` to get the response in the JSON format.\n- Use `xlsx` to generate an Excel file containing the results (binary).\n\n**Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format.\n\n**Default:** `json`\n" }, { "name": "debug", "value": "", "type": "query", "description": "Whether to force a successful response to include debug information.\n\n**Notes:**\n\n- Debug information can only appear in responses in the JSON format (see the `format` parameter).\n- Avoid setting this parameter to `true` in production, as it has a negative impact on query performance.\n\n**Default:** `false`\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "visitorId", "value": "", "type": "query", "description": "A GUID which represents the current user, who can either be authenticated or anonymous.\n\n`visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`.\n\nFor older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.\n" }, { "name": "isGuestUser", "value": "", "type": "query", "description": "Whether the current user is anonymous.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query.\n\n**Default:** `false`\n" }, { "name": "language", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead." }, { "name": "mlParameters", "value": "", "type": "query", "description": "A map of options to pass to the Coveo ML models associated with the request's target query pipeline.\n\n**Available parameters:**\n- `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`.\n- `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered.\n- `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration.\n- `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies.\n- `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`.\n- `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates.\n- `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input.\n- `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input.\n- `categoryFilter` (string): The name of a category of products to get recommendations for.\n- `brandFilter` (string): The name of a brand of products to get recommendations for.\n- `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `\"filters\": { \"originContext\": \"\", \"originLevel2\": \"\" }`.\n\n**Examples:**\n- `{\"num\": 3, \"padding\": \"trending\", \"maxActionsHistoryItemsToConsider\": 10, \"considerUserContext\": false}`\n- `{\"wordSelection\": \"wordsKept:4\"}`\n" }, { "name": "indexType", "value": "", "type": "query", "description": "The type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization.\n\n**Default:** `coveo`\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "maximumTimeoutMs", "value": "", "type": "query", "description": "The maximum number of milliseconds to allow the request to last before timing out.\n**Maximum:** 10000\n\n**Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.\n\n" }, { "name": "analytics", "value": "", "type": "query" }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "See [Performing a Query](https://docs.coveo.com/en/1445/).\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Send Search Request", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "See [Performing a Query](https://docs.coveo.com/en/1445/).\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Plan Search Execution", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/plan", "params": [ { "name": "q", "value": "", "type": "query", "description": "The basic query expression, typically the keywords entered by the end user in a query box.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `queryText` field of that event should be set to the `q` value of the corresponding query.\n" }, { "name": "aq", "value": "", "type": "query", "description": "The advanced query expression, typically generated by code (e.g., when toggling facet values).\n\n**Note:** When logging a **Search** usage analytics event for a query, the `advancedQuery` field of that event should be set to the `aq` value of the corresponding query (for reporting purposes).\n" }, { "name": "cq", "value": "", "type": "query", "description": "The constant query expression, typically populated with expressions that must apply to all queries sent from a specific search interface (e.g., from a specific tab). Once evaluated, the result sets of those expressions are kept in a special cache.\n\n**Tip:** Avoid including dynamic content in the constant query expression. Otherwise you risk filling up the cache with useless data, which can have a negative impact on performance.\n\n**Notes:**\n\n- Other parts of the query expression can also benefit from the index cache (see the `maximumAge` parameter). However, using the constant query expression allows you to explicitly cache specific result sets.\n- Temporal keywords (`now`, `today`, `yesterday`) in the constant query expression are only re-evaluated once per 3-4 minutes; therefore, you should avoid basing `cq` expressions on temporal keywords if you require split second accuracy.\n" }, { "name": "dq", "value": "", "type": "query", "description": "The disjunction query expression, typically populated by Coveo ML automatic relevance tuning models to ensure that relevant items are included in the query results. The disjunction query expression is merged with the other parts of the query expression using an `OR` operator. The resulting query expression is `(((q aq) OR (dq)) cq)`.\n" }, { "name": "lq", "value": "", "type": "query", "description": "The large query expression, typically populated with a case description, long textual query, or any other form of text that can help refine a query. The Coveo ML Intelligent Term Detection (ITD) feature can extract relevant keywords from the large query expression and inject those keywords in the basic query expression (see the `q` parameter).\n" }, { "name": "enableDidYouMean", "value": "", "type": "query", "description": "Whether to enable the _Did You Mean_ feature of the index, which populates the `queryCorrections` property of a successful response with keyword correction suggestions.\n\n**Notes:**\n\n- The Did You Mean feature only processes the basic query expression (see the `q` parameter).\n- When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array.\n- The Did You Mean feature will return no corrections when the query is processed by an automatic relevance tuning (ART) model whose Intelligent Term Detection (ITD) feature is enabled.\n\n**Default:** `false`\n" }, { "name": "mlDidYouMeanMaxCandidates", "value": "", "type": "query", "description": "The maximum number of Coveo ML Did You Mean candidates to request from the query suggestions model.\n\n**Default:** `3`\n" }, { "name": "mlDidYouMeanMinScore", "value": "", "type": "query", "description": "The minimum score a query suggestion may have to be allowed as a candidate for the Coveo ML query suggestions Did You Mean feature. For best results, value should typically be in range [`0.8`, `2`].\n\n**Default:** `1.0`\n" }, { "name": "mlDidYouMeanUseFacetCount", "value": "", "type": "query", "description": "Whether to use facet counts for the Coveo ML Did You Mean feature. Can improve results, but requires more processing.\n\n**Default:** `false`\n" }, { "name": "enableMLDidYouMean", "value": "", "type": "query", "description": "**Important:** This feature is still in an experimental state.\n\nWhether to enable the Coveo ML query suggestions _Did You Mean_ feature, which populates the `queryCorrections` property of a successful response with keyword correction suggestions.\n\n**Notes:**\n\n- The Coveo ML query suggestions Did You Mean feature only processes the basic query expression (see the `q` parameter).\n- When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array.\n\n**Default:** `false`\n" }, { "name": "partialMatch", "value": "", "type": "query", "description": "Whether to convert a basic expression containing at least `partialMatchKeywords` to a _partial match expression_, so that any item containing at least `partialMatchThreshold` of those keywords will match the expression.\n\nIf you do not set this parameter to `true`, an item must contain all of the basic expression keywords to match the expression.\n\n**Notes:**\n\n- This feature only applies to the basic expression (`q`) of a query, and to the basic `queryOverride` of its Group By operations.\n- When the `enableQuerySyntax` parameter is set to `true`, this feature has no effect on a basic expression containing advanced Coveo Cloud query syntax (field expressions, operators, etc.).\n\n**Default:** `false`\n" }, { "name": "partialMatchKeywords", "value": "", "type": "query", "description": "The minimum number of keywords that need to be present in a basic expression to convert it to a partial match expression.\n\n**Notes:**\n\n- This parameter has no meaning unless the `partialMatch` parameter is set to `true`.\n- Repeated keywords in a basic expression count as a single keyword.\n- Thesaurus expansions in a basic expression count towards the `partialMatchKeywords` count.\n- Stemming expansions **do not** count towards the `partialMatchKeywords` count.\n\nSee also the `partialMatchThreshold` parameter.\n\n**Default:** `5`\n" }, { "name": "partialMatchThreshold", "value": "", "type": "query", "description": "An absolute or relative value indicating the minimum number (rounded up) of partial match expression keywords an item must contain to match the expression.\n\nIf specified, the `partialMatchThreshold` value must either be:\n\n- a 32-bits unsigned integer (e.g., `3`),\n- a percentage value between 0% and 100% (e.g., `75%`),\n- the empty string, or\n- the `all` string.\n\nThe `\"\"` and the `all` value are both equivalent to `100%`.\n\n**Notes:**\n\n- This parameter has no meaning unless the `partialMatch` parameter is set to `true`.\n- A keyword and its stemming expansions count as a single keyword when evaluating whether an item meets the `partialMatchThreshold`.\n\nSee also the `partialMatchKeywords` parameter.\n\n**Examples:**\n\n- `3`\n- `75%`\n- `all`\n\n**Default:** `50%`" }, { "name": "lqPartialMatchMaxKeywords", "value": "", "type": "query", "description": "The maximum number of keywords from the large query expression (see the `lq` parameter) that will be included in the partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\n**Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSetting this parameter to a high value can negatively impact the performance of queries, while setting it too low can produce less relevant results.\n\nSee also the `lqPartialMatchThreshold` parameter.\n\n**Default**: `100`\n" }, { "name": "lqPartialMatchKeywords", "value": "", "type": "query", "description": "The minimum number of keywords that need to be present in the large query expression (see the `lq` parameter) to convert it to a partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\n**Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSee also the `lqPartialMatchThreshold` parameter.\n\n**Default**: `5`\n" }, { "name": "lqPartialMatchThreshold", "value": "", "type": "query", "description": "An absolute or relative value indicating the minimum number of partial match expression keywords an item must contain to match the large query expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\nIf specified, the `lqPartialMatchThreshold` value must either be:\n\n- a 32-bits unsigned integer (e.g., `3`),\n- a percentage value between 0% and 100% (e.g., `75%`),\n- the empty string (`\"\"`), or\n- the `all` string.\n\nThe `\"\"` and `all` values are both equivalent to `100%`.\n\n**Note:** This parameter applies when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSee also the `lqPartialMatchKeywords` parameter.\n\n**Examples:**\n\n- `3`\n- `75%`\n- `all`\n\n**Default:** `50%`\n" }, { "name": "wildcards", "value": "", "type": "query", "description": "Whether to enable the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing wildcard characters (`*`) to the possible matching keywords. See also the `questionMark` parameter.\n\nSee [Using Wildcards in Queries](https://docs.coveo.com/en/1580/).\n\n**Default:** `false`\n" }, { "name": "questionMark", "value": "", "type": "query", "description": "Whether to enable question mark characters (`?`) in the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing question mark characters (`?`) to the possible matching keywords.\n\n**Note:** Setting this parameter to `true` has no effect unless you also set the `wildcards` parameter to `true`.\n\nSee [Using Wildcards in Queries](https://docs.coveo.com/en/1580/).\n\n**Default:** `false`\n" }, { "name": "enableQuerySyntax", "value": "", "type": "query", "description": "Whether to interpret advanced Coveo Cloud query syntax as such in the basic query expression (see the `q` parameter). See also the `lowercaseOperators` parameter.\n\n**Default:** `true`\n" }, { "name": "lowercaseOperators", "value": "", "type": "query", "description": "Whether to treat the `AND`, `NEAR`, `NOT`, and `OR` keywords in the basic query expression (see the `q` parameter) as Coveo Cloud query syntax operators even if those keywords are in lowercase.\n\n**Note:** Setting this parameter to `true` has no effect unless you also set the `enableQuerySyntax` parameter to `true`.\n\n**Example:** If you set this parameter, and the `enableQuerySyntax` parameter to `true`, the index interprets the `near` keyword in the basic query expression `service center near me` as the `NEAR` Coveo Cloud query syntax operator.\n\n**Default:** `false`\n" }, { "name": "excerptLength", "value": "", "type": "query", "description": "The maximum length of result excerpts (in number of characters).\n\nAn *excerpt* is a segmented text generated at query time by the index from the body of an item. When a query is performed, the *excerpt* yields relevant item body sections in which the queried terms are highlighted.\n\nAn *excerpt* includes the most relevant sentences in which the queried keywords appear, in the order in which they appear in the item, up to the specified number of characters.\n\n**Note:** The maximum length you set using this parameter also applies to retrieved first sentences, if those are included in the results (see the `retrieveFirstSentences` parameter).\n\n**Default:** `200`\n" }, { "name": "retrieveFirstSentences", "value": "", "type": "query", "description": "Whether to include the first sentences of textual items in the query results.\n\nFirst sentences are typically useful when rendering result items such as emails, since the first few sentences of these kinds of items are often more relevant than a contextually generated excerpt (see the `excerptLength` parameter).\n\n**Note:** The maximum length of the retrieved sentences (in number of characters) is determined by the value of the `excerptLength` parameter.\n\n**Default:** `false`\n" }, { "name": "fieldsToInclude", "value": "", "type": "query", "description": "The names of the fields to include with each item in the query results. If specified, no other fields will be included.\n\n**Note:** If you specify both an array of fields to include and an array of fields to exclude (see the `fieldsToExclude` parameter), the `fieldsToExclude` parameter has no effect at all.\n\nIf you do not explicitly specify an array of values for this parameter (or for the `fieldsToExclude` parameter), each query result item will include all of its available fields.\n" }, { "name": "fieldsToExclude", "value": "", "type": "query", "description": "The names of the fields to exclude from the query results. All other fields will be included with each item in the query result.\n\n**Note:** If you specify both an array of fields to include (see the `fieldsToInclude` parameter) and an array of fields to exclude, the `fieldsToExclude` parameter has no effect at all.\n\nIf you do not explicitly specify an array of values for this parameter (or for the `fieldsToInclude` parameter), each query result item will include all of its available fields.\n" }, { "name": "groupBy", "value": "", "type": "query", "description": "The Group By operations to perform on the query results, typically to extract facets.\n" }, { "name": "facets", "value": "", "type": "query", "description": "The facet operations to perform on the query results.\n" }, { "name": "facetOptions", "value": "", "type": "query", "description": "The global configuration options that apply to all facet requests performed along with the query (see the `facets` query parameter).\n" }, { "name": "categoryFacets", "value": "", "type": "query", "description": "Data to easily query a hierarchical field using a path of hierarchical values.\n" }, { "name": "sortCriteria", "value": "", "type": "query", "description": "The criteria to use for sorting the query results.\n\n**Allowed values:**\n\n- `relevancy`: use standard index ranking factors (adjacency, TDIDF, etc.) and custom ranking expressions (QREs and QRFs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value.\n- `date ascending`/`date descending`: use the `@date` field to sort the query results. This field typically contains the last modification date of each item.\n- `qre`: use only custom ranking expressions (QREs and QRFs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value.\n- `nosort`: do not sort the query results; the index will return result items in an essentially random order.\n- `@[field] ascending`/`@[field] descending`: sort using the value of a specific sortable field (replace `[field]` by the target field name).\n\nYou can specify a list of comma-separated sort criteria which will be applied sequentially, i.e., if there's a tie on the 1st criterion, the API uses the 2nd criterion to break the tie.\nHowever, this only works when combining:\n- a `relevancy` criterion followed by one or more field or `date` criteria.\n- a `qre` criterion followed by one or more field or `date` criteria.\n- two or more field criteria (e.g., `@views descending,@likes descending`).\n- a single `date` criterion and one or more field criteria in any order (e.g., `@views descending, date ascending`).\n\n**Examples:**\n\n- `date ascending`\n- `@author ascending`\n- `date descending,@views descending,@likes descending`\n\n**Default:** `relevancy`\n" }, { "name": "rankingFunctions", "value": "", "type": "query", "description": "The array of [ranking functions](https://docs.coveo.com/en/1448/) to execute on each query result item.\n\nThe result of a ranking function is added to the result score, which can affect sorting (see the `Relevancy` and `qre` values of the `sortCriteria` parameter).\n" }, { "name": "queryFunctions", "value": "", "type": "query", "description": "The array of [query functions](https://docs.coveo.com/en/1451/) to execute on each query result item.\n\nThe result of a query function is stored in a temporary, dynamic field created at query time.\n" }, { "name": "firstResult", "value": "", "type": "query", "description": "The 0-based position of the first result to return in the non-paginated result set.\n\nAlong with the `numberOfResults` parameter, this allows you to retrieve a specific page of result items.\n\n**Note:** This can't be greater than the `maximumResults` value configured for your index. By default, `maximumResults` is set to 5,000 items.\n\n**Default:** `0`\n" }, { "name": "numberOfResults", "value": "", "type": "query", "description": "The number of results to return.\n\nAlong with the `firstResult` parameter, this allows you to retrieve a specific page of result items.\n\nThis parameter also defines the maximum number of results which can be returned by the Coveo ML Recommendations feature.\n\n**Note:** The maximum `numberOfResults` value is 2,000 items.\n\n**Default:** `10`\n" }, { "name": "enableDuplicateFiltering", "value": "", "type": "query", "description": "Whether to filter out duplicates, so that items resembling one another only appear once in the query results.\n\n**Notes:**\n- Two items must be at least 85% similar to one another to be considered duplicates.\n- When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set.\n- Enabling this feature can make the total result count less precise, since only results up to those being retrieved (see the `firstResult` and `numberOfResults` parameters) are submitted to duplicate filtering.\n- Duplicate filtering and [result folding](https://docs.coveo.com/en/1466/) are mutually exclusive.\n\n**Default:** `false`\n" }, { "name": "filterField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to group items into distinct folded query results (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value is identical for all items to group under the same folded query result.\n\nSee also the `parentField`, `childField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "parentField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to be able to identify an item as a parent in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value can uniquely identify each item. All items whose `childField` value is identical to the `parentField` value of another item are considered children of that other item.\n\nSee also the `filterField`, `childField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- In the index, the values of the `parentField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail.\n- The values of the `parentField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index).\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "childField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to be able to identify an item as a child of another item in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value points to the `parentField` value of the intended parent. Whenever an item is a child of another item, its `childField` value must be identical to the `parentField` value of that other item.\n\nSee also the `filterField`, `parentField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- In the index, the values of the `childField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail.\n- The values of the `childField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index).\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "filterFieldRange", "value": "", "type": "query", "description": "The maximum number of items to include in the `childResults` array of a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nSee also the `filterField`, `parentField`, and `childField`.\n\n**Notes:**\n\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n\n**Default:** `5`\n" }, { "name": "summaryLength", "value": "", "type": "query", "description": "The length of the automatically generated item summary.\n\nThe Coveo Platform uses a linguistic algorithm that relies on term frequency and proximity to generate an item *summary* made of sentences identified to be the most important ones in the item.\n\nThis *summary* is generated independently from the query, as opposed to a result item *excerpt*, which is generated based on query keywords.\n\n**Default:** `0`\n" }, { "name": "sortField", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `sortCriteria` parameter along with the `@[field] ascending/@[field] descending` syntax instead." }, { "name": "disableQuerySyntax", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `enableQuerySyntax` parameter instead." }, { "name": "staticQuery", "value": "", "type": "query", "description": "Whether to execute this query in a way that does not count against the allowed number of queries per month of a Coveo Cloud organization (QPM), but may produce cached/outdated query results (see [Rendering Static Content Using Persistent Queries](https://docs.coveo.com/en/1009/)).\n\n**Note:** Setting this parameter to `true` overwrites the `maximumAge` parameter value for this query.\n\n**Default:** `false`\n" }, { "name": "userActions", "value": "", "type": "query", "description": "The parameters allowing user actions to be retrieved in query results." }, { "name": "commerce", "value": "", "type": "query", "description": "The parameters for Coveo for Commerce." }, { "name": "dictionaryFieldContext", "value": "", "type": "query", "description": "A key-value store where each pair corresponds to the name of a dictionary field to query, along with the key to target within that field.\n\n**Example:** Suppose that in your index, the `@price` dictionary field contains different values for its `storeA` and `storeB` keys. Including `\"dictionaryFieldContext\": { \"price\": \"storeA\" }` in the query means that any part of the query expression that targets the `@price` field will in fact only query the `storeA` values of that field.\n\n**Note:** This cannot be used at the same time as `fieldAliases`.\n\n**Note:** This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`dictionaryFieldContext`](https://docs.coveo.com/en/56/#dictionaryfieldcontext-object-optional).\n" }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "maximumAge", "value": "", "type": "query", "description": "The maximum age of cached results, in milliseconds.\n\nIf the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index.\n\nSuch cache hits improve responsiveness but still count as queries in your queries per month (QPM) count.\n\n**Note:** This parameter is automatically overridden when `staticQuery` is set to `true`.\n\n**Default:** `-1` (which corresponds to the internal default value (15 minutes)\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" }, { "name": "actionsHistory", "value": "", "type": "query", "description": "The query and page view actions previously made by the current user.\n\nCoveo Machine Learning event recommendations models use this information to provide contextually relevant output.\n\n**Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script." }, { "name": "recommendation", "value": "", "type": "query", "description": "The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)).\n\nCoveo Machine Learning event recommendations models may use this information to provide contextually relevant output.\n" }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "format", "value": "", "type": "query", "description": "The format of a successful response.\n\n- Use `json` to get the response in the JSON format.\n- Use `xlsx` to generate an Excel file containing the results (binary).\n\n**Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format.\n\n**Default:** `json`\n" }, { "name": "debug", "value": "", "type": "query", "description": "Whether to force a successful response to include debug information.\n\n**Notes:**\n\n- Debug information can only appear in responses in the JSON format (see the `format` parameter).\n- Avoid setting this parameter to `true` in production, as it has a negative impact on query performance.\n\n**Default:** `false`\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "visitorId", "value": "", "type": "query", "description": "A GUID which represents the current user, who can either be authenticated or anonymous.\n\n`visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`.\n\nFor older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.\n" }, { "name": "isGuestUser", "value": "", "type": "query", "description": "Whether the current user is anonymous.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query.\n\n**Default:** `false`\n" }, { "name": "language", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead." }, { "name": "mlParameters", "value": "", "type": "query", "description": "A map of options to pass to the Coveo ML models associated with the request's target query pipeline.\n\n**Available parameters:**\n- `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`.\n- `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered.\n- `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration.\n- `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies.\n- `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`.\n- `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates.\n- `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input.\n- `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input.\n- `categoryFilter` (string): The name of a category of products to get recommendations for.\n- `brandFilter` (string): The name of a brand of products to get recommendations for.\n- `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `\"filters\": { \"originContext\": \"\", \"originLevel2\": \"\" }`.\n\n**Examples:**\n- `{\"num\": 3, \"padding\": \"trending\", \"maxActionsHistoryItemsToConsider\": 10, \"considerUserContext\": false}`\n- `{\"wordSelection\": \"wordsKept:4\"}`\n" }, { "name": "indexType", "value": "", "type": "query", "description": "The type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization.\n\n**Default:** `coveo`\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "maximumTimeoutMs", "value": "", "type": "query", "description": "The maximum number of milliseconds to allow the request to last before timing out.\n**Maximum:** 10000\n\n**Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.\n\n" }, { "name": "analytics", "value": "", "type": "query" }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "See [Performing a Query](https://docs.coveo.com/en/1445/).\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Plan Search Execution", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/plan", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "See [Performing a Query](https://docs.coveo.com/en/1445/).\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Request Query Suggestions", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/querySuggest", "params": [ { "name": "q", "value": "Coveo \"Cloud V2\" platform", "type": "query", "description": "The *basic query* expression, typically the keywords entered by the end user in a query box.\n" }, { "name": "autoCompleter", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons." }, { "name": "additionalData", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons." }, { "name": "count", "value": "", "type": "query", "description": "The desired number of query suggestions.\n" }, { "name": "enableWordCompletion", "value": "", "type": "query", "description": "Whether to attempt to complete the last word of the current basic query expression (see the `q` parameter) and boost the ranking score of the resulting expression so that it is returned as the first query suggestion.\n" }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "maximumAge", "value": "", "type": "query", "description": "The maximum age of cached results, in milliseconds.\n\nIf the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index.\n\nSuch cache hits improve responsiveness but still count as queries in your queries per month (QPM) count.\n\n**Note:** This parameter is automatically overridden when `staticQuery` is set to `true`.\n\n**Default:** `-1` (which corresponds to the internal default value (15 minutes)\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" }, { "name": "actionsHistory", "value": "", "type": "query", "description": "The query and page view actions previously made by the current user.\n\nCoveo Machine Learning event recommendations models use this information to provide contextually relevant output.\n\n**Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script." }, { "name": "recommendation", "value": "", "type": "query", "description": "The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)).\n\nCoveo Machine Learning event recommendations models may use this information to provide contextually relevant output.\n" }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "format", "value": "", "type": "query", "description": "The format of a successful response.\n\n- Use `json` to get the response in the JSON format.\n- Use `xlsx` to generate an Excel file containing the results (binary).\n\n**Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format.\n\n**Default:** `json`\n" }, { "name": "debug", "value": "", "type": "query", "description": "Whether to force a successful response to include debug information.\n\n**Notes:**\n\n- Debug information can only appear in responses in the JSON format (see the `format` parameter).\n- Avoid setting this parameter to `true` in production, as it has a negative impact on query performance.\n\n**Default:** `false`\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "visitorId", "value": "", "type": "query", "description": "A GUID which represents the current user, who can either be authenticated or anonymous.\n\n`visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`.\n\nFor older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.\n" }, { "name": "isGuestUser", "value": "", "type": "query", "description": "Whether the current user is anonymous.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query.\n\n**Default:** `false`\n" }, { "name": "language", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead." }, { "name": "mlParameters", "value": "", "type": "query", "description": "A map of options to pass to the Coveo ML models associated with the request's target query pipeline.\n\n**Available parameters:**\n- `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`.\n- `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered.\n- `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration.\n- `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies.\n- `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`.\n- `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates.\n- `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input.\n- `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input.\n- `categoryFilter` (string): The name of a category of products to get recommendations for.\n- `brandFilter` (string): The name of a brand of products to get recommendations for.\n- `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `\"filters\": { \"originContext\": \"\", \"originLevel2\": \"\" }`.\n\n**Examples:**\n- `{\"num\": 3, \"padding\": \"trending\", \"maxActionsHistoryItemsToConsider\": 10, \"considerUserContext\": false}`\n- `{\"wordSelection\": \"wordsKept:4\"}`\n" }, { "name": "indexType", "value": "", "type": "query", "description": "The type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization.\n\n**Default:** `coveo`\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "maximumTimeoutMs", "value": "", "type": "query", "description": "The maximum number of milliseconds to allow the request to last before timing out.\n**Maximum:** 10000\n\n**Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.\n\n" }, { "name": "analytics", "value": "", "type": "query" }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "See [Getting Query Suggestions](https://docs.coveo.com/en/1459/).\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Request Query Suggestions", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/querySuggest", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "See [Getting Query Suggestions](https://docs.coveo.com/en/1459/).\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Send Facet Search Request", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/facet", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Executes a facet search request.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "List All Fields", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/fields", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Gets all fields in the target Coveo Cloud organization.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get Values for One Field", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/values", "params": [ { "name": "field", "value": "", "type": "query", "description": "The name of the field from which to retrieve values.\n" }, { "name": "lookupField", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons.\n\nThe name of an additional field from which to retrieve values." }, { "name": "ignoreAccents", "value": "", "type": "query", "description": "Whether to treat accentuated characters as non-accentuated characters when retrieving field values (e.g., treat `é`, `è`, `ê`, etc., as `e`).\n\n**Default:** `true`\n" }, { "name": "sortCriteria", "value": "", "type": "query", "description": "The sort criteria to use.\n\nUse:\n- `occurrences` to sort by number of occurrences, with field values having the highest number of occurrences appearing first.\n- `nosort` to avoid sorting the results of the Group By operation. The field values will appear in an unspecified order.\n\n**Default:** `occurrences`\n" }, { "name": "maximumNumberOfValues", "value": "", "type": "query", "description": "The maximum number of field values to return.\n\n**Default:** `10`\n" }, { "name": "queryOverride", "value": "", "type": "query", "description": "A different basic query expression (q) use.\n" }, { "name": "constantQueryOverride", "value": "", "type": "query", "description": "A different constant query expression (cq) to use.\n" }, { "name": "disjunctionQueryOverride", "value": "", "type": "query", "description": "A different disjunction query expression (dq) to use.\n" }, { "name": "pattern", "value": "", "type": "query", "description": "The pattern that the field values must match.\n\nSee also the `patternType` parameter.\"\n" }, { "name": "patternType", "value": "", "type": "query", "description": "The type of pattern that is being used to list field values.\n\nUse:\n- `wildcard` to parse the specified `pattern` as a wildcard expression.\n- `regularexpression` to parse the specified `pattern` as a regular expression.\n- `editdistance` to apply the Edit Distance algorithm to match values that are close to the specified `pattern`.\n- `phonetic` to apply a phonetic algorithm to match values that are phonetically similar to the specified `pattern`.\n\n**Default:** `wildcard`\n" }, { "name": "commerce", "value": "", "type": "query", "description": "The parameters for Coveo for Commerce." }, { "name": "dictionaryFieldContext", "value": "", "type": "query", "description": "A key-value store where each pair corresponds to the name of a dictionary field to query, along with the key to target within that field.\n\n**Example:** Suppose that in your index, the `@price` dictionary field contains different values for its `storeA` and `storeB` keys. Including `\"dictionaryFieldContext\": { \"price\": \"storeA\" }` in the query means that any part of the query expression that targets the `@price` field will in fact only query the `storeA` values of that field.\n\n**Note:** This cannot be used at the same time as `fieldAliases`.\n\n**Note:** This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`dictionaryFieldContext`](https://docs.coveo.com/en/56/#dictionaryfieldcontext-object-optional).\n" }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "maximumAge", "value": "", "type": "query", "description": "The maximum age of cached results, in milliseconds.\n\nIf the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index.\n\nSuch cache hits improve responsiveness but still count as queries in your queries per month (QPM) count.\n\n**Note:** This parameter is automatically overridden when `staticQuery` is set to `true`.\n\n**Default:** `-1` (which corresponds to the internal default value (15 minutes)\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" }, { "name": "actionsHistory", "value": "", "type": "query", "description": "The query and page view actions previously made by the current user.\n\nCoveo Machine Learning event recommendations models use this information to provide contextually relevant output.\n\n**Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script." }, { "name": "recommendation", "value": "", "type": "query", "description": "The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)).\n\nCoveo Machine Learning event recommendations models may use this information to provide contextually relevant output.\n" }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "format", "value": "", "type": "query", "description": "The format of a successful response.\n\n- Use `json` to get the response in the JSON format.\n- Use `xlsx` to generate an Excel file containing the results (binary).\n\n**Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format.\n\n**Default:** `json`\n" }, { "name": "debug", "value": "", "type": "query", "description": "Whether to force a successful response to include debug information.\n\n**Notes:**\n\n- Debug information can only appear in responses in the JSON format (see the `format` parameter).\n- Avoid setting this parameter to `true` in production, as it has a negative impact on query performance.\n\n**Default:** `false`\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "visitorId", "value": "", "type": "query", "description": "A GUID which represents the current user, who can either be authenticated or anonymous.\n\n`visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`.\n\nFor older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.\n" }, { "name": "isGuestUser", "value": "", "type": "query", "description": "Whether the current user is anonymous.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query.\n\n**Default:** `false`\n" }, { "name": "language", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead." }, { "name": "mlParameters", "value": "", "type": "query", "description": "A map of options to pass to the Coveo ML models associated with the request's target query pipeline.\n\n**Available parameters:**\n- `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`.\n- `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered.\n- `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration.\n- `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies.\n- `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`.\n- `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates.\n- `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input.\n- `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input.\n- `categoryFilter` (string): The name of a category of products to get recommendations for.\n- `brandFilter` (string): The name of a brand of products to get recommendations for.\n- `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `\"filters\": { \"originContext\": \"\", \"originLevel2\": \"\" }`.\n\n**Examples:**\n- `{\"num\": 3, \"padding\": \"trending\", \"maxActionsHistoryItemsToConsider\": 10, \"considerUserContext\": false}`\n- `{\"wordSelection\": \"wordsKept:4\"}`\n" }, { "name": "indexType", "value": "", "type": "query", "description": "The type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization.\n\n**Default:** `coveo`\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "maximumTimeoutMs", "value": "", "type": "query", "description": "The maximum number of milliseconds to allow the request to last before timing out.\n**Maximum:** 10000\n\n**Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.\n\n" }, { "name": "analytics", "value": "", "type": "query" }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Lists all values of the target field.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get Values for One Field", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/values", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Lists all values of the target field.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get Values for Several Field", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/values/batch", "params": [ { "name": "batch", "value": "", "type": "query", "description": "An array of parameters to retrieve field values.\n" }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "maximumAge", "value": "", "type": "query", "description": "The maximum age of cached results, in milliseconds.\n\nIf the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index.\n\nSuch cache hits improve responsiveness but still count as queries in your queries per month (QPM) count.\n\n**Note:** This parameter is automatically overridden when `staticQuery` is set to `true`.\n\n**Default:** `-1` (which corresponds to the internal default value (15 minutes)\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" }, { "name": "actionsHistory", "value": "", "type": "query", "description": "The query and page view actions previously made by the current user.\n\nCoveo Machine Learning event recommendations models use this information to provide contextually relevant output.\n\n**Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script." }, { "name": "recommendation", "value": "", "type": "query", "description": "The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)).\n\nCoveo Machine Learning event recommendations models may use this information to provide contextually relevant output.\n" }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "format", "value": "", "type": "query", "description": "The format of a successful response.\n\n- Use `json` to get the response in the JSON format.\n- Use `xlsx` to generate an Excel file containing the results (binary).\n\n**Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format.\n\n**Default:** `json`\n" }, { "name": "debug", "value": "", "type": "query", "description": "Whether to force a successful response to include debug information.\n\n**Notes:**\n\n- Debug information can only appear in responses in the JSON format (see the `format` parameter).\n- Avoid setting this parameter to `true` in production, as it has a negative impact on query performance.\n\n**Default:** `false`\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "visitorId", "value": "", "type": "query", "description": "A GUID which represents the current user, who can either be authenticated or anonymous.\n\n`visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`.\n\nFor older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.\n" }, { "name": "isGuestUser", "value": "", "type": "query", "description": "Whether the current user is anonymous.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query.\n\n**Default:** `false`\n" }, { "name": "language", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead." }, { "name": "mlParameters", "value": "", "type": "query", "description": "A map of options to pass to the Coveo ML models associated with the request's target query pipeline.\n\n**Available parameters:**\n- `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`.\n- `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered.\n- `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration.\n- `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies.\n- `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`.\n- `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates.\n- `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input.\n- `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input.\n- `categoryFilter` (string): The name of a category of products to get recommendations for.\n- `brandFilter` (string): The name of a brand of products to get recommendations for.\n- `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `\"filters\": { \"originContext\": \"\", \"originLevel2\": \"\" }`.\n\n**Examples:**\n- `{\"num\": 3, \"padding\": \"trending\", \"maxActionsHistoryItemsToConsider\": 10, \"considerUserContext\": false}`\n- `{\"wordSelection\": \"wordsKept:4\"}`\n" }, { "name": "indexType", "value": "", "type": "query", "description": "The type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization.\n\n**Default:** `coveo`\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "maximumTimeoutMs", "value": "", "type": "query", "description": "The maximum number of milliseconds to allow the request to last before timing out.\n**Maximum:** 10000\n\n**Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.\n\n" }, { "name": "analytics", "value": "", "type": "query" }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Lists all values of the target field.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get Values for Several Field", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/values/batch", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." }, { "name": "analytics", "value": "", "type": "query" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Lists all values of the target field.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get HTML Item Preview", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/html", "params": [ { "name": "uniqueId", "value": "", "type": "query", "description": "The uniqueId of the document. Exactly one of uniqueId or primaryId is required.\n\n**Deprecated:** Use `primaryId` instead." }, { "name": "primaryId", "value": "", "type": "query", "description": "The primaryId of the document. Exactly one of uniqueId or primaryId is required." }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "findNext", "value": "", "type": "query" }, { "name": "findPrevious", "value": "", "type": "query" }, { "name": "page", "value": "", "type": "query" }, { "name": "enableNavigation", "value": "", "type": "query" }, { "name": "requestedOutputSize", "value": "", "type": "query", "description": "The approximate number of bytes to request in the HTML response. **Default:** `0`, meaning that the entire HTML document is requested." }, { "name": "q", "value": "", "type": "query", "description": "The basic query expression, typically the keywords entered by the end user in a query box.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `queryText` field of that event should be set to the `q` value of the corresponding query.\n" }, { "name": "aq", "value": "", "type": "query", "description": "The advanced query expression, typically generated by code (e.g., when toggling facet values).\n\n**Note:** When logging a **Search** usage analytics event for a query, the `advancedQuery` field of that event should be set to the `aq` value of the corresponding query (for reporting purposes).\n" }, { "name": "cq", "value": "", "type": "query", "description": "The constant query expression, typically populated with expressions that must apply to all queries sent from a specific search interface (e.g., from a specific tab). Once evaluated, the result sets of those expressions are kept in a special cache.\n\n**Tip:** Avoid including dynamic content in the constant query expression. Otherwise you risk filling up the cache with useless data, which can have a negative impact on performance.\n\n**Notes:**\n\n- Other parts of the query expression can also benefit from the index cache (see the `maximumAge` parameter). However, using the constant query expression allows you to explicitly cache specific result sets.\n- Temporal keywords (`now`, `today`, `yesterday`) in the constant query expression are only re-evaluated once per 3-4 minutes; therefore, you should avoid basing `cq` expressions on temporal keywords if you require split second accuracy.\n" }, { "name": "dq", "value": "", "type": "query", "description": "The disjunction query expression, typically populated by Coveo ML automatic relevance tuning models to ensure that relevant items are included in the query results. The disjunction query expression is merged with the other parts of the query expression using an `OR` operator. The resulting query expression is `(((q aq) OR (dq)) cq)`.\n" }, { "name": "lq", "value": "", "type": "query", "description": "The large query expression, typically populated with a case description, long textual query, or any other form of text that can help refine a query. The Coveo ML Intelligent Term Detection (ITD) feature can extract relevant keywords from the large query expression and inject those keywords in the basic query expression (see the `q` parameter).\n" }, { "name": "enableDidYouMean", "value": "", "type": "query", "description": "Whether to enable the _Did You Mean_ feature of the index, which populates the `queryCorrections` property of a successful response with keyword correction suggestions.\n\n**Notes:**\n\n- The Did You Mean feature only processes the basic query expression (see the `q` parameter).\n- When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array.\n- The Did You Mean feature will return no corrections when the query is processed by an automatic relevance tuning (ART) model whose Intelligent Term Detection (ITD) feature is enabled.\n\n**Default:** `false`\n" }, { "name": "mlDidYouMeanMaxCandidates", "value": "", "type": "query", "description": "The maximum number of Coveo ML Did You Mean candidates to request from the query suggestions model.\n\n**Default:** `3`\n" }, { "name": "mlDidYouMeanMinScore", "value": "", "type": "query", "description": "The minimum score a query suggestion may have to be allowed as a candidate for the Coveo ML query suggestions Did You Mean feature. For best results, value should typically be in range [`0.8`, `2`].\n\n**Default:** `1.0`\n" }, { "name": "mlDidYouMeanUseFacetCount", "value": "", "type": "query", "description": "Whether to use facet counts for the Coveo ML Did You Mean feature. Can improve results, but requires more processing.\n\n**Default:** `false`\n" }, { "name": "enableMLDidYouMean", "value": "", "type": "query", "description": "**Important:** This feature is still in an experimental state.\n\nWhether to enable the Coveo ML query suggestions _Did You Mean_ feature, which populates the `queryCorrections` property of a successful response with keyword correction suggestions.\n\n**Notes:**\n\n- The Coveo ML query suggestions Did You Mean feature only processes the basic query expression (see the `q` parameter).\n- When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array.\n\n**Default:** `false`\n" }, { "name": "partialMatch", "value": "", "type": "query", "description": "Whether to convert a basic expression containing at least `partialMatchKeywords` to a _partial match expression_, so that any item containing at least `partialMatchThreshold` of those keywords will match the expression.\n\nIf you do not set this parameter to `true`, an item must contain all of the basic expression keywords to match the expression.\n\n**Notes:**\n\n- This feature only applies to the basic expression (`q`) of a query, and to the basic `queryOverride` of its Group By operations.\n- When the `enableQuerySyntax` parameter is set to `true`, this feature has no effect on a basic expression containing advanced Coveo Cloud query syntax (field expressions, operators, etc.).\n\n**Default:** `false`\n" }, { "name": "partialMatchKeywords", "value": "", "type": "query", "description": "The minimum number of keywords that need to be present in a basic expression to convert it to a partial match expression.\n\n**Notes:**\n\n- This parameter has no meaning unless the `partialMatch` parameter is set to `true`.\n- Repeated keywords in a basic expression count as a single keyword.\n- Thesaurus expansions in a basic expression count towards the `partialMatchKeywords` count.\n- Stemming expansions **do not** count towards the `partialMatchKeywords` count.\n\nSee also the `partialMatchThreshold` parameter.\n\n**Default:** `5`\n" }, { "name": "partialMatchThreshold", "value": "", "type": "query", "description": "An absolute or relative value indicating the minimum number (rounded up) of partial match expression keywords an item must contain to match the expression.\n\nIf specified, the `partialMatchThreshold` value must either be:\n\n- a 32-bits unsigned integer (e.g., `3`),\n- a percentage value between 0% and 100% (e.g., `75%`),\n- the empty string, or\n- the `all` string.\n\nThe `\"\"` and the `all` value are both equivalent to `100%`.\n\n**Notes:**\n\n- This parameter has no meaning unless the `partialMatch` parameter is set to `true`.\n- A keyword and its stemming expansions count as a single keyword when evaluating whether an item meets the `partialMatchThreshold`.\n\nSee also the `partialMatchKeywords` parameter.\n\n**Examples:**\n\n- `3`\n- `75%`\n- `all`\n\n**Default:** `50%`" }, { "name": "lqPartialMatchMaxKeywords", "value": "", "type": "query", "description": "The maximum number of keywords from the large query expression (see the `lq` parameter) that will be included in the partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\n**Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSetting this parameter to a high value can negatively impact the performance of queries, while setting it too low can produce less relevant results.\n\nSee also the `lqPartialMatchThreshold` parameter.\n\n**Default**: `100`\n" }, { "name": "lqPartialMatchKeywords", "value": "", "type": "query", "description": "The minimum number of keywords that need to be present in the large query expression (see the `lq` parameter) to convert it to a partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\n**Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSee also the `lqPartialMatchThreshold` parameter.\n\n**Default**: `5`\n" }, { "name": "lqPartialMatchThreshold", "value": "", "type": "query", "description": "An absolute or relative value indicating the minimum number of partial match expression keywords an item must contain to match the large query expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression.\n\nIf specified, the `lqPartialMatchThreshold` value must either be:\n\n- a 32-bits unsigned integer (e.g., `3`),\n- a percentage value between 0% and 100% (e.g., `75%`),\n- the empty string (`\"\"`), or\n- the `all` string.\n\nThe `\"\"` and `all` values are both equivalent to `100%`.\n\n**Note:** This parameter applies when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`).\n\nSee also the `lqPartialMatchKeywords` parameter.\n\n**Examples:**\n\n- `3`\n- `75%`\n- `all`\n\n**Default:** `50%`\n" }, { "name": "wildcards", "value": "", "type": "query", "description": "Whether to enable the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing wildcard characters (`*`) to the possible matching keywords. See also the `questionMark` parameter.\n\nSee [Using Wildcards in Queries](https://docs.coveo.com/en/1580/).\n\n**Default:** `false`\n" }, { "name": "questionMark", "value": "", "type": "query", "description": "Whether to enable question mark characters (`?`) in the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing question mark characters (`?`) to the possible matching keywords.\n\n**Note:** Setting this parameter to `true` has no effect unless you also set the `wildcards` parameter to `true`.\n\nSee [Using Wildcards in Queries](https://docs.coveo.com/en/1580/).\n\n**Default:** `false`\n" }, { "name": "enableQuerySyntax", "value": "", "type": "query", "description": "Whether to interpret advanced Coveo Cloud query syntax as such in the basic query expression (see the `q` parameter). See also the `lowercaseOperators` parameter.\n\n**Default:** `true`\n" }, { "name": "lowercaseOperators", "value": "", "type": "query", "description": "Whether to treat the `AND`, `NEAR`, `NOT`, and `OR` keywords in the basic query expression (see the `q` parameter) as Coveo Cloud query syntax operators even if those keywords are in lowercase.\n\n**Note:** Setting this parameter to `true` has no effect unless you also set the `enableQuerySyntax` parameter to `true`.\n\n**Example:** If you set this parameter, and the `enableQuerySyntax` parameter to `true`, the index interprets the `near` keyword in the basic query expression `service center near me` as the `NEAR` Coveo Cloud query syntax operator.\n\n**Default:** `false`\n" }, { "name": "excerptLength", "value": "", "type": "query", "description": "The maximum length of result excerpts (in number of characters).\n\nAn *excerpt* is a segmented text generated at query time by the index from the body of an item. When a query is performed, the *excerpt* yields relevant item body sections in which the queried terms are highlighted.\n\nAn *excerpt* includes the most relevant sentences in which the queried keywords appear, in the order in which they appear in the item, up to the specified number of characters.\n\n**Note:** The maximum length you set using this parameter also applies to retrieved first sentences, if those are included in the results (see the `retrieveFirstSentences` parameter).\n\n**Default:** `200`\n" }, { "name": "retrieveFirstSentences", "value": "", "type": "query", "description": "Whether to include the first sentences of textual items in the query results.\n\nFirst sentences are typically useful when rendering result items such as emails, since the first few sentences of these kinds of items are often more relevant than a contextually generated excerpt (see the `excerptLength` parameter).\n\n**Note:** The maximum length of the retrieved sentences (in number of characters) is determined by the value of the `excerptLength` parameter.\n\n**Default:** `false`\n" }, { "name": "fieldsToInclude", "value": "", "type": "query", "description": "The names of the fields to include with each item in the query results. If specified, no other fields will be included.\n\n**Note:** If you specify both an array of fields to include and an array of fields to exclude (see the `fieldsToExclude` parameter), the `fieldsToExclude` parameter has no effect at all.\n\nIf you do not explicitly specify an array of values for this parameter (or for the `fieldsToExclude` parameter), each query result item will include all of its available fields.\n" }, { "name": "fieldsToExclude", "value": "", "type": "query", "description": "The names of the fields to exclude from the query results. All other fields will be included with each item in the query result.\n\n**Note:** If you specify both an array of fields to include (see the `fieldsToInclude` parameter) and an array of fields to exclude, the `fieldsToExclude` parameter has no effect at all.\n\nIf you do not explicitly specify an array of values for this parameter (or for the `fieldsToInclude` parameter), each query result item will include all of its available fields.\n" }, { "name": "groupBy", "value": "", "type": "query", "description": "The Group By operations to perform on the query results, typically to extract facets.\n" }, { "name": "facets", "value": "", "type": "query", "description": "The facet operations to perform on the query results.\n" }, { "name": "facetOptions", "value": "", "type": "query", "description": "The global configuration options that apply to all facet requests performed along with the query (see the `facets` query parameter).\n" }, { "name": "categoryFacets", "value": "", "type": "query", "description": "Data to easily query a hierarchical field using a path of hierarchical values.\n" }, { "name": "sortCriteria", "value": "", "type": "query", "description": "The criteria to use for sorting the query results.\n\n**Allowed values:**\n\n- `relevancy`: use standard index ranking factors (adjacency, TDIDF, etc.) and custom ranking expressions (QREs and QRFs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value.\n- `date ascending`/`date descending`: use the `@date` field to sort the query results. This field typically contains the last modification date of each item.\n- `qre`: use only custom ranking expressions (QREs and QRFs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value.\n- `nosort`: do not sort the query results; the index will return result items in an essentially random order.\n- `@[field] ascending`/`@[field] descending`: sort using the value of a specific sortable field (replace `[field]` by the target field name).\n\nYou can specify a list of comma-separated sort criteria which will be applied sequentially, i.e., if there's a tie on the 1st criterion, the API uses the 2nd criterion to break the tie.\nHowever, this only works when combining:\n- a `relevancy` criterion followed by one or more field or `date` criteria.\n- a `qre` criterion followed by one or more field or `date` criteria.\n- two or more field criteria (e.g., `@views descending,@likes descending`).\n- a single `date` criterion and one or more field criteria in any order (e.g., `@views descending, date ascending`).\n\n**Examples:**\n\n- `date ascending`\n- `@author ascending`\n- `date descending,@views descending,@likes descending`\n\n**Default:** `relevancy`\n" }, { "name": "rankingFunctions", "value": "", "type": "query", "description": "The array of [ranking functions](https://docs.coveo.com/en/1448/) to execute on each query result item.\n\nThe result of a ranking function is added to the result score, which can affect sorting (see the `Relevancy` and `qre` values of the `sortCriteria` parameter).\n" }, { "name": "queryFunctions", "value": "", "type": "query", "description": "The array of [query functions](https://docs.coveo.com/en/1451/) to execute on each query result item.\n\nThe result of a query function is stored in a temporary, dynamic field created at query time.\n" }, { "name": "firstResult", "value": "", "type": "query", "description": "The 0-based position of the first result to return in the non-paginated result set.\n\nAlong with the `numberOfResults` parameter, this allows you to retrieve a specific page of result items.\n\n**Note:** This can't be greater than the `maximumResults` value configured for your index. By default, `maximumResults` is set to 5,000 items.\n\n**Default:** `0`\n" }, { "name": "numberOfResults", "value": "", "type": "query", "description": "The number of results to return.\n\nAlong with the `firstResult` parameter, this allows you to retrieve a specific page of result items.\n\nThis parameter also defines the maximum number of results which can be returned by the Coveo ML Recommendations feature.\n\n**Note:** The maximum `numberOfResults` value is 2,000 items.\n\n**Default:** `10`\n" }, { "name": "enableDuplicateFiltering", "value": "", "type": "query", "description": "Whether to filter out duplicates, so that items resembling one another only appear once in the query results.\n\n**Notes:**\n- Two items must be at least 85% similar to one another to be considered duplicates.\n- When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set.\n- Enabling this feature can make the total result count less precise, since only results up to those being retrieved (see the `firstResult` and `numberOfResults` parameters) are submitted to duplicate filtering.\n- Duplicate filtering and [result folding](https://docs.coveo.com/en/1466/) are mutually exclusive.\n\n**Default:** `false`\n" }, { "name": "filterField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to group items into distinct folded query results (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value is identical for all items to group under the same folded query result.\n\nSee also the `parentField`, `childField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "parentField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to be able to identify an item as a parent in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value can uniquely identify each item. All items whose `childField` value is identical to the `parentField` value of another item are considered children of that other item.\n\nSee also the `filterField`, `childField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- In the index, the values of the `parentField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail.\n- The values of the `parentField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index).\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "childField", "value": "", "type": "query", "description": "The `@`-prefixed name of the field to use to be able to identify an item as a child of another item in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nUse a field whose value points to the `parentField` value of the intended parent. Whenever an item is a child of another item, its `childField` value must be identical to the `parentField` value of that other item.\n\nSee also the `filterField`, `parentField`, and `filterFieldRange` parameters.\n\n**Notes:**\n\n- In the index, the values of the `childField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail.\n- The values of the `childField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index).\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n" }, { "name": "filterFieldRange", "value": "", "type": "query", "description": "The maximum number of items to include in the `childResults` array of a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)).\n\nSee also the `filterField`, `parentField`, and `childField`.\n\n**Notes:**\n\n- Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.\n\n**Default:** `5`\n" }, { "name": "summaryLength", "value": "", "type": "query", "description": "The length of the automatically generated item summary.\n\nThe Coveo Platform uses a linguistic algorithm that relies on term frequency and proximity to generate an item *summary* made of sentences identified to be the most important ones in the item.\n\nThis *summary* is generated independently from the query, as opposed to a result item *excerpt*, which is generated based on query keywords.\n\n**Default:** `0`\n" }, { "name": "sortField", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `sortCriteria` parameter along with the `@[field] ascending/@[field] descending` syntax instead." }, { "name": "disableQuerySyntax", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `enableQuerySyntax` parameter instead." }, { "name": "staticQuery", "value": "", "type": "query", "description": "Whether to execute this query in a way that does not count against the allowed number of queries per month of a Coveo Cloud organization (QPM), but may produce cached/outdated query results (see [Rendering Static Content Using Persistent Queries](https://docs.coveo.com/en/1009/)).\n\n**Note:** Setting this parameter to `true` overwrites the `maximumAge` parameter value for this query.\n\n**Default:** `false`\n" }, { "name": "userActions", "value": "", "type": "query", "description": "The parameters allowing user actions to be retrieved in query results." }, { "name": "commerce", "value": "", "type": "query", "description": "The parameters for Coveo for Commerce." }, { "name": "dictionaryFieldContext", "value": "", "type": "query", "description": "A key-value store where each pair corresponds to the name of a dictionary field to query, along with the key to target within that field.\n\n**Example:** Suppose that in your index, the `@price` dictionary field contains different values for its `storeA` and `storeB` keys. Including `\"dictionaryFieldContext\": { \"price\": \"storeA\" }` in the query means that any part of the query expression that targets the `@price` field will in fact only query the `storeA` values of that field.\n\n**Note:** This cannot be used at the same time as `fieldAliases`.\n\n**Note:** This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`dictionaryFieldContext`](https://docs.coveo.com/en/56/#dictionaryfieldcontext-object-optional).\n" }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "maximumAge", "value": "", "type": "query", "description": "The maximum age of cached results, in milliseconds.\n\nIf the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index.\n\nSuch cache hits improve responsiveness but still count as queries in your queries per month (QPM) count.\n\n**Note:** This parameter is automatically overridden when `staticQuery` is set to `true`.\n\n**Default:** `-1` (which corresponds to the internal default value (15 minutes)\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" }, { "name": "actionsHistory", "value": "", "type": "query", "description": "The query and page view actions previously made by the current user.\n\nCoveo Machine Learning event recommendations models use this information to provide contextually relevant output.\n\n**Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script." }, { "name": "recommendation", "value": "", "type": "query", "description": "The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)).\n\nCoveo Machine Learning event recommendations models may use this information to provide contextually relevant output.\n" }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "format", "value": "", "type": "query", "description": "The format of a successful response.\n\n- Use `json` to get the response in the JSON format.\n- Use `xlsx` to generate an Excel file containing the results (binary).\n\n**Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format.\n\n**Default:** `json`\n" }, { "name": "debug", "value": "", "type": "query", "description": "Whether to force a successful response to include debug information.\n\n**Notes:**\n\n- Debug information can only appear in responses in the JSON format (see the `format` parameter).\n- Avoid setting this parameter to `true` in production, as it has a negative impact on query performance.\n\n**Default:** `false`\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "visitorId", "value": "", "type": "query", "description": "A GUID which represents the current user, who can either be authenticated or anonymous.\n\n`visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`.\n\nFor older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.\n" }, { "name": "isGuestUser", "value": "", "type": "query", "description": "Whether the current user is anonymous.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query.\n\n**Default:** `false`\n" }, { "name": "language", "value": "", "type": "query", "description": "This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead." }, { "name": "mlParameters", "value": "", "type": "query", "description": "A map of options to pass to the Coveo ML models associated with the request's target query pipeline.\n\n**Available parameters:**\n- `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`.\n- `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered.\n- `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration.\n- `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies.\n- `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`.\n- `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates.\n- `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input.\n- `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input.\n- `categoryFilter` (string): The name of a category of products to get recommendations for.\n- `brandFilter` (string): The name of a brand of products to get recommendations for.\n- `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `\"filters\": { \"originContext\": \"\", \"originLevel2\": \"\" }`.\n\n**Examples:**\n- `{\"num\": 3, \"padding\": \"trending\", \"maxActionsHistoryItemsToConsider\": 10, \"considerUserContext\": false}`\n- `{\"wordSelection\": \"wordsKept:4\"}`\n" }, { "name": "indexType", "value": "", "type": "query", "description": "The type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization.\n\n**Default:** `coveo`\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "maximumTimeoutMs", "value": "", "type": "query", "description": "The maximum number of milliseconds to allow the request to last before timing out.\n**Maximum:** 10000\n\n**Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.\n\n" }, { "name": "analytics", "value": "", "type": "query" }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get HTML Item Preview", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/html", "params": [ { "name": "uniqueId", "value": "", "type": "query", "description": "The unique ID of the document." }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." }, { "name": "findNext", "value": "", "type": "query" }, { "name": "findPrevious", "value": "", "type": "query" }, { "name": "page", "value": "", "type": "query" }, { "name": "enableNavigation", "value": "", "type": "query" }, { "name": "requestedOutputSize", "value": "", "type": "query", "description": "The approximate number of bytes to request in the HTML response. **Default:** `0`, meaning that the entire HTML document is requested." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get Item in Text Format", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/text", "params": [ { "name": "primaryId", "value": "", "type": "query", "description": "The primaryId of the document. Exactly one of uniqueId or primaryId is required." }, { "name": "uniqueId", "value": "", "type": "query", "description": "The uniqueId of the document. Exactly one of uniqueId or primaryId is required.\n\n**Deprecated:** Use `primaryId` instead." }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get Item Data Stream", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/datastream", "params": [ { "name": "dataStream", "value": "", "type": "query", "description": "The name of the data stream to request." }, { "name": "primaryId", "value": "", "type": "query", "description": "The primaryId of the document. Exactly one of uniqueId or primaryId is required." }, { "name": "uniqueId", "value": "", "type": "query", "description": "The uniqueId of the document. Exactly one of uniqueId or primaryId is required.\n\n**Deprecated:** Use `primaryId` instead." }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." }, { "name": "contentType", "value": "", "type": "query", "description": "The MIME type of the data stream to request.\n\n**Default:** `application/binary`" }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Get Item in JSON Format", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/document", "params": [ { "name": "primaryId", "value": "", "type": "query", "description": "The primaryId of the document. Exactly one of uniqueId or primaryId is required." }, { "name": "uniqueId", "value": "", "type": "query", "description": "The uniqueId of the document. Exactly one of uniqueId or primaryId is required.\n\n**Deprecated:** Use `primaryId` instead." }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "pipeline", "value": "", "type": "query", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n- When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491).\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, { "name": "searchHub", "value": "", "type": "query", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n\nSee also the `tab` parameter.\n" }, { "name": "viewAllContent", "value": "", "type": "query", "description": "Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege." }, { "name": "locale", "value": "", "type": "query", "description": "The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object.\n\n**Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).\n" }, { "name": "timezone", "value": "", "type": "query", "description": "The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items.\n\nIf not specified, the default time zone of the server hosting the index is used.\n\n**Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.\n" }, { "name": "indexToken", "value": "", "type": "query", "description": "The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter.\n\nIf you do not specify an `indexToken` (or `index`) value, any index mirror could be used.\n\n**Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "index", "value": "", "type": "query", "description": "The identifier of the index mirror to forward the request to. See also the `indexToken` parameter.\n\nIf you do not specify an `index` (or `indexToken`) value, any index mirror could be used.\n\n**Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).\n" }, { "name": "logicalIndex", "value": "", "type": "query", "description": "The identifier for a logical group of indexes that have been configured to include documents from the same sources.\n\nIf you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.\n" }, { "name": "tab", "value": "", "type": "query", "description": "The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `\"default\"` string, if no `tab` value was specified in the query).\n\n See also the `searchHub` parameter.\n" }, { "name": "referrer", "value": "", "type": "query", "description": "The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value).\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified.\n\nSee also the `context` parameter.\n" }, { "name": "context", "value": "", "type": "query", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object.\n\n**Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`).\n\nSee also the `referrer` parameter.\n\n**Example** `{\"userAgeRange\":\"25-35\",\"userRoles\":[\"PremiumCustomer\",\"ProductReviewer\"]}`\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Create Search Token", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/token", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Creates a temporary [JSON web token](https://jwt.io/) which can be used to impersonate one or several security identities when authenticating a query (see [Search Token Authentication](https://docs.coveo.com/en/56/)).\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"IMPERSONATE_SEARCH_API\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Log in to Authentication Provider", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/login/:provider", "params": [ { "name": "provider", "value": "", "type": "path", "description": "The name of the Search API authentication provider to log in to." }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Directs the browser to URI of the target Search API authentication provider, and back to the origin search page once the authentication process is complete. This authentication provider must be properly configured in the Coveo Cloud organization.\n
\nPrivilege(s) required\n\n```json\n\n```\n
" }, { "info": { "name": "Log in to Authentication Provider", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/login/:provider", "params": [ { "name": "provider", "value": "My SharePoint Server", "type": "path", "description": "The name of the Search API authentication provider to log in to." }, { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Directs the browser to URI of the target Search API authentication provider, and back to the origin search page once the authentication process is complete. This authentication provider must be properly configured in the Coveo Cloud organization.\n
\nPrivilege(s) required\n\n```json\n\n```\n
" }, { "info": { "name": "List Available Query Extensions", "type": "http" }, "http": { "method": "GET", "url": "https://platform.cloud.coveo.com/rest/search/v2/extensions", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Update User Rating", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/rating", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." }, { "name": "rating", "value": "", "type": "query", "description": "The rate to be updated." }, { "name": "uniqueId", "value": "", "type": "query", "description": "The unique ID of the document." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "The Coveo Cloud V2 platform does not support collaborative rating. Therefore, this operation is obsolete in Coveo Cloud V2.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" }, { "info": { "name": "Find Fields from Results of a Query Expression", "type": "http" }, "http": { "method": "POST", "url": "https://platform.cloud.coveo.com/rest/search/v2/fields/find", "params": [ { "name": "organizationId", "value": "mycoveocloudv2organization", "type": "query", "description": "The unique identifier of the target Coveo Cloud organization.\n\nSpecifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://platform.cloud.coveo.com/oauth/authorize", "accessTokenUrl": "https://platform.cloud.coveo.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Find fields name from results matching the `q` expression.\n
\nPrivilege(s) required\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"EXECUTE_QUERY\",\"type\":\"ENABLE\",\"targetId\":\"*\"},\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"VIEW_ALL_CONTENT\",\"type\":\"ENABLE\",\"targetId\":\"*\"}\n```\n
" } ] } ], "bundled": true }