{ "name": "RetrievePassagesRequestV3", "structure": { "type": "object", "required": [ "query", "localization" ], "properties": { "query": { "type": "string", "description": "The query for which to retrieve the passage(s).\n" }, "filter": { "type": "string", "description": "A filter expression that will be applied during the first stage retrieval.\n\nThe expression must comply with the Coveo Query Language (CQL) syntax.\n" }, "additionalFields": { "type": "array", "description": "The fields to include in the response.\n\nWhen omitted, only the identifier of the document will be returned.\n", "items": { "type": "string" } }, "maxPassages": { "type": "integer", "format": "int32", "description": "The maximum number of passage(s) to retrieve." }, "pipeline": { "type": "string", "description": "The name of the query pipeline to use for this request (bypassing its conditions, if it has any).\n\nYou can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `\"pipeline\": \"\"`).\n\nIf a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any).\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `\"default\"` value.\n\nSee also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).\n" }, "searchHub": { "type": "string", "description": "The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates.\n\nCoveo Machine Learning models use this information to provide contextually relevant output.\n\n**Notes:**\n\n- This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition.\n- When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter.\n" }, "localization": { "type": "object", "required": [ "locale" ], "description": "Localization parameter.", "properties": { "locale": { "type": "string", "description": "The locale of the current user. Must comply with IETF's BCP 47 definition.\n\nCoveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the $locale object.\n\nNote: When logging a Search usage analytics event, the language field of that event should match the language part of the locale value of the query (e.g., en-US in locale becomes en in language).\n" }, "timezone": { "type": "string", "description": "The [tz database identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the user's time zone. Used for interpreting dates in query expressions and retrieving passages." } } }, "context": { "type": "object", "description": "The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object." }, "analytics": { "type": "object", "properties": { "capture": { "type": "boolean", "description": "Whether the API call should be tracked for analytics. When not provided, it defaults to `false`.\n" }, "clientId": { "type": "string", "description": "A UUID identifying the client or agent that generated the event." }, "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.\n\n**Note**: This information is required when endpoints are behind a proxy.\n" } } } } } }