openapi: 3.0.1 info: title: Coveo Activity Activities Search V3 API description: API for Coveo Platform termsOfService: https://www.coveo.com/en/support/terms-agreements contact: name: Coveo url: https://connect.coveo.com/s/discussions version: 1.0.0 servers: - url: https://platform.cloud.coveo.com description: Coveo public API endpoint security: - oauth2: - full tags: - name: Search V3 x-displayName: Search V3 paths: /rest/search/v3: post: tags: - Search V3 summary: Send Search Request description: 'See [Performing a Query](https://docs.coveo.com/en/1445/).
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' operationId: searchUsingPostV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/ViewAllContentQuery' requestBody: content: application/json: schema: $ref: '#/components/schemas/RestQueryParameters' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestQueryResponse' application/xml: schema: $ref: '#/components/schemas/RestQueryResponse' application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: schema: $ref: '#/components/schemas/RestQueryResponse' security: - oauth2: - full /rest/search/v3/facet: post: tags: - Search V3 summary: Send Facet Search Request description: 'Executes a facet search request.
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' operationId: facetSearchV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/ViewAllContentQuery' requestBody: content: application/json: schema: $ref: '#/components/schemas/RestFacetSearchParameters' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestFacetSearchResponse' security: - oauth2: - full /rest/search/v3/plan: post: tags: - Search V3 summary: Plan Search Execution description: 'See [Performing a Query](https://docs.coveo.com/en/1445/).
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' operationId: planSearchUsingPostV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/ViewAllContentQuery' requestBody: content: application/json: schema: $ref: '#/components/schemas/RestQueryParameters' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PlanSearchResponse' security: - oauth2: - full /rest/search/v3/querySuggest: post: tags: - Search V3 summary: Request Query Suggestions description: 'See [Getting Query Suggestions](https://docs.coveo.com/en/1459/).
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' operationId: querySuggestPostV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' requestBody: content: application/json: schema: $ref: '#/components/schemas/RestQuerySuggestParameters' responses: '200': description: The suggested completions for the query. content: application/json: schema: $ref: '#/components/schemas/QuerySuggestResponse' security: - oauth2: - full /rest/search/v3/values: post: tags: - Search V3 summary: Get Values for One Field description: 'Lists all values of the target field.
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' operationId: valuesPostV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/ViewAllContentQuery' requestBody: content: application/json: schema: $ref: '#/components/schemas/RestListFieldValuesParameter' required: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListFieldValuesResponse' security: - oauth2: - full /rest/search/v3/values/batch: post: tags: - Search V3 summary: Get Values for Several Field description: 'Lists all values of the target field.
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' operationId: valuesBatchPostV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/ViewAllContentQuery' - $ref: '#/components/parameters/AnalyticsRequestParameters' requestBody: content: application/json: schema: $ref: '#/components/schemas/RestListFieldValuesBatchParameter' required: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListFieldValuesBatchResponse' security: - oauth2: - full /rest/search/v3/document: get: tags: - Search V3 summary: Get Item in JSON Format operationId: documentV3 parameters: - name: primaryId in: query description: The primary ID of the document. schema: type: string - name: uniqueId in: query description: '**Deprecated:** Use `primaryId` instead. The unique ID of the document.' deprecated: true schema: type: string - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/Pipeline' - $ref: '#/components/parameters/SearchHub' - $ref: '#/components/parameters/ViewAllContentQuery' - $ref: '#/components/parameters/Locale' - $ref: '#/components/parameters/Timezone' - $ref: '#/components/parameters/IndexToken' - $ref: '#/components/parameters/Index' - $ref: '#/components/parameters/LogicalIndex' - $ref: '#/components/parameters/Tab' - $ref: '#/components/parameters/Referrer' - $ref: '#/components/parameters/Context' responses: '200': description: The document matching this uniqueId. content: application/json: schema: $ref: '#/components/schemas/RestQueryResult' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' security: - oauth2: - full description: '
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' /rest/search/v3/datastream: get: tags: - Search V3 summary: Get Item Data Stream operationId: dataStreamV3 parameters: - name: dataStream in: query description: The name of the data stream to request. required: true schema: type: string - name: primaryId in: query description: The primary ID of the document. schema: type: string - name: uniqueId in: query description: '**Deprecated:** Use `primaryId` instead. The unique ID of the document.' deprecated: true schema: type: string - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/ViewAllContentQuery' - name: contentType in: query description: 'The MIME type of the data stream to request. **Default:** `application/binary`' schema: type: string - $ref: '#/components/parameters/Pipeline' - $ref: '#/components/parameters/SearchHub' - $ref: '#/components/parameters/Locale' - $ref: '#/components/parameters/Timezone' - $ref: '#/components/parameters/IndexToken' - $ref: '#/components/parameters/Index' - $ref: '#/components/parameters/LogicalIndex' - $ref: '#/components/parameters/Tab' - $ref: '#/components/parameters/Referrer' - $ref: '#/components/parameters/Context' responses: '200': description: No response content: {} '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' security: - oauth2: - full description: '
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' /rest/search/v3/html: post: tags: - Search V3 summary: Get HTML Item Preview operationId: htmlPostV3 parameters: - name: uniqueId in: query description: The uniqueId of the document. Exactly one of uniqueId or primaryId is required. schema: type: string - name: primaryId in: query description: The primaryId of the document. Exactly one of uniqueId or primaryId is required. schema: type: string - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/ViewAllContentQuery' - name: findNext in: query schema: type: integer format: int32 - name: findPrevious in: query schema: type: integer format: int32 - name: page in: query schema: type: integer format: int32 - name: enableNavigation in: query schema: type: boolean - name: requestedOutputSize in: query description: The approximate number of bytes to request in the HTML response. **Default:** `0`, meaning that the entire HTML document is requested. schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: '#/components/schemas/RestQueryParameters' required: true responses: '200': description: No response content: {} '429': $ref: '#/components/responses/TooManyRequests' security: - oauth2: - full description: '
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' /rest/search/v3/text: get: tags: - Search V3 summary: Get Item in Text Format operationId: textV3 parameters: - name: primaryId in: query description: The primary ID of the document. schema: type: string - name: uniqueId in: query description: '**Deprecated:** Use `primaryId` instead. The unique ID of the document.' deprecated: true schema: type: string - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/Pipeline' - $ref: '#/components/parameters/SearchHub' - $ref: '#/components/parameters/ViewAllContentQuery' - $ref: '#/components/parameters/Locale' - $ref: '#/components/parameters/Timezone' - $ref: '#/components/parameters/IndexToken' - $ref: '#/components/parameters/Index' - $ref: '#/components/parameters/LogicalIndex' - $ref: '#/components/parameters/Tab' - $ref: '#/components/parameters/Referrer' - $ref: '#/components/parameters/Context' responses: '200': description: No response content: {} '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' security: - oauth2: - full description: '
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' /rest/search/v3/fields: get: tags: - Search V3 summary: List All Fields description: 'Gets all fields in the target Coveo Cloud organization.
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"} ```
' operationId: fieldsV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' - $ref: '#/components/parameters/Pipeline' - $ref: '#/components/parameters/SearchHub' - $ref: '#/components/parameters/ViewAllContentQuery' - $ref: '#/components/parameters/Locale' - $ref: '#/components/parameters/Timezone' - $ref: '#/components/parameters/IndexToken' - $ref: '#/components/parameters/Index' - $ref: '#/components/parameters/LogicalIndex' - $ref: '#/components/parameters/Tab' - $ref: '#/components/parameters/Referrer' - $ref: '#/components/parameters/Context' responses: '200': description: The list of fields available for this organization. content: application/json: schema: $ref: '#/components/schemas/ListFieldsResponse' security: - oauth2: - full /rest/search/v3/fields/find: post: tags: - Search V3 summary: Find Fields from Results of a Query Expression description: 'Find fields name from results matching the `q` expression.
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","type":"ENABLE","targetId":"*"}, {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"VIEW_ALL_CONTENT","type":"ENABLE","targetId":"*"} ```
' operationId: findFieldsFromExpressionV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' requestBody: description: The query to get the fields from. content: application/json: schema: $ref: '#/components/schemas/FindFieldsRequest' responses: '200': description: The list of fields referenced by the requested expression. content: application/json: schema: $ref: '#/components/schemas/FindFieldsResponse' security: - oauth2: - full /rest/search/v3/token: post: tags: - Search V3 summary: Create Search Token description: '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/)).
Privilege(s) required ```json {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"IMPERSONATE_SEARCH_API","type":"ENABLE","targetId":"*"} ```
' operationId: tokenV3 parameters: - $ref: '#/components/parameters/OrganizationIdQuery' requestBody: description: The search token information. content: application/json: schema: $ref: '#/components/schemas/RestTokenParams' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestTokenResponse' security: - oauth2: - full /rest/search/v3/login/{provider}: post: tags: - Search V3 summary: Log in to Authentication Provider description: '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.
Privilege(s) required ```json ```
' operationId: loginProviderPostV3 parameters: - name: provider in: path description: The name of the Search API authentication provider to log in to. example: My SharePoint Server required: true schema: type: string - $ref: '#/components/parameters/OrganizationIdQuery' responses: '200': description: No response content: {} security: - oauth2: - full components: schemas: RestException: required: - code type: object properties: code: type: string context: type: string RestQueryCorrection: required: - correctedQuery - wordCorrections type: object properties: correctedQuery: type: string description: The resulting query expression correction suggestion. example: Coveo Cloud V2 platform wordCorrections: type: array description: The word correction suggestions. items: $ref: '#/components/schemas/RestWordCorrection' RestFacetSearchResultValue: required: - count - displayValue - rawValue type: object properties: displayValue: type: string description: The custom facet value display name, as specified in the `captions` argument of the facet search request. example: Orange rawValue: type: string description: The original facet value, as retrieved from the field in the index. example: '#FF8000' count: type: integer description: An estimate number of result items matching both the current query and the filter expression that would get generated if the facet value were selected. format: int64 LogicalIndex: type: string nullable: true description: 'The identifier for a logical group of indexes that have been configured to include documents from the same sources. If you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes. ' example: webcontentonly default: default Timezone: type: string nullable: true 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. If not specified, the default time zone of the server hosting the index is used. **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. ' example: America/New_York Tab: type: string nullable: true 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. Coveo Machine Learning models use this information to provide contextually relevant output. **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). See also the `searchHub` parameter. ' example: ForumTab RestFacetRequestHierarchical: allOf: - $ref: '#/components/schemas/RestFacetRequestBase' - $ref: '#/components/schemas/RestFacetRequestHierarchicalBase' RestFacetRequestSpecificSortCriteriaExplicitAlphanumericNatural: type: object required: - type properties: type: type: string enum: - alphanumericNatural description: 'Sort values in ascending or descending alphanumeric order using [natural sorting](https://en.wikipedia.org/wiki/Natural_sort_order). ' order: type: string enum: - ascending - descending default: ascending description: '**Default:** ascending ' RestFacetValueNumericalRangeBase: type: object required: - start - end properties: start: anyOf: - type: integer format: int64 example: 0 description: The value to start the range at. - type: number format: double example: 0 description: The value to start the range at. end: anyOf: - type: integer format: int64 example: 100 description: The value to end the range at. Must be greater (or later) than the `start` value. - type: number format: double example: 100 description: The value to end the range at. Must be greater (or later) than the `start` value. RestGroupBy: required: - field type: object properties: field: type: string description: 'The name of the field on which to perform the Group By operation. The operation returns a Group By value for each distinct value of this field found in the query result items. **Note:** You must ensure that the **Facet** option is enabled for this field in your index (see [Manage fields](https://docs.coveo.com/en/1833/)).' example: '@author' allowedValues: type: array description: "The field values allowed in the Group By operation results. You can use trailing wildcards (`*`) to include ranges of values.\n\nSee also the `completeFacetWithStandardValues` Group By operation parameter.\n\nIf you do not explicitly specify an array of `allowedValues`, or if you specify an empty array, all field values are allowed.\n\n**Example:**\n```\n[\n \"Anonymous\",\n \"Bob Jones\",\n \"Carrie Green\",\n \"David Allen\"\n]\n```" example: - Anonymous - Bob Jones - Carrie Green - David Allen items: type: string allowedValuesPatternType: type: string description: 'The type of pattern being used in the allowed field values. See also the `allowedValues` Group By operation parameter. If you do not explicitly specify a pattern type, the legacy pattern is used by default, which only support trailing wildcards.' example: wildcards enum: - legacy - wildcards - regex - editdistance - phonetic maximumNumberOfValues: type: integer description: 'The maximum number of values the Group By operation should return. **Default:** `10`' format: int32 example: 5 default: 10 minimum: 0 completeFacetWithStandardValues: type: boolean description: 'Whether to complete the Group By operation result set with standard values. If you set this parameter to `true` and the number of specified `allowedValues` is lower than the `maximumNumberOfValues`, the Group By operation also attempts to returns standard values until the result set contains the `maximumNumberOfValues`. **Default:** `false`' example: true default: false injectionDepth: type: integer description: 'The maximum number of query result items to scan for Group By values. **Note:** Specifying a high `injectionDepth` value can negatively impact query performance. **Default:** `1000`' format: int32 example: 1500 default: 1000 rangeValues: type: array description: 'The ranges for which to generate Group By values. **Notes:** - Specifying `rangeValues` only makes sense when the Group By `field` references a numeric or date field in the index. - You can set the `generateAutomaticRanges` Group By parameter to `true` rather than explicitly specifying `rangeValues` (unless the Group By `field` was generated by a query function).' example: [] items: $ref: '#/components/schemas/RestRangeValue' generateAutomaticRanges: type: boolean description: 'Whether the index should automatically create range values. **Tip:** If you set this parameter to `true`, you should ensure that the **Use cache for numeric queries** option is enabled for the Group By `field` in your index in order to speed up automatic range evaluation (see [Manage fields](https://docs.coveo.com/en/1833/)). **Notes:** - Setting `generateAutomaticRanges` to `true` only makes sense when the Group By `field` references a numeric or date field in the index. - The index cannot automatically generate range values of a field generated by a query function. In such cases, you must rather use the `rangeValues` Group By parameter. - Automatic range generation will fail if the referenced `field` is dynamically generated by a query function. **Default:** `false`' example: false default: false sortCriteria: type: string description: 'The criterion to use when sorting the Group By operation results. **Allowed values:** - `score`: sort using the score value which is computed from the number of occurrences of a field value, and also from the position where query result items with this field value appear in the ranked query result set. When using this sort criterion, a field value with 100 occurrences might appear after one with only 10 occurrences, if the occurrences of the latter field value tend to appear higher in the ranked query result set. - `occurrences`: sort by number of occurrences, with field values having the highest number of occurrences appearing first. - `alphaAscending`/`alphaDescending`: sort field values alphabetically. - `alphaAscendingNatural`/`alphaDescendingNatural`: sort field values alphabetically using [natural sorting](https://en.wikipedia.org/wiki/Natural_sort_order). - `computedFieldAscending`/`computedFieldDescending`: sort on the value of the first computed field for each Group By operation result (see the `ComputedFields` Group By parameter). - `chiSquare`: sort based on the relative frequency of field values in the query result set compared to their frequency in the entire index. This means that a field value that does not appear often in the index, but does appear often in the query result set will tend to appear higher. - `noSort`: do not sort the results of the Group By operation. The field values will be appear in a random order. **Default:** `score`' example: ComputedFieldDescending default: score computedFields: type: array description: 'The computed fields to evaluate for each Group By value. A computed field stores the result of an aggregate operation performed on the values of a specific numerical field for all the query result items that share the same Group By `field` value.' items: $ref: '#/components/schemas/RestComputedField' queryOverride: type: string description: 'The query expression that should override the basic query expression on which the Group By operation is being performed (see the `q` query parameter). **Note:** If _any_ query override parameter (e.g., `queryOverride`, `advancedQueryOverride`, etc.) is set in a Group By operation, **all** original parts of the query expression (i.e., `q`, `aq`, `cq`, and `dq`) will be ignored.' example: Coveo Cloud V2 platform advancedQueryOverride: type: string description: 'The query expression that should override the advanced query expression on which the Group By operation is being performed (see the `aq` query parameter). **Note:** If _any_ query override parameter (e.g., `queryOverride`, `advancedQueryOverride`, etc.) is set in a Group By operation, **all** original parts of the query expression (i.e., `q`, `aq`, `cq`, and `dq`) will be ignored.' example: '@year==2017' constantQueryOverride: type: string description: 'The query expression that should override the constant query expression on which the Group By operation is being performed (see the `cq` query parameter). **Note:** If _any_ query override parameter (e.g., `queryOverride`, `advancedQueryOverride`, etc.) is set in a Group By operation, **all** original parts of the query expression (i.e., `q`, `aq`, `cq`, and `dq`) will be ignored.' example: '@filetype==forumpost' disjunctionQueryOverride: type: string description: 'The query expression that should override the disjuntion query expression on which the Group By operation is being performed (see the `dq` query parameter). **Note:** If _any_ query override parameter (e.g., `queryOverride`, `advancedQueryOverride`, etc.) is set in a Group By operation, **all** original parts of the query expression (i.e., `q`, `aq`, `cq`, and `dq`) will be ignored.' example: '@date=2016-12-01..2016-12-31' lookupField: type: string description: 'This property is exposed for backward compatibility reasons. The issues this property was used as a workaround for do not exist in the Coveo Cloud V2 platform. The name of an additional field whose value must be retrieved.' deprecated: true thoroughLookup: type: boolean description: 'This parameter is exposed for backward compatibility reasons. The issues this parameter was used as a workaround for do not exist in the Coveo Cloud V2 platform. Whether to scan for lookup values.' default: false deprecated: true filterFacetCount: type: boolean description: 'Whether to exclude folded result parents when estimating the result count for each facet value. **Note:** The target folding field must be a facet field with the **Use cache for nested queries** options enabled (see [Manage fields](https://docs.coveo.com/en/1833/)). **Default:** `true`' default: true RestFacetValueHierarchical: allOf: - $ref: '#/components/schemas/RestFacetValueBase' - $ref: '#/components/schemas/RestFacetValueHierarchicalBase' RestTriggerResponse: required: - content - type type: object properties: type: type: string description: The type of Coveo Cloud query pipeline **Trigger** statement (see [Manage trigger rules](https://docs.coveo.com/en/3413/)). example: notify enum: - notify - execute - query - redirect content: {} RestFacetRequestSpecificBaseAllowedValues: oneOf: - $ref: '#/components/schemas/RestFacetRequestSpecificBaseAllowedValuesSimple' discriminator: propertyName: type mapping: simple: '#/components/schemas/RestFacetRequestSpecificBaseAllowedValuesSimple' Index: type: string nullable: true description: 'The identifier of the index mirror to forward the request to. See also the `indexToken` parameter. If you do not specify an `index` (or `indexToken`) value, any index mirror could be used. **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). ' example: myorg-nvoqun-Indexer1-pbi2nbuw RestFacetRequestDateRangeBase: type: object required: - type properties: type: type: string description: Request facet values that represent ranges of dates (e.g., 2019-07-01..2019-07-31, 2019-08-01..2019-08-01, etc.). enum: - dateRange currentValues: type: array items: $ref: '#/components/schemas/RestFacetValueDateRange' default: [] description: The values displayed by the facet in the search interface at the moment of the request. RestRankingFunction: required: - expression type: object properties: expression: type: string description: 'A mathematical expression to evaluate for each query result. The result of this expression for a given query result generates a boost which is then added to the ranking score of that query result. **Note:** Query ranking function expressions support the [ExprTk](http://www.partow.net/programming/exprtk/index.html) library syntax. However, the following statements are disabled: - `if`/`else` - `switch` - `while` - `repeat until` The following time constants are also available in query ranking functions: - `NOW`: A value corresponding to the precise moment when the query reaches the index. - `YEAR`: A value corresponding to the duration of a year (i.e., 365.25 days). - `WEEK`: A value corresponding to the duration of a week. - `DAY`: A value corresponding to the duration of a day. **Tip:** If your query ranking function expression references certain numeric fields, you should ensure that the **Use cache for computed fields** option is enabled for each of those fields in order to speed up evaluation (see [Manage fields](https://docs.coveo.com/en/1833/)).' example: -sqrt(dist(@longitude, @latitude, 46.8167, -71.2167)) normalizeWeight: type: boolean description: 'Whether to normalize the ranking score boosts resulting from the evaluation of this query ranking function using the standard index scale. Unless you want to completely override the index ranking and use the results of this query ranking function directly to boost the ranking scores of query results, you should set this to `true`. **Default:** `false`' example: true default: false modifier: type: integer description: 'The maximum boost this query ranking function can add to the ranking score of any given query result. This property only has a meaning if `normalizeWeight` is set to `true`. **Default:** `600`' format: int64 example: 100 default: 600 AQ: type: string description: 'The advanced query expression, typically generated by code (e.g., when toggling facet values). **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).' example: '@year==2017' ListFieldValuesBatchResponse: type: object properties: batch: type: array description: A list of values per requested field. items: type: array description: The values of a field. items: $ref: '#/components/schemas/ListFieldValuesValuesResponse' required: - batch example: batch: - - value: red lookupValue: red numberOfResults: 182 - value: green lookupValue: green numberOfResults: 142 RestFacetRequestSpecificSortCriteriaExplicitOccurences: type: object required: - type properties: type: type: string enum: - occurences description: 'Sort by number of occurrences, with field values having the highest number of occurrences appearing first. ' RestAllowedDictionaryFieldKeys: type: object maxProperties: 100 additionalProperties: type: array maxItems: 100 items: type: string maxLength: 255 pattern: ^\*$ description: 'The [dictionary field](https://docs.coveo.com/en/2036/) keys to allow access to when authenticating a query with this search token. This value controls which fields may be specified in the `fieldAliases` parameter of the query. The top-level keys of the parameter are the names of the dictionary fields to which to allow access. The values are arrays of field sub-keys to authorize. The special value `*` may be given to authorize all sub-keys of a field. **Note:** Currently only `*` is supported, which allows all sub-keys. **Note:** By default no fields are allowed. **Note:** This cannot be used at the same time as `dictionaryFieldContext`. **Example:** Suppose that in your index, the `@price` and `@size` dictionary fields contains different values for its `storea` and `storeb` keys. If the token has `"allowedDictionaryFieldKeys": { "price": ["*"] }`, a query can include `"fieldAliases": { "price_a": "price.storea" }` in the query but `"fieldAliases": { "size_a": "sizes.storea" }` will not work unless it is also included in the token.' example: price: - '*' size: - '*' RestFacetResultDomain: description: 'The domain of the facet. It represents the lowest and highest values possible for this facet. **Note:** This property is only populated when the facet is a range facet and `generateAutomaticRanges: true` was requested. ' type: object properties: start: description: The start of the domain. It represents the lowest value possible for this facet. anyOf: - type: string example: '2001-07-20T23:01:05' - type: integer format: int64 - type: number end: description: The end of the domain. It represents the highest value possible for this facet. anyOf: - type: string example: '2001-07-20T23:01:05' - type: integer format: int64 - type: number RestWordCorrection: required: - correctedWord - length - offset - originalWord type: object properties: offset: type: integer description: The offset (in number of characters) of the corrected word, from the beginning of the resulting query expression correction suggestion. format: int32 example: 15 length: type: integer description: The length (in number of characters) of the corrected word. format: int32 example: 8 originalWord: type: string description: The original, un-corrected word. example: plattfomr correctedWord: type: string description: The suggested word correction. example: platform RestFacetValueNumericalRange: allOf: - $ref: '#/components/schemas/RestFacetValueBase' - $ref: '#/components/schemas/RestFacetValueRangeBase' - $ref: '#/components/schemas/RestFacetValueNumericalRangeBase' RestCommonQueryParameters: type: object properties: pipeline: $ref: '#/components/schemas/Pipeline' maximumAge: $ref: '#/components/schemas/MaximumAge' searchHub: $ref: '#/components/schemas/SearchHub' tab: $ref: '#/components/schemas/Tab' referrer: $ref: '#/components/schemas/Referrer' context: $ref: '#/components/schemas/Context' actionsHistory: $ref: '#/components/schemas/ActionsHistory' recommendation: $ref: '#/components/schemas/Recommendation' locale: $ref: '#/components/schemas/Locale' timezone: $ref: '#/components/schemas/Timezone' format: $ref: '#/components/schemas/Format' debug: $ref: '#/components/schemas/Debug' indexToken: $ref: '#/components/schemas/IndexToken' visitorId: $ref: '#/components/schemas/VisitorId' language: $ref: '#/components/schemas/Language' mlParameters: $ref: '#/components/schemas/MlParameters' pipelineRuleParameters: $ref: '#/components/schemas/PipelineRuleParameters' indexType: $ref: '#/components/schemas/IndexType' index: $ref: '#/components/schemas/Index' logicalIndex: $ref: '#/components/schemas/LogicalIndex' maximumTimeoutMs: $ref: '#/components/schemas/MaximumTimeoutMs' analytics: $ref: '#/components/schemas/AnalyticsRequestParameters' commerce: $ref: '#/components/schemas/RestCommerceParameters' RestFacetRequestBase: type: object required: - field properties: field: type: string description: 'The name of the field on which to base the facet request. **Note:** Must reference a field whose **Facet** option is enabled (see [Manage fields](https://docs.coveo.com/en/1833/)).' example: author facetId: type: string description: 'The unique identifier of the facet in the search interface. **Note:** Must match `^[A-Za-z0-9-_]{1,60}$.' example: author-1 type: type: string description: 'The kind of values to request for the facet. **Allowed values:** - `specific`: Request facet values representing specific values (e.g., Alice Smith, Bob Jones, etc.). - `dateRange`: Request facet values representing ranges of dates (e.g., 2019-07-01..2019-07-31, 2019-08-01..2019-08-01, etc.). - `numericalRange`: Request facet values representing ranges of numbers (e.g., 0..10, 11..20, etc.). - `hierarchical`: Request facet values representing hierarchically structured categories (e.g., Electronics > Entertainment > Gaming Consoles;, Electronics > Computers > Laptops, etc.).' enum: - specific - dateRange - numericalRange - hierarchical default: specific filterFacetCount: type: boolean description: 'Whether to exclude folded result parents when estimating the result count for each facet value. **Note:** The target folding field must be a facet field with the **Use cache for nested queries** options enabled (see [Manage fields](https://docs.coveo.com/en/1833/)).' default: true injectionDepth: type: integer description: 'The maximum number of items to scan for facet values. **Note:** A high `injectionDepth` may negatively impact the facet request performance.' format: int32 default: 1000 isFieldExpanded: type: boolean description: Whether to make this facet request in the context of requesting more facet values. In most cases, to request more facet values, set `isFieldExpanded` to `true` and increase `numberOfResults`. default: false preventAutoSelect: type: boolean description: Whether to prevent Coveo ML from automatically selecting values. default: false resultsMustMatch: type: string enum: - atLeastOneValue - allValues description: 'Specifies how a result must match the selected values. **Allowed values:** - `atLeastOneValue`: A result will match if at least **one** of the corresponding facet values is selected. - `allValues`: A result will match if **all** corresponding facet values are selected. **Default:** `atLeastOneValue`' default: atLeastOneValue RestTokenResponse: type: object properties: token: type: string RestFacetRequestSpecificSortCriteriaString: type: string description: 'The sort criterion to apply to the returned facet values. **Allowed values**: - `score`: Sort values in descending score order. Facet value scores are based on the number of occurrences and their position in the ranked query result set. - `alphanumeric`: Sort values in ascending alphanumeric order. - `alphanumericNatural`: Sort values in ascending alphanumeric order using [natural sorting](https://en.wikipedia.org/wiki/Natural_sort_order). - `occurrences`: sort by number of occurrences, with field values having the highest number of occurrences appearing first. **Notes:** - The Coveo ML DNE feature only works with the `score` sort criterion. By default: - When `isFieldExpanded` is `false` in the facet request, and `moreValuesAvailable` is `true` in the corresponding facet response, use `score` - Otherwise, use `alphanumeric`. ' ListFieldsResponse: type: object properties: fields: type: array items: type: object properties: type: type: string name: type: string nativeName: type: string description: type: string defaultValue: type: string fieldType: type: string fieldSourceType: type: string includeInQuery: type: boolean includeInResults: type: boolean groupByField: type: boolean splitGroupByField: type: boolean sortByField: type: boolean required: - type - name - nativeName - description - defaultValue - fieldType - fieldSourceType - includeInQuery - includeInResults - groupByField - splitGroupByField - sortByField example: type: text name: '@author' nativeName: author description: '' defaultValue: '' fieldType: LargeString fieldSourceType: System includeInQuery: false includeInResults: false groupByField: false splitGroupByField: false sortByField: false AnalyticsRequestParameters: type: object nullable: true properties: capture: type: boolean description: 'Whether the search api call should be tracked for analytics and machine learning purposes. When set to `true`, be sure to set the `actionCause` parameter. When not provided, it defaults to `false`. See [Standard actions and Usage Analytics reference](docs.coveo.com/en/1389)).' trackingId: type: string description: A value to identify which web property an event is related to. userId: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches. Instead, specify the ID of the user in the search token.' deprecated: true clientId: type: string description: 'A GUID which represents the current client. If your implementation uses the Atomic or Headless libraries, or newer versions of the JavaScript Search Framework, then the [client ID](https://docs.coveo.com/en/masb0234/) is generated automatically in client-side code. This GUID is held in a browser''s local storage as well as a top level domain first-party cookie (`coveo_visitorId`) that expires after 1 year. **Note:** The cookie takes precedence over the value in the browser''s local storage. If you have a custom Coveo implementation, you will have to generate a [UUID v4]()-formatted GUID. You will need to send this ID as `analytics.clientId` in every event that is sent to Coveo UA and the Search API. Coveo Machine Learning models may use this information to provide contextually relevant output. **Note** The `clientId` replaces the deprecated `visitorId`. For compatibility, the cookie and local storage values are still named `coveo_visitorId`.' documentLocation: type: string description: 'The URL of the current page or component. If not present, the referrer is obtained from the [Referer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) header. **Note**: This information can be obtained from `coveo.analytics.js`.' documentReferrer: type: string description: '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). Coveo Machine Learning models may use this information to provide contextually relevant output. **Note**: This information can be obtained from `coveo.analytics.js`.' pageId: description: 'A GUID representing the page ID. **Note**: This information can be obtained from `coveo.analytics.js`.' anyOf: - type: string nullable: true - type: integer userIp: type: string description: 'The user IP. If not present, the IP is obtained from the [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) and [Forwarded](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded) headers. **Note**: This information is required when endpoints are behind a proxy. **Example**: `127.0. 0.1`' clientRequestId: type: string description: 'A GUID generated by the client representing the current request. This information is used to identify operations across different apis related to the same request.' clientTimestamp: type: string description: Client ISO 8601 timestamp with milliseconds. userAgent: type: string description: 'The user agent of the request. If not present, the user agent is obtained from the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) header. **Note**: This information is required when endpoints are behind a proxy.' actionCause: type: string description: 'The type of operation that triggered this event. See [Standard actions and Usage Analytics reference](docs.coveo.com/en/1389)).' example: facetSelect originContext: type: string example: CommunitySearch description: The origin of the event. Used to specify the deployment from which the user performs the action. Suggested values are Search, InternalSearch, CommunitySearch, or the originLevel1 value customData: type: object description: 'The user defined dimensions and their values. Keys can only contain alphanumeric or underscore characters. Whitespaces in keys are converted to underscores. Uppercase characters in keys are converted to lowercase characters. The value could be any valid JSON, but it is handled as string over Coveo usage analytics. It is highly recommended that you create your custom dimension before adding customData' RestFacetOptions: type: object nullable: true properties: freezeFacetOrder: type: boolean description: 'Whether facets should be returned in the same order they were requested. **Note:** Setting this to `true` entirely prevents automatic score-based facet reordering. To allow automatic facet reordering, but only take into account the scores generated by a Coveo ML DNE model, set `enableIndexFacetOrdering` to `false` instead. **Default:** `false`' default: false enableIndexFacetOrdering: type: boolean description: 'Whether to take the scores generated by the index into account when reordering facets. **Note:** Setting this to `false` implies that only the scores generated by a Coveo ML DNE model will be taken into account when automatically reordering facets. To disable automatic facet reordering entirely, set `freezeFacetOrder` to `true` instead. **Default:** `true`' default: true RestQueryFunction: required: - fieldName - function type: object properties: function: type: string description: 'The mathematical expression whose output should be stored in a dynamic, temporary field. **Notes:** - The `function` expression can be defined using the [ExprTk](http://www.partow.net/programming/exprtk/index.html) library syntax, but control and loop structures (e.g., if-then-else, while loop, etc.) are **not** supported. - If the `function` expression references a numeric field, enable the **Use cache for computed fields** option on that field to speed up evaluation (see [Manage fields](https://docs.coveo.com/en/1833/)).' example: '@numberoflikes+1' fieldName: type: string description: 'The name of the dynamic, temporary field in which to store the query function expression output. **Note:** The `fieldName` value must not correspond to an existing field in the index.' example: numberoflikesplusone filter: type: string description: A query expression to specify which result items that the query function should apply to. example: '@filetype==forumpost' allowMissingFields: type: boolean default: false description: 'Whether a document should be considered by the query function when one or more referenced fields are missing. When set to `true`, the missing fields will be assigned a `NaN` value, and the query function should handle `NaN` values by replacing them with a default value. For example: ``` var price1 := @price == @price ? @price : 0; var price2 := @price_store2 == @price_store2 ? @price_store2 : 0; price1 + price2 ``` > **Note**: To be considered by the query function, a document must have at least one defined field. Documents with all fields missing will be excluded. ' RestCategoryFacetRequest: required: - field type: object properties: field: type: string description: 'The name of the field in which to look for hierarchical values. **Note:** You must ensure that the **Multi-value facet** option is enabled for this field in your index (see [Manage fields](https://docs.coveo.com/en/1833/)).' example: '@categories' path: type: array description: The retrieved sequence of hierarchical field values. example: - Doors - Metal items: type: string maximumNumberOfValues: type: integer description: 'The maximum number of values to return. **Default:** `10`' format: int32 example: 5 default: 10 minimum: 0 injectionDepth: type: integer description: 'The maximum number of query result items to scan. **Note:** Specifying a high `injectionDepth` value can negatively impact query performance. **Default:** `1000`' format: int32 example: 1500 default: 1000 delimitingCharacter: type: string description: 'The character to use to split field values into a hierarchical sequence. **Example**: For a multi-value `field` containing the following values: `c; c>folder2; c>folder2>folder3;` The delimiting character is `>`. **Default:** `|`' example: '>' default: '|' filterFacetCount: type: boolean description: 'Whether to exclude folded result parents when estimating the result count for each facet value. **Note:** The target folding field must be a facet field with the **Use cache for nested queries** options enabled (see [Manage fields](https://docs.coveo.com/en/1833/)). **Default:** `true`' RestFacetRequestRangeBase: type: object properties: numberOfValues: type: integer format: int32 default: 8 description: 'The maximum number of facet values to fetch. **Note:** - If `freezeCurrentValues` is `true` or `generateAutomaticRanges` is `false`, `numberOfValues` is automatically set to the length of the `currentValues` array.' freezeCurrentValues: type: boolean default: false description: 'Whether to include the `currentValues` array from the facet request in the `values` array of the corresponding facet response. **Note:** - Setting this to `true` keeps the facet from moving around while the end-user interacts with it in the search interface.' generateAutomaticRanges: type: boolean default: false description: 'Whether to automatically generate range values for this facet. **Notes:** - Setting this to `true` is only effective if the referenced `field` is of a corresponding type (i.e., date or numeric). - Automatic range generation will fail if the referenced `field` is dynamically generated by a query function. - Enabling the [**Use cache for numeric queries**](https://docs.coveo.com/en/1833/#use-cache-for-numeric-queries) option on the referenced `field` will speed up automatic range generation.' sortCriteria: type: string default: ascending description: 'The criterion to use for sorting returned facet values. **Allowed values**: - `ascending`: Sort in ascending order of range facet values. - `descending`: Sort in descending order of range facet values. ' RestFacetRequestSpecificSortCriteriaExplicit: oneOf: - $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitScore' - $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitCustomSort' - $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitAlphanumeric' - $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitAlphanumericNatural' - $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitOccurences' discriminator: propertyName: type mapping: score: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitScore' custom: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitCustomSort' alphanumeric: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitAlphanumeric' alphanumericNatural: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitAlphanumericNatural' occurences: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicitOccurences' RestGroupByValue: required: - computedFieldResults - lookupValue - numberOfResults - score - value - valueType type: object properties: value: type: string description: The Group By value name. example: Bob Jones numberOfResults: type: integer description: The number of query result items having this field value. format: int32 example: 42 score: type: integer description: The Group By value score, computed from the `numberOfResults` value as well as from the position of the items having this value in the ranked query result set. format: int32 example: 0 valueType: type: string description: The type of Group By value. example: Standard computedFieldResults: type: array description: The results of the computed fields (see the `computedFields` Group By parameter). example: - 243.72 items: type: number format: float lookupValue: type: string description: '> This property is deprecated; it should normally not be populated if the query was sent against a Coveo Cloud V2 index. The lookup field value name.' deprecated: true Value: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true NumberOfResults: type: integer description: '> This property is deprecated; it should not be populated by Search API V2 searches.' format: int32 deprecated: true Score: type: integer description: '> This property is deprecated; it should not be populated by Search API V2 searches.' format: int32 deprecated: true ComputedFieldResults: type: array description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true items: type: number format: double LookupValue: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true SearchHub: type: string nullable: true description: 'The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Notes:** - 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. - 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. See also the `tab` parameter. ' example: CustomerPortal RestCategoryFacetResponse: type: object properties: field: type: string values: $ref: '#/components/schemas/RestCategoryFacetValue' parentValues: $ref: '#/components/schemas/RestCategoryFacetValue' Recommendation: type: string nullable: true description: 'The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)). Coveo Machine Learning event recommendations models may use this information to provide contextually relevant output. ' example: Recommendation RestListFieldValuesParameter: allOf: - $ref: '#/components/schemas/RestListFieldValuesParameterBase' - $ref: '#/components/schemas/RestCommonQueryParameters' RestQueryResponse: required: - apiVersion - categoryFacets - duration - facets - groupByResults - index - indexDuration - phrasesToHighlight - pipeline - refinedKeywords - requestDuration - results - searchUid - suggestedFacets - termsToHighlight - totalCount - totalCountFiltered - triggers type: object properties: totalCount: type: integer description: "The total number of items matching the query for the current user (security trimming applied). \n \n**Note:** When logging a **Search** usage analytics event for a query, the `numberOfResults` field of that event should be set to the `totalCount` value of the query (for reporting purposes)." format: int32 example: 250 totalCountFiltered: type: integer description: The total number of items matching the query for the current user (security trimming applied) after duplicate filtering has been applied (see the `duplicateFiltering` query parameter). format: int32 example: 245 duration: type: integer description: The `requestDuration` added to the computing time (in milliseconds) that was required by the Search API. format: int32 example: 1235 indexDuration: type: integer description: The time (in milliseconds) that was required by the index to find the query items. format: int32 example: 1175 requestDuration: type: integer description: The `indexDuration` added to the time (in milliseconds) that was required to establish a connection between the Search API server and the index server. format: int32 example: 1181 searchUid: type: string description: "The query [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). Each query sent to the Search API has its own randomly generated `searchUid`. \n \n**Note:** When logging a **Search** or **Custom** usage analytics event for a query, or a **Click** usage analytics event for an opened query result item, the `searchQueryUid` field of that event should be set to the `searchUid` value of the query response." example: a0e4773c-39c3-423c-90cd-c03a640ecde5 pipeline: $ref: '#/components/schemas/Pipeline' apiVersion: type: integer description: The version of the Search API that sent the query. format: int32 example: 2 splitTestRun: type: string description: The name of the active A/B test for the query pipeline. This field appears only when an A/B test is active. Use it to identify the test associated with the query. example: CustomerQueryPipeline-mirror-1725560351 exception: $ref: '#/components/schemas/RestException' isFallbackToAdmin: type: boolean description: Whether the admin session ID was allowed and used by the Coveo for Salesforce search engine. The value will be set to `true` when it is the case, and might be absent or set to `false` otherwise. warnings: type: array description: The errors that did not make the query fail, but should be addressed. They might be security issues, deprecated behaviors, or any other kind of concern. items: type: string errors: type: array description: The errors that critically changed the query behaviour. These should be addressed right away to prevent future errors. items: type: string index: type: string description: The identifier of the index mirror against which the query was executed (see the `indexToken` query parameter). example: mycoveocloudv2organizationid-cqjd206sta1xb9qyxfhhnsu294-Indexer-2-9rbfxhp1n07cth80ckzeh3zotc indexToken: $ref: '#/components/schemas/IndexToken' triggers: type: array description: 'The actions to perform by the client based on the Trigger statements defined in query pipelines (see the `pipeline` query parameter). **Note:** > A Trigger statement must have a condition. Otherwise, the Search API ignores it and does not include it in the `triggers` array of the query response (see [Manage trigger rules](https://docs.coveo.com/en/3413/)).' items: $ref: '#/components/schemas/RestTriggerResponse' termsToHighlight: type: object additionalProperties: type: array items: type: string description: The terms to highlight in each query result item. Includes all basic query expression keywords, as well as any word stemmed from a basic query expression keyword (see the `q` query parameter), unless this keyword was preceded by the no stemming Coveo Cloud query syntax operator (`+`). example: coveo: [] cloud: - clouds v2: [] platform: - platforms phrasesToHighlight: type: object additionalProperties: type: object additionalProperties: type: array items: type: string description: The phrases to highlight in each query result item. This property is populated when the basic query expression (see the `q` query parameter) contains one or several exact phrase match requests (terms between double quote characters). example: cloud v2: cloud: [] v2: [] queryCorrection: type: object description: 'Property returned when the `queryCorrection` feature is enabled. It will either return: - The `originalQuery` and `correctedQuery` if the query was automatically corrected. - A list of `corrections` that could be be manually applied afterward. ' properties: originalQuery: type: string description: 'If the query was automatically corrected, this property indicates the original basic query expression (`q`) that triggered the automatic query correction. ' correctedQuery: type: string description: 'If the query was automatically corrected, this property indicates the corrected basic query expression (`q`) that was executed instead of the original one. ' corrections: type: array description: 'If the query wasn''t automatically corrected, this property contains the basic query expression (`q`) keyword corrections suggested by the _Did You Mean_ index feature. ' items: $ref: '#/components/schemas/RestQueryCorrection' correctedQueryTrigger: type: string description: 'If the query was automatically corrected, this property indicates which strategy triggered the correction. Possible values: `whenNoResults`, `alwaysOnQS` ' queryCorrections: type: array description: The query corrections suggested by the index, if the `enableDidYouMean` query parameter was set to `true`. example: [] items: $ref: '#/components/schemas/RestQueryCorrection' refinedKeywords: type: array description: The refined keywords used by the Coveo ML automatic relevance tuning model. example: - v2 - platform - cloud - coveo items: type: string groupByResults: type: array description: The Group By results returned by the query. These results are included in the order they were requested in the `groupBy` query parameter. items: $ref: '#/components/schemas/RestGroupByResult' categoryFacets: type: array description: Hierarchical data results corresponding the to hierarchical data in the query. items: $ref: '#/components/schemas/RestCategoryFacetResponse' facets: type: array description: The facet results returned by the query. These results are included in the order they were requested in the `facets` query parameter. items: $ref: '#/components/schemas/RestFacetResult' generateAutomaticFacets: type: object description: Automatically generated facets based on the `generateAutomaticFacets` request parameter. properties: facets: type: array items: $ref: '#/components/schemas/RestFacetResult' suggestedFacets: type: array description: A DNE facet suggestion. items: $ref: '#/components/schemas/RestSuggestedFacet' results: type: array description: The items returned for the query. items: $ref: '#/components/schemas/RestQueryResult' questionAnswer: $ref: '#/components/schemas/RestQuestionAnswer' extendedResults: type: object description: "Additional response attributes coming from the execution of query pipeline integrations.\n\nCurrently supported properties:\n - `generativeQuestionAnsweringId`: A stream ID to access the generated answer." additionalProperties: type: string example: generativeQuestionAnsweringId: queryStream01_coveo_c784a8f6-aa62-4b24-9ca0-d6b483feaa31 RestFieldAliases: type: object maxProperties: 1000 additionalProperties: type: string minLength: 1 maxLength: 510 pattern: ^[a-z][a-z0-9_]+\.[a-zA-Z0-9_]+$ description: 'A key-value store where each pair corresponds to the name of an alias, along with the key to target within which dictionary field to query. **Note:** This cannot be used at the same time as `dictionaryFieldContext`. **Note:** Using this parameter requires either: - `allowedDictionaryFieldKeys` in the authentication token. - The `EXPLORE_DICTIONARY_FIELDS` privilege on the authenticated user. **Example:** The same behaviour as `dictionaryFieldContext` can be implemented using this parameter. Suppose that in your index, the `@price` dictionary field contains different values for its `storea` and `storeb` keys. Including `"fieldAliases": { "price": "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. This is similar to using `"dictionaryFieldContext": { "price": "storea" }`. **Example:** Suppose that in your index, the `@price` dictionary field contains different values for its `storea` and `storeb` keys. Including `"fieldAliases": { "price_a": "price.storea", "price_b": "price.storeb" }` in the query means that any part of the query expression that targets the `@price_a` field will in fact only query the `storea` values of that field, and similarly for `@price_b` and `storeb`.' example: price_a: price.storeA price_b: price.storeB PlanSearchResponse: type: object required: - pipeline properties: preprocessingOutput: $ref: '#/components/schemas/PreprocessingOutput' parsedInput: $ref: '#/components/schemas/ParsedQueryResponse' RestQueryParameters: allOf: - $ref: '#/components/schemas/RestQueryParametersBase' - $ref: '#/components/schemas/RestCommonQueryParameters' Referrer: type: string nullable: true 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). Coveo Machine Learning models may use this information to provide contextually relevant output. **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. See also the `context` parameter. ' example: http://www.example.com/ QuerySuggestResponse: type: object properties: completions: type: array items: properties: expression: type: string score: type: number format: double highlighted: type: string executableConfidence: type: number format: double objectId: type: string responseId: type: string executionReport: type: array items: {} required: - completions - responseId example: completions: - expression: brown boot score: 61.04 highlighted: (brown) [boot] executableConfidence: 0.9 objectId: 9919344e-c495-4620-b0c1-ec2cb721f96e responseId: e1a4c9dd-71d2-4e68-9589-11bc3e640da0 MlParameters: type: object nullable: true additionalProperties: true description: 'A map of options to pass to the Coveo ML models associated with the request''s target query pipeline. **Available parameters:** - `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`. - `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. - `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. - `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. - `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`. - `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. - `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. - `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. - `categoryFilter` (string): The name of a category of products to get recommendations for. - `brandFilter` (string): The name of a brand of products to get recommendations for. - `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": "" }`. **Examples:** - `{"num": 3, "padding": "trending", "maxActionsHistoryItemsToConsider": 10, "considerUserContext": false}` - `{"wordSelection": "wordsKept:4"}` ' example: num: 3 padding: trending RestFacetRequestSpecificSortCriteriaExplicitScore: type: object required: - type properties: type: type: string enum: - score description: 'Sort values in descending score order. Facet value scores are based on the number of occurrences and their position in the ranked query result set. **Notes:** - The Coveo ML DNE feature only works with the `score` sort criterion. ' IndexType: type: string nullable: true 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. **Default:** `coveo` ' example: coveo default: coveo RestQueryParentResult: anyOf: - $ref: '#/components/schemas/RestQueryResult' - type: object nullable: true PipelineRuleParameters: type: object nullable: true additionalProperties: true maxProperties: 255 description: "This defines generic parameters to be used by rules.\nIt defines the \"scopes\", or in other words, the rules in which the parameters should be used.\nThe generic parameters are defined within a particular scope and are only be accessible inside of it.\nThis is a read-only parameter, so its value will not be overridden.\n\n`{\n \"scope\": {\n \"parameterName\" : \"parameterValue\"\n }\n}`\n\nWhile using Gen AI, if additional document fields are required for the resulting\ncitations, these fields can be specified through the 'citationsFieldToInclude'\nproperty of the 'mlGenerativeQuestionAnswering' scope.\n\n> **Note:**\n> Getting dictionary fields for citations is not supported.\n\n**Examples:**\n- `{\"mlGenerativeQuestionAnswering\": { \"responseFormat\": { \"answerStyle\": \"bullet\" } } }`\n- `{\"mlGenerativeQuestionAnswering\": { \"citationsFieldToInclude\": [\"field1\", \"field2\"] } }`\n\nMax Size: 1KB\n" example: genqa: responseFormat: answerStyle: bullet RestListFieldValuesBatchParameter: allOf: - $ref: '#/components/schemas/RestListFieldValuesBatchParameterBase' - $ref: '#/components/schemas/RestCommonQueryParameters' RestGroupByResult: required: - field - globalComputedFieldResults - values type: object properties: field: type: string description: The field on which the Group By operation was executed. example: '@author' values: type: array description: The resulting Group By values. example: - value: Bob Jones numberOfResults: 42 score: 0 valueType: Standard computedFieldResults: - 243.72 lookupValue: '' - value: Erika Miller numberOfResults: 37 score: 0 valueType: Standard computedFieldResults: - 201.82 lookupValue: '' - value: David Allen numberOfResults: 24 score: 0 valueType: Standard computedFieldResults: - 177.56 lookupValue: '' - value: Carrie Green numberOfResults: 11 score: 0 valueType: Standard computedFieldResults: - 143.92 lookupValue: '' - value: Anonymous numberOfResults: 77 score: 0 valueType: Standard computedFieldResults: - 122.85 lookupValue: '' items: $ref: '#/components/schemas/RestGroupByValue' globalComputedFieldResults: type: array description: The global computed fields that were processed by the index. items: type: number format: double Field: type: string description: '> This property is deprecated and Coveo Cloud V1 only; The lowercase `field` should be used instead.' deprecated: true GlobalComputedFieldResults: type: array description: '> This property is deprecated and V1 only; The lowercase `globalComputedFieldResults` should be used instead.' deprecated: true items: type: number format: double RestContentId: type: object required: - contentIdKey - contentIdValue properties: contentIdKey: type: string contentIdValue: type: string Pipeline: type: string nullable: true description: 'The name of the query pipeline to use for this request (bypassing its conditions, if it has any). You can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `"pipeline": ""`). If 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). **Notes:** - 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. - 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. See also [Managing Query Pipelines](https://docs.coveo.com/en/1450/). ' example: CustomerQueryPipeline RestFacetRequestSpecific: allOf: - $ref: '#/components/schemas/RestFacetRequestBase' - $ref: '#/components/schemas/RestFacetRequestSpecificBase' RestFacetValueDateRange: allOf: - $ref: '#/components/schemas/RestFacetValueBase' - $ref: '#/components/schemas/RestFacetValueRangeBase' - $ref: '#/components/schemas/RestFacetValueDateRangeBase' RestFacetResultValue: required: - numberOfResults - state type: object additionalProperties: false properties: value: type: string description: 'The facet value name. **Note:** In the case of a hierarchical facet value, this represents a single path segment.' example: Alice Smith state: type: string description: 'The current facet value state in the search interface. **Default:** `idle`' enum: - idle - selected - excluded numberOfResults: type: integer description: 'The number of query results that can be expected if the facet value is selected in the search interface. **Note:** This property only gets populated when the facet currently has no selected or excluded values.' format: int64 start: description: The start of the range. anyOf: - type: string example: '2001-07-20T23:01:05' - type: integer format: int64 - type: number end: description: The end of the range. anyOf: - type: string example: '2001-07-20T23:01:05' - type: integer format: int64 - type: number endInclusive: type: boolean description: 'Whether to include the `end` value in the range. **Default:** `false`' example: true default: false isSuggested: type: boolean isAutoSelected: type: boolean description: Whether the facet value was automatically selected by Coveo ML. RestFacetSearchResponse: required: - moreValuesAvailable - values type: object properties: values: type: array description: The returned facet values. items: $ref: '#/components/schemas/RestFacetSearchResultValue' moreValuesAvailable: type: boolean description: Whether additional facet values matching the request are available. FindFieldsRequest: type: object properties: q: type: string default: '' description: 'The *basic query* expression, typically the keywords entered by the end user in a query box. ' example: Coveo "Cloud V2" platform dictionaryFieldContext: type: object additionalProperties: type: string 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. **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.' example: price: storeA RestQuestionAnswer: type: object required: - answerFound - question - answerSnippet - documentId - relatedQuestions - score properties: answerFound: type: boolean question: type: string answerSnippet: type: string documentId: $ref: '#/components/schemas/RestContentId' score: type: number relatedQuestions: type: array items: type: object required: - question - answerSnippet - documentId - score properties: question: type: string answerSnippet: type: string documentId: $ref: '#/components/schemas/RestContentId' score: type: number raw: type: object additionalProperties: true RestFacetSearchParametersSpecific: required: - field type: object properties: field: type: string description: The name of the field against which to execute the facet search request. example: color type: type: string description: 'The facet type to search against. **Allowed values:** - `specific` - `hierarchical` **Default:** `specific`' enum: - specific - hierarchical numberOfValues: type: integer description: 'The maximum number of values to fetch. **Default:** `10`' format: int32 default: 10 query: type: string description: 'The string to match. **Note:** Typically, this should be set to the text that the end user typed in the facet search box, to which wildcard characters (`*`) may be added.' example: '*oran*' captions: type: object additionalProperties: type: string description: 'A dictionary that maps index field values to facet value display names. **Note:** When specifying display captions for hierarchical facet values, you can use full values (e.g., `all;electronics;laptops`), and/or for "leaf" values (e.g., `laptops`) as keys. If a hierchical facet value can be mapped to two different display captions, the most specific mapping (i.e., the one whose key is the full value) applies. **Examples:** - Specific (i.e., scalar) facet values: `{"#FF8000": "Orange", "#8000FF": "Purple"}` - Hierarchical facet values:** `{"all;electronics;laptops": "Laptops", "smartphones": "Smart Phones"} ' example: acme_productA: ACME Product A acme_productB: ACME Product B filterFacetCount: type: boolean description: 'Whether to exclude folded result parents when estimating the result count for each facet value. **Note:** The target folding field must be a facet field with the **Use cache for nested queries** options enabled (see [Manage fields](https://docs.coveo.com/en/1833/)). **Default:** `false`' example: - - Electronics - Entertainment - Gaming Consoles - - Appliances - Kitchen items: type: array items: type: string sortCriteria: type: string enum: - score - alphanumeric - alphanumericNatural - occurrences default: alphanumeric description: 'The sort criterion to apply to the returned facet values. **Allowed values**: - `alphanumeric`: Sort values in ascending alphanumeric order. - `alphanumericNatural`: Sort values in ascending alphanumeric order using [natural sorting](https://en.wikipedia.org/wiki/Natural_sort_order). - `occurrences`: Sort by number of occurrences, so that field values with the highest number of occurrences appear first. - `score`: Sort values in descending score order. Facet value scores are based on the number of occurrences and their position in the ranked query result set. ' ignoreValues: type: array items: type: string description: A list of index field values to filter out from the facet search results. example: - '#FF00FF' - '#00FFFF' searchContext: $ref: '#/components/schemas/RestQueryParameters' Debug: type: boolean nullable: true description: 'Whether to force a successful response to include debug information. **Notes:** - Debug information can only appear in responses in the JSON format (see the `format` parameter). - Avoid setting this parameter to `true` in production, as it has a negative impact on query performance. **Default:** `false` ' example: false default: false Locale: type: string nullable: true description: 'The locale of the current user. Must comply with IETF''s [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition. Coveo 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. **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`). ' example: en-US RestFacetValueDateRangeBase: type: object required: - start - end properties: start: type: string pattern: ^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$ example: 2019/01/01@00:00:00 description: 'The value to start the range at. **Note:** Timezone of date ranges are determined by the timezone parameter of the search request.' end: type: string pattern: ^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$ example: 2019/12/31@23:59:59 description: 'The value to end the range at. Must be greater (or later) than the `start` value. **Note:** Timezone of date ranges are determined by the timezone parameter of the search request.' RestHighlightResponse: required: - length - offset type: object properties: length: type: integer description: The length (in number of characters) of the word to highlight. format: int64 example: 5 offset: type: integer description: The 0-based index position of the first character of the word to highlight in the string. format: int64 example: 15 RestAutomaticFacetScope: type: object description: 'To determine which fields are relevant for the current query, we consider all facet and multi-value facet fields that have the parameter "automaticFacetsCandidate": true. Among these fields, those matching the "fields.toExclude" attribute within the query/pipeline payload will be excluded and no longer be considered as relevant. However, excluded fields that do match the "fields.toInclude" attribute within the query/pipeline payload will still be considered relevant.' properties: toInclude: type: array items: type: string toExclude: type: array items: type: string RestFacetRequestSpecificBaseAllowedValuesSimple: type: object description: 'The field values allowed in the facet operation results. If you do not explicitly specify an array of `allowedValues`, or if you specify an empty array, all field values are allowed.' required: - type - values properties: type: type: string enum: - simple values: type: array minItems: 1 maxItems: 25 pattern: .*[^*]$ items: type: string description: 'Simple values that must not end with a trailing wildcard. ' example: - Anonymous - Bob Jones Q: type: string description: 'The basic query expression, typically the keywords entered by the end user in a query box. **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.' example: Coveo "Cloud V2" platform RestCategoryFacetValue: type: array items: type: object properties: value: type: string numberOfResults: type: integer format: int64 minimum: 0 IndexToken: type: string nullable: true description: 'The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter. If you do not specify an `indexToken` (or `index`) value, any index mirror could be used. **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). ' example: ZXhhbXBsZWluZGV4bWlycm9yLS4uLg== PreprocessingOutput: required: - triggers type: object properties: triggers: type: array description: The query response output generated by _trigger_ rules in the query pipeline (i.e., by `execute`, `notify`, `query`, and `redirect` rules). items: type: object additionalProperties: {} RestFacetRequestSpecificBase: type: object properties: type: type: string enum: - specific description: Request facet values representing specific values (e.g., Alice Smith, Bob Jones, etc.). currentValues: type: array description: 'The values displayed by the facet in the search interface at the moment of the request. **Default:** `[]`' items: $ref: '#/components/schemas/RestFacetSpecificValue' numberOfValues: type: integer description: 'The maximum number of facet values to fetch. **Notes:** - If `freezeCurrentValues` is `true` or if requesting range facet values, `numberOfValues` is automatically set to the `currentValues` array length.' format: int32 default: 8 freezeCurrentValues: type: boolean description: 'Whether to include the facet request''s `currentValues` in corresponding facet response''s `values` array. **Notes:** - Setting this to `true` is useful to ensure that the facet does not move around while the end-user is interacting with it in the search interface.' default: false sortCriteria: $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteria' customSort: type: array maxItems: 100 description: 'When defined, identifies the facet values that must appear at the top, in this order. This parameter can be used in conjunction with the `sortCriteria` parameter. Facet values not part of the customSort list will be sorted according to the `sortCriteria`. For example, if you have a facet for bed sizes, you might have: - Simple - Twin - Queen - King ' items: type: string example: - Simple - Twin - Queen - King allowedValues: $ref: '#/components/schemas/RestFacetRequestSpecificBaseAllowedValues' RestTokenParams: required: - userIds type: object properties: userIds: type: array description: The security identities to impersonate when authenticating a query with this search token. items: $ref: '#/components/schemas/RestUserId' userDisplayName: type: string description: 'The `userDisplayName` to pass when logging usage analytics search events. This information is leveraged in the **Analytics** section of the Coveo Cloud administration console.' example: Alice Smith userGroups: type: array description: 'The `userGroups` to pass when logging usage analytics search events. This information is leveraged in the **Analytics** section of the Coveo Cloud administration console. User groups can be also be used in query pipeline condition statements (e.g., `when $groups contains \"Employees\"`).' example: - Tech support agents - Employees items: type: string canSeeUserProfileOf: type: array description: 'The `username` and/or `visitorId` values whose corresponding usage analytics-recorded user profiles can be accessed using the search token. **Note:** This property is meant to be used when generating search tokens for users requiring contextual information about other users to improve search relevance (e.g., support agents using an insight panel).' example: - bjones@acme.com - dmoore@acme.com items: type: string pipeline: type: string description: 'The name of the query pipeline to use when authenticating a query with this search token. This query pipeline will take precedence over the possible output of all other query pipeline routing mechanisms when using this search token (see [Query Pipeline Routing Mechanisms and Rules](https://docs.coveo.com/en/1666/)).' example: InternalSearch filter: type: string description: 'The filter query expression to apply when authenticating a query with this search token. This expression will be merged with the constant part of the query expression (`cq`) using an `AND` operator. The filter can also be used in query pipeline condition statements (e.g., `when $constantQuery contains \"@source==KnowledgeBase\"`).' example: '@source==KnowledgeBase' searchHub: type: string description: 'The name of the search hub to enforce when authenticating a query with this search token. This value will override the `searchhub` parameter of the query itself, and will be passed as the `originLevel1` property value when logging usage analytics search events. The search hub can also be used in query pipeline condition statements (e.g., `when $searchhub is \"CommunityHub\"`).' example: SupportHub dictionaryFieldContext: type: object description: 'The [dictionary field](https://docs.coveo.com/en/2036/) context to enforce when authenticating a query with this search token. This value will override the `dictionaryFieldContext` parameter of the query itself. A dictionary field context is 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. For example, suppose that in your index, the `@price` dictionary field contains different values for its `storeA` and `storeB` keys. Including `"dictionaryFieldContext": { "price": "storeA" }` when creating a search token means that, for any query made with that search token, any part of the query expression that targets the `@price` field will in fact only query the `storeA` values of that field. **Note:** This cannot be used at the same time as `allowedDictionaryFieldKeys`.' allowedDictionaryFieldKeys: $ref: '#/components/schemas/RestAllowedDictionaryFieldKeys' salesforceOrganizationId: type: string description: '**Internal:** The ID of Salesforce organization, used to differentiate Salesforce organizations linked to the same Coveo organization.' example: 00Df23090018W5bEAG validFor: type: integer description: 'The number of milliseconds the search token will remain valid for once it has been created. **Minimum value:** `900000` (i.e., 15 minutes) **Maximum/default:** `86400000` (i.e., 24 hours)' format: int32 example: 3600000 default: 86400000 salesforceUser: type: string description: '**Internal:** This property is exposed for internal use by the Coveo for Salesforce integration.' salesforceCommunityUrl: type: string description: '**Internal:** This property is exposed for internal use by the Coveo for Salesforce integration.' salesforceFallbackToAdmin: type: boolean description: '**Internal:** This property is exposed for internal use by the Coveo for Salesforce integration.' usertype: type: string description: '**Internal:** This property is exposed for internal use by the Coveo for Salesforce integration.' licenseDefinitionKey: type: string description: '**Internal:** This property is exposed for internal use by the Coveo for Salesforce integration.' superUserToken: type: string description: This property is exposed for backward compatibility reasons only. deprecated: true commerce: $ref: '#/components/schemas/CommerceParameters' scope: type: integer description: This property is exposed for backward compatibility reasons only. format: int32 deprecated: true Format: type: string nullable: true description: 'The format of a successful response. - Use `json` to get the response in the JSON format. - Use `xlsx` to generate an Excel file containing the results (binary). **Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format. **Default:** `json` ' example: json default: json CQ: type: string 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. **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. **Notes:** - 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. - 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.' example: '@documenttype==forumpost' RestFacetRequestNumericalRangeBase: type: object required: - type properties: type: type: string description: Request facet values that represent ranges of numbers (e.g., 0..10, 11..20, etc.). enum: - numericalRange currentValues: type: array items: $ref: '#/components/schemas/RestFacetValueNumericalRange' default: [] description: The values displayed by the facet in the search interface at the moment of the request. rangeAlgorithm: type: string enum: - equiprobable - even default: even description: 'Determines which algorithm is used to generate the ranges if `generateAutomaticRanges` is enabled. **Equiprobable** This algorithm creates ranges which represent the distribution of the results. For example, if you have a single facet value that matches most of the results, the `equiprobable` algorithm will resize the ranges to balance the weights. | Start | End | Matching results | |-------|------|------------------| | 0 | 62 | 100 | | 62 | 423 | 100 | | 423 | 1500 | 100 | **Even** This algorithm creates ranges of the same length. For example, it could generate the following price ranges: | Start | End | Matching results | |-------|------|------------------| | 0 | 500 | 299 | | 500 | 1000 | 0 | | 1000 | 1500 | 1 |' ParsedQueryResponse: type: object properties: basicExpression: type: string description: 'The basic query expression, typically the keywords entered by the end user in a query box. **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.' example: Coveo "Cloud V2" platform advancedExpression: type: string description: 'The advanced query expression, typically generated by code (e.g., when toggling facet values). **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).' example: '@year==2017' largeExpression: type: string 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). example: I am looking for an enterprise-class native cloud SaaS/PaaS solution that provides a unified and secure way to search for contextually relevant content across multiple enterprise systems. constantExpression: type: string 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. **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. **Notes:** - 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. - 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.' example: '@documenttype==forumpost' disjunctionExpression: type: string 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)`. example: '@permanentid=aadd702687c62910d6da8347304ec2cedfd0b06d5b4d2794a555ce5688bd' mandatoryExpression: type: string description: 'The filter query expression to apply when authenticating a query with this search token. This expression will be merged with the constant part of the query expression (`cq`) using an `AND` operator. The filter can also be used in query pipeline condition statements (e.g., `when $constantQuery contains \"@source==KnowledgeBase\"`).' example: '@source==KnowledgeBase' RestSuggestedFacet: required: - field - values type: object properties: field: type: string description: 'The name of the field on which the DNE facet suggestion is based. **Example**: `author`' example: author values: type: array description: 'The name of the field on which the DNE facet suggestion is based. **Example**: `author`' items: $ref: '#/components/schemas/RestSuggestedFacetValue' RestListFieldValuesParameterBase: required: - field properties: field: type: string description: 'The name of the field from which to retrieve values. ' example: '@author' lookupField: type: string description: 'This parameter is exposed for backward compatibility reasons. The name of an additional field from which to retrieve values.' deprecated: true ignoreAccents: type: boolean description: 'Whether to treat accentuated characters as non-accentuated characters when retrieving field values (e.g., treat `é`, `è`, `ê`, etc., as `e`). **Default:** `true` ' sortCriteria: type: string nullable: true description: 'The sort criteria to use. Use: - `occurrences` to sort by number of occurrences, with field values having the highest number of occurrences appearing first. - `nosort` to avoid sorting the results of the Group By operation. The field values will appear in an unspecified order. **Default:** `occurrences` ' maximumNumberOfValues: type: integer description: 'The maximum number of field values to return. **Default:** `10` ' format: int32 minimum: 0 queryOverride: type: string description: 'A different basic query expression (q) use. ' constantQueryOverride: type: string description: 'A different constant query expression (cq) to use. ' disjunctionQueryOverride: type: string description: 'A different disjunction query expression (dq) to use. ' pattern: type: string description: 'The pattern that the field values must match. See also the `patternType` parameter." ' patternType: type: string description: 'The type of pattern that is being used to list field values. Use: - `wildcard` to parse the specified `pattern` as a wildcard expression. - `regularexpression` to parse the specified `pattern` as a regular expression. - `editdistance` to apply the Edit Distance algorithm to match values that are close to the specified `pattern`. - `phonetic` to apply a phonetic algorithm to match values that are phonetically similar to the specified `pattern`. **Default:** `wildcard` ' fieldAliases: $ref: '#/components/schemas/RestFieldAliases' dictionaryFieldContext: type: object 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. **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. **Note:** This parameter will be overridden if the 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). ' RestFacetRequest: oneOf: - $ref: '#/components/schemas/RestFacetRequestSpecific' - $ref: '#/components/schemas/RestFacetRequestHierarchical' - $ref: '#/components/schemas/RestFacetRequestDateRange' - $ref: '#/components/schemas/RestFacetRequestNumericalRange' discriminator: propertyName: type mapping: specific: '#/components/schemas/RestFacetRequestSpecific' dateRange: '#/components/schemas/RestFacetRequestDateRange' numericalRange: '#/components/schemas/RestFacetRequestNumericalRange' hierarchical: '#/components/schemas/RestFacetRequestHierarchical' ListFieldValuesValuesResponse: type: object properties: value: type: string lookupValue: type: string numberOfResults: type: integer required: - value - lookupValue - numberOfResults RestComputedField: required: - field - operation type: object properties: field: type: string description: 'The name of the numeric field on which to perform the aggregate operation. **Tip:** You should ensure that the **Use cache for computed fields** option is enabled for that field in your index in order to speed up evaluation (see [Manage fields](https://docs.coveo.com/en/1833/)).' example: '@wordcount' operation: type: string description: 'The aggregate operation to perform on the `field` values. **Allowed values:** - `sum`: get the sum of all values. - `average`: get the average of all values. - `minimum`: get the smallest value. - `maximum`: get the largest value.' example: average enum: - sum - average - minimum - maximum RestFacetResult: required: - field - indexScore - moreValuesAvailable - values type: object properties: field: type: string description: 'The name of the field on which the facet is based. **Example: `author`' example: author moreValuesAvailable: type: boolean description: Whether additional values are available for the facet. values: type: array description: The returned facet values. items: oneOf: - $ref: '#/components/schemas/RestFacetResultValue' - $ref: '#/components/schemas/RestHierarchicalFacetResponseValue' mlScore: type: number description: The ranking score computed by Coveo ML DNE for this facet. format: double indexScore: type: number description: The ranking score computed by the index for this facet. format: double isFromAutoSelect: type: boolean description: Whether the facet was recommended by Coveo ML. label: type: string description: A human-readable title that describes the facet. domain: $ref: '#/components/schemas/RestFacetResultDomain' RestUserActionParameter: type: object properties: tagViewsOfUser: type: string description: 'The user ID or visitor ID to retrieve user actions for. **Note:** Only effective with authenticated users. **Examples:** - `asmith@example.com` - `c7ab60e2-e6b8-41e8-be6a-ad5c8edc662e`' ActionHistory: type: object properties: name: type: string description: 'The action history event name. Possible values: - **Query** - **PageView**' example: PageView value: description: The action history value, which is either a query expression or a page URI, depending on the action history event `name`. time: type: string description: The time when the action history event was sent from the client. ListFieldValuesResponse: type: object properties: values: type: array items: $ref: '#/components/schemas/ListFieldValuesValuesResponse' required: - results example: values: - value: red lookupValue: red numberOfResults: 182 - value: green lookupValue: green numberOfResults: 142 RestListFieldValuesBatchParameterBase: required: - batch properties: batch: type: array description: 'An array of parameters to retrieve field values. ' items: $ref: '#/components/schemas/RestListFieldValuesParameter' RestHierarchicalFacetResponseValue: required: - numberOfResults - path - state - value type: object properties: value: type: string description: 'The facet value name. **Note:** In the case of a hierarchical facet value, this represents a single path segment.' example: Alice Smith state: type: string description: 'The current facet value state in the search interface. **Default:** `idle`' enum: - idle - selected - excluded numberOfResults: type: integer description: 'The number of query results that can be expected if the facet value is selected in the search interface. **Note:** This property only gets populated when the facet currently has no selected or excluded values.' format: int64 children: type: array description: 'The children of this hierarchical facet value. Each child is a full-fledged hierarchical facet value that may in turn have its own children and so forth, up to a maximum depth of 50 levels.' items: $ref: '#/components/schemas/RestHierarchicalFacetResponseValue' isAutoSelected: type: boolean description: Whether the facet value was automatically selected by Coveo ML. moreValuesAvailable: type: boolean description: Whether additional values are available for the facet. path: type: array items: type: string isLeafValue: type: boolean description: Whether the hierarchical value is a childless node. CommerceParameters: type: object properties: catalogId: type: string filter: type: string operation: type: string RestSuggestedFacetValue: required: - value type: object properties: value: type: string description: 'A DNE facet value suggestion. **Example**: `Alice Smith`' path: type: array description: "The path to the suggested facet value (only applies to hierarchical facet value suggestions).\n\n**Example:** If the suggested hierarchical facet value is `Parrot`, the returned path could be `[\"Animals\", \"Birds\", \"Parrot\"]`.\n " items: type: string Context: type: object nullable: true additionalProperties: true 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. Coveo 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. **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`). See also the `referrer` parameter. **Example** `{"userAgeRange":"25-35","userRoles":["PremiumCustomer","ProductReviewer"]}`' MaximumTimeoutMs: type: integer nullable: true description: 'The maximum number of milliseconds to allow the request to last before timing out. **Maximum:** 10000 **Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use. ' format: int32 example: 10000 default: 0 RestFacetRequestSpecificSortCriteria: oneOf: - $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteriaString' - $ref: '#/components/schemas/RestFacetRequestSpecificSortCriteriaExplicit' RestQuerySuggestParameters: allOf: - $ref: '#/components/schemas/RestQuerySuggestParametersBase' - $ref: '#/components/schemas/RestCommonQueryParameters' RestFacetRequestDateRange: allOf: - $ref: '#/components/schemas/RestFacetRequestBase' - $ref: '#/components/schemas/RestFacetRequestRangeBase' - $ref: '#/components/schemas/RestFacetRequestDateRangeBase' Language: type: string nullable: true description: This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead. deprecated: true RestFacetSearchParametersHierarchical: required: - field type: object properties: field: type: string description: The name of the field against which to execute the facet search request. example: color type: type: string description: 'The kind of facet against which the search request is being made. **Allowed values:** - `specific` - `hierarchical` **Default:** `specific`' enum: - specific - hierarchical numberOfValues: type: integer description: "The maximum number of values to fetch.\n\n**Note:**\n - `numberOfValues` is not taken into account when no elements in the `currentValues` array have `retrieveChildren` set to `true`. This is considered an exact facet retrieval and only returns values in `currentValues`.\n**Default: `10`" format: int32 default: 10 query: type: string description: 'The string to match. **Note:** Typically, this should be set to the text entered by the end-user in the facet search box, to which one or more wildcard characters (`*`) may be added.' example: '*oran*' captions: type: object additionalProperties: type: string description: "A dictionary that maps index field values to facet value display names.\n\n**Note:**\n\nWhen specifying display captions for hierarchical facet values, you can use full values (e.g., `all;electronics;laptops`), and/or for \\\"leaf\\\" values (e.g., `laptops`) as keys.\nIf both are provided, the full value takes priority.\n\n**Examples:**\n\n - Specific (i.e., scalar) facet values: `{\\\"#FF8000\\\": \\\"Orange\\\", \\\"#8000FF\\\": \\\"Purple\\\"}`\n - Hierarchical facet values:** `{\\\"all;electronics;laptops\\\": \\\"Laptops\\\", \\\"smartphones\\\": \\\"Smart Phones\\\"} \"" example: acme_productA: ACME Product A acme_productB: ACME Product B filterFacetCount: type: boolean description: 'Whether to exclude folded result parents when estimating the result count for each facet value. **Note:** The target folding field must be a facet field with the **Use cache for nested queries** options enabled (see [Manage fields](https://docs.coveo.com/en/1833/)). **Default:** `false`' example: - - Electronics - Entertainment - Gaming Consoles - - Appliances - Kitchen items: type: array items: type: string sortCriteria: type: string enum: - score - alphanumeric - alphanumericNatural - occurrences default: alphanumeric description: 'The sort criterion to apply to the returned facet values. **Allowed values**: - `alphanumeric`: Sort values in ascending alphanumeric order. - `alphanumericNatural`: Sort values in ascending alphanumeric order using [natural sorting](https://en.wikipedia.org/wiki/Natural_sort_order). - `occurrences`: Sort by number of occurrences, so that field values with the highest number of occurrences appear first. - `score`: Sort values in descending score order. Facet value scores are based on the number of occurrences and their position in the ranked query result set. ' ignorePaths: type: array items: type: array items: type: string description: A list of paths to filter out from the hierarchical facet search results. delimitingCharacter: type: string description: 'The character to use to split field values into a hierarchical sequence. **Example**: For a multi-value field containing the following values: `c; c>folder2; c>folder2>folder3;` The delimiting character is `>`. For a hierarchical field containing the following values: `c;folder2;folder3;` The delimiting character is `;`. **Default:** `;`' basePath: type: array description: 'The shared base path for all values in the facet to search against. If a `basePath` is specified, the search request will be executed against hierarchical values that begin with that base path only (i.e., other hierarchical values will be filtered out).' example: - Doors - Metal items: type: string searchContext: $ref: '#/components/schemas/RestQueryParameters' RestFacetValueHierarchicalBase: type: object required: - value properties: children: type: array items: $ref: '#/components/schemas/RestFacetValueHierarchical' description: 'The children of this hierarchical facet value. Each child is a full-fledged hierarchical facet value that may in turn have its own children and so forth, up to a maximum depth of 50 levels.' retrieveChildren: type: boolean default: false example: true description: Whether to retrieve the children of this hierarchical facet value. Can only be used on leaf values. retrieveCount: type: integer format: int32 default: 5 example: 7 description: The maximum number of children to retrieve for this hierarchical facet value. Ignored if `retrieveChildren` is `false`. value: type: string example: electronics description: This represents a single path segment. RestFacetValueRangeBase: type: object properties: endInclusive: type: boolean default: false example: true description: Whether to include the `end` value in the range. RestUserId: required: - authCookie - infos - name - password - provider - type type: object properties: name: type: string description: 'The name of the security identity to impersonate. This value can also be used in query pipeline condition statements (e.g., `when $identity is \"asmith@example.com\"`)' example: asmith@example.com type: type: string description: 'The type of the security identity to impersonate. **Default:** `User`' example: User enum: - User - Group - VirtualGroup - Unknown provider: type: string description: The security identity provider containing the security identity to impersonate. example: Email Security Provider infos: type: object additionalProperties: type: string description: Additional custom information about the security identity to impersonate. example: {} authCookie: type: string example: '' password: type: string description: This parameter is exposed for backward compatibility reasons only. deprecated: true VisitorId: type: string nullable: true deprecated: true description: 'A GUID which represents the current user, who can either be authenticated or anonymous. `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`. For 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`. ' example: 5cb98953-9c13-42ff-8176-e6fcba6a50bf RestCommerceParameters: type: object properties: catalogId: type: string description: The unique identifier of the catalog to query. filter: type: string description: A mandatory query expression to apply if the commerce request affects the query. operation: type: string description: The way the commerce request should affect query results. enum: - selectCatalogObjects - excludeCatalogObjects RestFacetSearchParameters: oneOf: - $ref: '#/components/schemas/RestFacetSearchParametersSpecific' - $ref: '#/components/schemas/RestFacetSearchParametersHierarchical' discriminator: propertyName: type mapping: specific: '#/components/schemas/RestFacetSearchParametersSpecific' hierarchical: '#/components/schemas/RestFacetSearchParametersHierarchical' RestFacetRequestHierarchicalBase: type: object required: - type properties: type: type: string description: Request facet values that represent hierarchically structured categories (e.g., Electronics > Computers > Laptops). enum: - hierarchical basePath: type: array items: type: string example: - Doors - Metal description: The base path shared by all values for the facet. currentValues: type: array items: $ref: '#/components/schemas/RestFacetValueHierarchical' default: [] description: The values displayed by the facet in the search interface at the moment of the request. filterByBasePath: type: boolean default: true example: true description: Whether to use `basePath` as a filter for the results. numberOfValues: type: integer format: int32 default: 8 description: "The maximum number of facet values to fetch.\n\n**Note:**\n - `numberOfValues` is not taken into account when no elements in the `currentValues` array have `retrieveChildren` set to `true`. This is considered an exact facet retrieval and only returns values in `currentValues`." delimitingCharacter: type: string default: ; description: "The character to use to split field values into a hierarchical sequence.\n\n**Examples**:\n- In the multi-value field\n\n `c;c>folder2;c>folder2>folder3;`\n\n the delimiting character is `>`.\n\n- In the hierarchical field\n\n `c;folder2;folder3;`\n\n the delimiting character is `;`." sortCriteria: type: string default: occurrences description: 'The criterion to use for sorting returned facet values. **Allowed values**: - `score`: Sort values in descending score order. - `alphanumeric`: Sort values in ascending alphanumeric order. - `alphanumericNatural`: Sort values in ascending alphanumeric order using [natural sorting](https://en.wikipedia.org/wiki/Natural_sort_order). - `occurrences`: Sort values in descending order by their number of occurrences. **Note:** - The Coveo ML [DNE feature](https://docs.coveo.com/en/3383) only works with the `score` sort criterion. ' RestFacetRequestSpecificSortCriteriaExplicitAlphanumeric: type: object required: - type properties: type: type: string enum: - alphanumeric description: 'Sort values in alphanumeric order. ' order: type: string enum: - ascending - descending default: ascending description: '**Default:** ascending ' RestQueryResult: required: - absentTerms - childResults - clickUri - excerpt - excerptHighlights - firstSentences - firstSentencesHighlights - flags - hasHtmlVersion - hasMobileHtmlVersion - isRecommendation - isTopResult - isUserActionView - parentResult - percentScore - printableUri - printableUriHighlights - rankingInfo - rating - raw - score - summary - summaryHighlights - title - titleHighlights - totalNumberOfChildResults - uniqueId - primaryid - uri type: object properties: title: type: string description: "The item title. \n \n**Note:** When logging a **Click** usage analytics event for an opened query result item, the `documentTitle` field of that event should be set to the `title` value of the opened query result item." example: Differences between Coveo Cloud V2 and V1 uri: type: string description: 'The item URI. **Notes:** - Avoid using the `uri` value to create hyperlinks to the item. Use the `ClickUri` value instead. - When logging a **Click** usage analytics event for an opened query result item, the `documentUrl` field of that event should be set to the `uri` value of the opened query result item.' example: https://example.com/Root:0/topic:898/post:2 printableUri: type: string description: 'The human readable item URI. **Note:** Avoid using the `printableUri` value to create hyperlinks to the item. Use the `ClickUri` value instead.' example: https://example.com/topic:898/post:2 clickUri: type: string description: 'The hyperlinkable item URI. **Notes:** - Use the `clickUri` value when you want to create hyperlinks to the item, rather than the `uri` or `printableUri` value. - The `clickUri` value is not necessarily unique for each item.' example: https://example.com/t/1/898/2 uniqueId: type: string description: The unique item identifier. You should consider the `uniqueId` value as an opaque string. example: 84.72597$https://example.com/Root:0/Topic:898/Post:2 primaryid: type: string nullable: true description: The primary identifier of the item. See [primaryid field](https://docs.coveo.com/en/pa9c0434) for more details. example: KVUVKMCSIZLEYVLVMNLGQ4JQK4XDMNBQGY4C4ZDFMZQXK3DU excerpt: type: string description: The contextual excerpt generated for the item (see the `excerptLength` query parameter). example: '... the new Coveo Cloud V2 and Coveo Cloud V1 ... the main differences between the two Coveo Cloud versions ...' firstSentences: type: string nullable: true description: The first sentences retrieved from the item (see the `retrieveFirstSentences` query parameter). example: Hello, I know Coveo currently hosts organizations in two independent cloud platforms, the new Coveo Cloud V2 and Coveo Cloud V1, the original Coveo offering in the cloud. I would like to learn the main differences between the two Coveo Cloud versions ... summary: type: string nullable: true description: The item summary (see the `summaryLength` query parameter). flags: type: string description: The flags that are set on the item by the index. Distinct values are separated by semicolons. example: HasHtmlVersion;HasMobileHtmlVersion hasHtmlVersion: type: boolean description: Whether the index contains an HTML version of this item. example: true hasMobileHtmlVersion: type: boolean description: Whether the index contains a mobile HTML version of this item. example: true score: type: integer description: The total ranking score computed for the item (see the `sortCriteria` and `rankingFunctions` query parameters). format: int32 example: 1626 percentScore: type: number description: The item ranking score expressed as a percentage (see the `sortCriteria` and `rankingFunctions` query parameters). format: double example: 90.73539 rankingInfo: type: string nullable: true description: The raw debug information generated by the index to detail how the item was ranked. This property is `null` unless the `debug` query parameter is set to `true`. example: 'Document weights: Title: 0; Quality: 180; Date: 596; Adjacency: 0; Source: 500; Custom: 350; Collaborative rating: 0; QRE: 0; Ranking functions: 0; Total weight: 1626' rating: type: number description: '**Note:** The value of this property is always `3`.' format: double example: 3 isTopResult: type: boolean description: Whether the item score was boosted by a featured result rule in the query pipeline. example: false isRecommendation: type: boolean description: Whether the item score was boosted as a Coveo ML recommendation. example: false isUserActionView: type: boolean description: Whether the item score was boosted as a Coveo ML recommendation. example: false rankingModifier: type: string description: "If applicable, represents the type of ranking modification that was applied to this result. \n \n**Note:** When logging a **Click** usage analytics event for an opened query result item, the `rankingModifier` field of that event should be set to the `rankingModifier` value of the opened query result item, if available." example: TopResult titleHighlights: type: array description: The length and offset of each word to highlight in the item `title` string. items: $ref: '#/components/schemas/RestHighlightResponse' firstSentencesHighlights: type: array description: The length and offset of each word to highlight in the item `firstSentences` string. items: $ref: '#/components/schemas/RestHighlightResponse' excerptHighlights: type: array description: The length and offset of each word to highlight in the item `excerpt` string. items: $ref: '#/components/schemas/RestHighlightResponse' printableUriHighlights: type: array description: The length and offset of each word to highlight in the item `printableUri` string. items: $ref: '#/components/schemas/RestHighlightResponse' summaryHighlights: type: array description: The length and offset of each word to highlight in the item `summary` string. items: $ref: '#/components/schemas/RestHighlightResponse' parentResult: $ref: '#/components/schemas/RestQueryParentResult' childResults: type: array description: An array of references to the children of this item, if result folding was applied (see the `filterField` query parameter). The query results contained in this field will have both their parent and child results set to `null`. items: anyOf: - $ref: '#/components/schemas/RestQueryResult' totalNumberOfChildResults: type: integer description: The total number of children available in the index for this item, if result folding was applied (see the `filterField` query parameter). format: int64 absentTerms: type: array description: 'The basic query expression terms which this query result item does not match. **Note:** > This property is populated by terms from the query pipeline-processed `q` value (not from the original `q` value).' example: - platform - native - solution items: type: string raw: type: object additionalProperties: true description: The values of the fields which were retrieved for this item (see the `fieldsToInclude` and `fieldsToExclude` query parameters). example: clickableuri: https://example.com/t/1/898/2 author: Anonymous date: 1502796809427 filetype: forumpost language: - English conversationid: 898 messageid: 2 childid: 2 adjustednumberoflikes: 46 Title: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true Uri: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true PrintableUri: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true ClickUri: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true UniqueId: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true Excerpt: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true FirstSentences: type: string description: '> This property is deprecated; it should not be populated by Search API V2 searches.' deprecated: true FindFieldsResponse: type: object required: - fields properties: fields: type: array items: type: object properties: name: type: string required: - name example: name: '@author' ErrorMessage: type: object additionalProperties: true properties: statusCode: type: number example: 404 errorCode: type: string example: ORGANIZATION_DOES_NOT_EXIST message: type: string example: The organization does not exist in the search api. DQ: type: string description: The disjunction query expression, typically populated by Coveo ML Automatic Relevance Tuning (ART) 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)`. example: '@permanentid=aadd702687c62910d6da8347304ec2cedfd0b06d5b4d2794a555ce5688bd' RestQueryParametersBase: type: object properties: q: $ref: '#/components/schemas/Q' aq: $ref: '#/components/schemas/AQ' cq: $ref: '#/components/schemas/CQ' dq: $ref: '#/components/schemas/DQ' lq: $ref: '#/components/schemas/LQ' queryCorrection: type: object required: - enabled description: "This parameter controls the behavior of the Coveo query correction feature.\n\nOnce enabled, this feature will:\n - Attempt to correct your query if it doesn't return enough results.\n - If corrections are found, the API will automatically correct your query.\n\nQuery corrections are derived from the index's _Did You Mean_ feature and ML query corrections.\n\nCorrection information will be returned in the `queryCorrection` property of the response.\n\nIf the query was automatically corrected, it will return:\n\n - The original query\n - The corrected query\n\nOtherwise, it will return:\n\n - A list of corrections generated by our system.\n\nThis feature is off by default for backward compatiblity reasons.\n" properties: enabled: type: boolean description: 'Whether or not this feature should be enabled. If it''s set to false, other `queryCorrection` properties will be ignored. > **Note:** > You don''t have to set `enableDidYouMean` or `enableMlDidYouMean` to use this feature. The `queryCorrection` parameter takes precedence over them. ' options: type: object properties: automaticallyCorrect: type: string enum: - never - whenNoResults default: whenNoResults description: "If set to `whenNoResults`, there are no results returned by the query and the original basic query expression (`q`) appears to have been misspelled, the Search API will attempt to correct the `q` value by either:\n\n - applying keyword corrections, if any were provided by the _Did You Mean_ index feature, or otherwise\n - replacing the original `q` value with the highest ranked Coveo ML query suggestion that will return results.\n\n If the `q` value was corrected, the Search API will then automatically fetch results from the index using the corrected `q` rather than the original one.\n\nIf set to `never`, potential corrections found by the _Did You Mean_ index feature will be returned instead of being automatically applied.\n" enableDidYouMean: type: boolean 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. **Notes:** - The Did You Mean feature only processes the basic query expression (see the `q` parameter). - When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array. - 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. **Default:** `false`' example: true default: false mlDidYouMeanMaxCandidates: type: integer description: 'The maximum number of Coveo ML Did You Mean candidates to request from the query suggestions model. **Default:** `3`' format: int32 example: 5 default: 3 mlDidYouMeanMinScore: type: number 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`]. **Default:** `1.0`' format: double example: 0.8 default: 1 mlDidYouMeanUseFacetCount: type: boolean description: 'Whether to use facet counts for the Coveo ML Did You Mean feature. Can improve results, but requires more processing. **Default:** `false`' example: true default: false enableMLDidYouMean: type: boolean description: '**Important:** This feature is still in an experimental state. Whether to enable the Coveo ML query suggestions _Did You Mean_ feature, which populates the `queryCorrections` property of a successful response with keyword correction suggestions. **Notes:** - The Coveo ML query suggestions Did You Mean feature only processes the basic query expression (see the `q` parameter). - When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array. **Default:** `false`' example: true default: false partialMatch: type: boolean 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. If you do not set this parameter to `true`, an item must contain all of the basic expression keywords to match the expression. **Notes:** - This feature only applies to the basic expression (`q`) of a query, and to the basic `queryOverride` of its Group By operations. - 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.). **Default:** `false`' example: true default: false partialMatchKeywords: type: integer description: 'The minimum number of keywords that need to be present in a basic expression to convert it to a partial match expression. **Notes:** - This parameter has no meaning unless the `partialMatch` parameter is set to `true`. - Repeated keywords in a basic expression count as a single keyword. - Thesaurus expansions in a basic expression count towards the `partialMatchKeywords` count. - Stemming expansions **do not** count towards the `partialMatchKeywords` count. See also the `partialMatchThreshold` parameter. **Default:** `5`' format: int32 example: 4 default: 5 partialMatchThreshold: type: string 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. If specified, the `partialMatchThreshold` value must either be: - a 32-bits unsigned integer (e.g., `3`), - a percentage value between 0% and 100% (e.g., `75%`), - the empty string, or - the `all` string. The `""` and the `all` value are both equivalent to `100%`. **Notes:** - This parameter has no meaning unless the `partialMatch` parameter is set to `true`. - A keyword and its stemming expansions count as a single keyword when evaluating whether an item meets the `partialMatchThreshold`. See also the `partialMatchKeywords` parameter. **Examples:** - `3` - `75%` - `all` **Default:** `50%`' example: 75% default: 50% lqPartialMatchMaxKeywords: type: integer 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. **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`). Setting this parameter to a high value can negatively impact the performance of queries, while setting it too low can produce less relevant results. See also the `lqPartialMatchThreshold` parameter. **Default value**: `100`' format: int32 example: 20 default: 100 lqPartialMatchKeywords: type: integer 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. **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`). See also the `lqPartialMatchThreshold` parameter. **Default**: `5`' format: int32 example: 4 default: 5 lqPartialMatchThreshold: type: string 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. If specified, the `lqPartialMatchThreshold` value must either be: - a 32-bits unsigned integer (e.g., `3`), - a percentage value between 0% and 100% (e.g., `75%`), - the empty string (`""`), or - the `all` string. The `""` and `all` values are both equivalent to `100%`. **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`). See also the `lqPartialMatchKeywords` parameter. **Examples:** - `3` - `75%` - `all` **Default:** `50%`' example: 75% default: 50% wildcards: type: boolean 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. See [Using Wildcards in Queries](https://docs.coveo.com/en/1580/). **Default:** `false`' example: true default: false questionMark: type: boolean 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. **Note:** Setting this parameter to `true` has no effect unless you also set the `wildcards` parameter to `true`. See [Using Wildcards in Queries](https://docs.coveo.com/en/1580/). **Default:** `false`' example: true default: false enableQuerySyntax: type: boolean 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. **Default:** `true`' example: true default: true lowercaseOperators: type: boolean 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. **Note:** Setting this parameter to `true` has no effect unless you also set the `enableQuerySyntax` parameter to `true`. **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. **Default:** `false`' example: false default: false excerptLength: type: integer description: 'The maximum length of result excerpts (in number of characters). An *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. An *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. **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). **Default:** `200`' format: int32 example: 250 default: 200 retrieveFirstSentences: type: boolean description: 'Whether to include the first sentences of textual items in the query results. First 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). **Note:** The maximum length of the retrieved sentences (in number of characters) is determined by the value of the `excerptLength` parameter. **Default:** `false`' example: true default: false fieldsToInclude: type: array description: 'The names of the fields to include with each item in the query results. If specified, no other fields will be included. **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. If 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.' example: - clickableuri - author - date - filetype - language - conversationid - messageid - childid - adjustednumberoflikes items: type: string fieldsToExclude: type: array 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. **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. If 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.' example: - documenttype - size - source items: type: string groupBy: type: array description: The Group By operations to perform on the query results, typically to extract facets. items: $ref: '#/components/schemas/RestGroupBy' facets: type: array description: The facet operations to perform on the query results. items: $ref: '#/components/schemas/RestFacetRequest' generateAutomaticFacets: type: object description: Generate facets based on the most relevant fields in the index. properties: desiredCount: type: integer format: int32 description: The desired number of automatically generated facets. minimum: 0 maximum: 20 generationStrategy: type: string description: "Defines the strategy used to decide which facets will be automatically generated.\n - `mostRelevant`: Returns a maximum of `desiredCount` **relevant** facets. If fewer relevant facets are available, only those will be returned. This option prioritizes quality over quantity.\n - `matchDesiredCount`: Returns all available `desiredCount` facets in your organization, even if some have lower relevance. This option prioritizes quantity over quality." enum: - mostRelevant - matchDesiredCount default: mostRelevant numberOfValues: type: integer format: int32 description: The desired number of automatically generated facet values. default: 8 minimum: 1 fields: $ref: '#/components/schemas/RestAutomaticFacetScope' currentFacets: type: array items: type: object required: - field - currentValues properties: field: type: string description: 'The name of the field on which to base the facet request. **Note:** Must reference a field whose **Facet** option is enabled (see [Manage fields](https://docs.coveo.com/en/1833/)).' example: author label: type: string description: A human-readable title that describes the facet. type: type: string enum: - specific description: Request facet values representing specific values (e.g., Alice Smith, Bob Jones, etc.). currentValues: type: array description: 'The values displayed by the facet in the search interface at the moment of the request. **Default:** `[]`' items: $ref: '#/components/schemas/RestFacetSpecificValue' sortCriteria: type: string enum: - score - occurrences - alphaAscending - alphaDescending description: 'The criterion to use when sorting the Group By operation results. **Allowed values:** - `score`: sort using the score value which is computed from the number of occurrences of a field value, and also from the position where query result items with this field value appear in the ranked query result set. When using this sort criterion, a field value with 100 occurrences might appear after one with only 10 occurrences, if the occurrences of the latter field value tend to appear higher in the ranked query result set. - `occurrences`: sort by occurrences, with field values that have the highest number of occurrences appearing first. - `alphaAscending`/`alphaDescending`: sort field values alphabetically.' example: score tags: type: array description: 'Optional tag filters used to scope automatic facet candidates by property. If you leave this parameter empty or undefined, automatic facet candidates are not tag filtered.' maxItems: 50 items: type: string maxLength: 64 pattern: ^[A-Za-z0-9._:-]+$ facetOptions: $ref: '#/components/schemas/RestFacetOptions' categoryFacets: type: array description: Data to easily query a hierarchical field using a path of hierarchical values. items: $ref: '#/components/schemas/RestCategoryFacetRequest' sortCriteria: type: string description: 'The criteria to use for sorting the query results. **Allowed values:** - `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. - `date ascending`/`date descending`: use the `@date` field to sort the query results. This field typically contains the last modification date of each item. - `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. - `nosort`: do not sort the query results; the index will return result items in an essentially random order. - `@[field] ascending`/`@[field] descending`: sort using the value of a specific sortable field (replace `[field]` by the target field name). You can specify a list of comma-separated sort criteria. However, this only works when combining: - two or more field criteria (e.g., `@views descending,@likes descending`). - a single date criteria with one or more field criteria (e.g., `date ascending,@views descending`). **Examples:** - `date ascending` - `@author ascending` - `date descending,@views descending,@likes descending` **Default:** `relevancy`' example: DateDescending default: Relevancy rankingFunctions: type: array description: 'The array of [ranking functions](https://docs.coveo.com/en/1448/) to execute on each query result item. The 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).' items: $ref: '#/components/schemas/RestRankingFunction' queryFunctions: type: array description: 'The array of [query functions](https://docs.coveo.com/en/1451/) to execute on each query result item. The result of a query function is stored in a temporary, dynamic field created at query time.' items: $ref: '#/components/schemas/RestQueryFunction' firstResult: type: integer description: 'The 0-based position of the first result to return in the non-paginated result set. Along with the `numberOfResults` parameter, this allows you to retrieve a specific page of result items. **Note:** This can''t be greater than the `maximumResults` value configured for your index. By default, `maximumResults` is set to 5,000 items. **Default:** `0`' format: int32 example: 2 default: 0 numberOfResults: type: integer description: 'The number of results to return. Along with the `firstResult` parameter, this allows you to retrieve a specific page of result items. This parameter also defines the maximum number of results which can be returned by the Coveo ML Recommendations feature. **Note:** The maximum `numberOfResults` value is 2,000 items. **Default:** `10`' format: int32 example: 5 default: 10 minimum: 0 enableDuplicateFiltering: type: boolean description: 'Whether to filter out duplicates, so that items resembling one another only appear once in the query results. **Notes:** - Two items must be at least 85% similar to one another to be considered duplicates. - When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set. - 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. - Duplicate filtering and [result folding](https://docs.coveo.com/en/1466/) are mutually exclusive. **Default:** `false`' example: true default: false filterField: type: string 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/)). Use a field whose value is identical for all items to group under the same folded query result. See also the `parentField`, `childField`, and `filterFieldRange` parameters. **Notes:**: - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.' example: '@foldingcollection' parentField: type: string 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/)). Use 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. See also the `filterField`, `childField`, and `filterFieldRange` parameters. **Notes:** - 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. - The values of the `parentField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index). - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.' example: '@foldingchild' childField: type: string 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/)). Use 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. See also the `filterField`, `parentField`, and `filterFieldRange` parameters. **Notes:** - 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. - The values of the `childField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index). - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.' example: '@foldingparent' filterFieldRange: type: integer 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/)). See also the `filterField`, `parentField`, and `childField`. **Notes:**: - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive. **Default:** `5`' format: int32 example: 8 default: 5 summaryLength: type: integer description: 'The length of the automatically generated item summary. The 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. This *summary* is generated independently from the query, as opposed to a result item *excerpt*, which is generated based on query keywords. **Default:** `0`' format: int32 default: 0 sortField: type: string description: This parameter is exposed for backward compatibility reasons. Use the `sortCriteria` parameter along with the `@[field] ascending/@[field] descending` syntax instead. deprecated: true disableQuerySyntax: type: boolean description: This parameter is exposed for backward compatibility reasons. Use the `enableQuerySyntax` parameter instead. default: false deprecated: true staticQuery: type: boolean 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/)). **Note:** Setting this parameter to `true` overwrites the `maximumAge` parameter value for this query. **Default:** `false`' example: true default: false userActions: $ref: '#/components/schemas/RestUserActionParameter' commerce: $ref: '#/components/schemas/RestCommerceParameters' dictionaryFieldContext: type: object additionalProperties: type: string 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. **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.' example: price: storeA freeTextSearchFields: type: array description: 'The fields to use when performing free-text search. When provided, only these fields are searched for free-text terms.' maxItems: 5 items: type: string minLength: 1 maxLength: 510 pattern: ^@?[a-zA-Z0-9_]+$ fieldAliases: $ref: '#/components/schemas/RestFieldAliases' MaximumAge: type: integer nullable: true description: 'The maximum age of cached results, in milliseconds. If 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. Such cache hits improve responsiveness but still count as queries in your queries per month (QPM) count. **Note:** This parameter is automatically overridden when `staticQuery` is set to `true`. **Default:** `-1` (which corresponds to the internal default value (15 minutes)' format: int32 example: 1800000 default: -1 RestFacetRequestNumericalRange: allOf: - $ref: '#/components/schemas/RestFacetRequestBase' - $ref: '#/components/schemas/RestFacetRequestRangeBase' - $ref: '#/components/schemas/RestFacetRequestNumericalRangeBase' RestFacetRequestSpecificSortCriteriaExplicitCustomSort: type: object required: - type - customSort deprecated: true description: 'The `customSort` sortCriteria has been deprecated. You should leverage the `customSort` attribute of the facet request. ' properties: type: type: string enum: - custom description: "Specifies a custom order by which facet values must be sorted.\nSpecified values will appear at the top of the list and remaining values will be sorted according to the default sort.\n\nThe default sort for remaining values:\n - When `isFieldExpanded` is `false` in the facet request, and `moreValuesAvailable` is `true` in the corresponding facet response, the default sort value is `score`.\n - Otherwise, the default sort value is `alphanumeric`.\n" customSort: type: array minItems: 1 maxItems: 25 description: 'Facet values that must appear at the top, in this order. For example, if you have a facet for bed sizes, you might have: - Simple - Twin - Queen - King ' items: type: string example: - Simple - Twin - Queen - King RestFacetSpecificValue: allOf: - $ref: '#/components/schemas/RestFacetValueBase' - $ref: '#/components/schemas/RestFacetValueSpecificBase' RestRangeValue: required: - end - start type: object properties: start: anyOf: - type: string - type: number - type: integer end: anyOf: - type: string - type: number - type: integer label: type: string description: 'The label to associate with the range. **Note:** Not currently leveraged. **Examples:** - `0 - 100` - `In 2019`' example: 0 - 100 endInclusive: type: boolean description: 'Whether to include the `end` value in the range. **Default:** `false`' example: true default: false RestFacetValueSpecificBase: type: object required: - value properties: value: type: string example: Alice Smith description: The facet value name. RestQuerySuggestParametersBase: type: object properties: q: type: string description: 'The *basic query* expression, typically the keywords entered by the end user in a query box. ' example: Coveo "Cloud V2" platform autoCompleter: type: string description: This parameter is exposed for backward compatibility reasons. deprecated: true count: type: integer description: 'The desired number of query suggestions. ' format: int32 enableWordCompletion: type: boolean 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. ' RestFacetValueBase: type: object properties: state: type: string enum: - idle - selected - excluded default: idle description: The current facet value state in the search interface. previousState: type: string enum: - idle - selected - excluded description: 'The previous facet value state in the search interface. **Default:** The value provided in the `state` property.' preventAutoSelect: type: boolean default: false description: Whether to prevent Coveo ML from automatically selecting the facet value. ActionsHistory: type: array nullable: true items: $ref: '#/components/schemas/ActionHistory' description: 'The query and page view actions previously made by the current user. Coveo Machine Learning event recommendations models use this information to provide contextually relevant output. **Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script.' example: - name: Query value: Machine learning powered search time: '2017-08-16T11:33:29.427Z' - name: PageView value: http://www.example.com/ time: '2017-08-15T17:34:08.398Z' LQ: type: string 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). example: I am looking for an enterprise-class native cloud SaaS/PaaS solution that provides a unified and secure way to search for contextually relevant content across multiple enterprise systems. parameters: Referrer: name: referrer in: 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). Coveo Machine Learning models may use this information to provide contextually relevant output. **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. See also the `context` parameter. ' schema: type: string ViewAllContentQuery: name: viewAllContent in: query description: Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege. schema: type: boolean Context: name: context in: 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. Coveo 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. **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`). See also the `referrer` parameter. **Example** `{"userAgeRange":"25-35","userRoles":["PremiumCustomer","ProductReviewer"]}` ' content: application/json: schema: type: object Tab: name: tab in: 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" schema: type: string Locale: name: locale in: 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. Coveo 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. **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`). ' schema: type: string Pipeline: name: pipeline in: query description: 'The name of the query pipeline to use for this request (bypassing its conditions, if it has any). You can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `"pipeline": ""`). If 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). **Notes:** - 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. - 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. - 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). See also [Managing Query Pipelines](https://docs.coveo.com/en/1450/). ' schema: type: string Index: name: index in: query description: 'The identifier of the index mirror to forward the request to. See also the `indexToken` parameter. If you do not specify an `index` (or `indexToken`) value, any index mirror could be used. **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). ' schema: type: string Timezone: name: timezone in: 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. If not specified, the default time zone of the server hosting the index is used. **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. ' schema: type: string OrganizationIdQuery: name: organizationId in: query description: 'The unique identifier of the target Coveo Cloud organization. Specifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token.' example: mycoveocloudv2organization schema: type: string SearchHub: name: searchHub in: query description: 'The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Notes:** - 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. - 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. See also the `tab` parameter. ' schema: type: string AnalyticsRequestParameters: name: analytics in: query content: application/json: schema: $ref: '#/components/schemas/AnalyticsRequestParameters' LogicalIndex: name: logicalIndex in: query description: 'The identifier for a logical group of indexes that have been configured to include documents from the same sources. If you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes. ' schema: type: string IndexToken: name: indexToken in: query description: 'The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter. If you do not specify an `indexToken` (or `index`) value, any index mirror could be used. **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). ' schema: type: string responses: TooManyRequests: description: 'Too Many Requests (see: https://docs.coveo.com/en/1471/build-a-search-ui/troubleshoot-query-error-codes#429-too_many_requests)' content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: statusCode: 429 message: Too many requests. NotFound: description: 'Not Found (see: https://docs.coveo.com/en/1471/build-a-search-ui/troubleshoot-query-error-codes#404-not_found)' content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: statusCode: 404 message: The requested Search API endpoint does not exist. errorCode: NOT_FOUND securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://platform.cloud.coveo.com/oauth/authorize tokenUrl: https://platform.cloud.coveo.com/oauth/token scopes: full: required