List the history of previous queries
GET/v2/queries
Retrieve query histories.
Request
Query Parameters
Specifies the corpus_key
used in the query.
Queries that started after a particular date-time.
Queries that started before a particular date-time.
Specifies the chat_id of the query, this will return all queries in the specified chat.
Possible values: >= 1
and <= 100
Default value: 10
Specifies the maximum number of query history listed.
Used to retrieve the next page of query histories after the limit has been reached.
Header Parameters
Possible values: >= 1
The API will make a best effort to complete the request in the specified seconds or time out.
Possible values: >= 1
The API will make a best effort to complete the request in the specified milliseconds or time out.
Responses
- 200
- 400
- 403
An array of Query Histories.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
queries object[]
The ID of the query history.
The actual query made.
The corpus key that the query was made on.
ISO date time indicating when the query was first received.
Time that the query took in milliseconds.
The unique ID of the chat associated with the query, if this query is part of a chat.
Generated response to the query, if requested.
The factual consistency score of the generation.
metadata object
The metadata for the list of query histories.
A query parameter required when requesting the next page of results.
{
"queries": [
{
"id": "string",
"query": "string",
"corpus_key": "string",
"started_at": "2024-12-13T17:52:53.680Z",
"latency_millis": 0,
"chat_id": "string",
"generation": "string",
"factual_consistency_score": 0
}
],
"metadata": {
"page_key": "string"
}
}
Query history list request was malformed.
- application/json
- Schema
- Example (from schema)
Schema
field_errors object
The errors that relate to specific fields in the request.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"field_errors": {},
"messages": [
"string"
],
"request_id": "string"
}
Permissions do not allow listing query histories.
- application/json
- Schema
- Example (from schema)
Schema
The messages describing why the error occurred.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"messages": [
"Internal server error."
],
"request_id": "string"
}