/api/v2/query
  • 23 Jul 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

/api/v2/query

  • Dark
    Light
  • PDF

Article summary

Post
/api/v2/query

This endpoint can be used to retrieve top n chunks per query.

The query can be a single string or a list of strings.

The collection field can be used to specify the collection to query, which defaults to base_collection.

An optional integer n can be provided in order to retrieve top n chunks, which defaults to 5 if not specified.

Body parameters
object

Serializer for input queries to the retrieve endpoint.

query
string Required
collection
string | null
n
integer | null
object

Serializer for input queries to the retrieve endpoint.

query
string Required
collection
string | null
n
integer | null
object

Serializer for input queries to the retrieve endpoint.

query
string Required
collection
string | null
n
integer | null
Responses
200
Array of object
object

Serializer for the result of a query.

query
string
chunks
Array of object (RetrieveResultChunk)
object
uuid
string (uuid)
text
string
metadata
object
collection
string
score
number (double)

Was this article helpful?