Search Documents
POST/documents/search
Search Datasphere Documents
Request
- application/json
Body
required
Document tags.
["sports","football","game"]
Unique ID of a Document.
Search term.
Most paid athlete
Specifies how closely related the query is to the document. Low distance means high relevance and similarity. High distance means low relevance and similarity.
Possible values: <= 78.3836717690617
2
Specifies number of returned Chunks.
5
Language of the Document.
en
fr
Part of Speech considered for expansion or analysis.
["NOUN","VERB","ADJ","ADV"]
["NOUN","VERB"]
Maximum number of synonyms to consider.
10
7
Responses
- 200
- 401
- 404
- 422
The request has succeeded.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
A search result.
Cristiano Ronaldo is the highest-paid football player in the world in 2024
Unique ID of a Document.
[
{
"text": "Cristiano Ronaldo is the highest-paid football player in the world in 2024",
"document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
Access is unauthorized.
- application/json
- Schema
Schema
string
Possible values: [Unauthorized
]
The server cannot find the requested resource.
- application/json
- Schema
Schema
string
Possible values: [Not Found
]
Client error
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
required
Error type.
Error code.
Error details.
Request parameter associated with this error.
Link to developer resource for this error.
{
"errors": [
{
"type": "validation_error",
"code": "invalid_parameter",
"message": "Invalid tags",
"attribute": "tags",
"url": "https://developer.signalwire.com/rest/overview/error-codes#{code}"
}
]
}