Read a served document
Returns the served text of one document, in parts of up to 60,000 characters. While `next_offset` is not null, call again with `offset=next_offset` to read the next part.
Returns the served text of one document, in parts of up to 60,000 characters. While next_offset is not null, call again with offset=next_offset to read the next part.
Your API key as a bearer token.
In: header
Path Parameters
The doc_id returned by search.
Query Parameters
Character offset to start from. A whole number of 0 or more. A value past the end of the document returns an empty text. Defaults to 0.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/knowledge/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"doc_id": "c8561737-9a40-4d91-8958-e405c0ad8596",
"title": "string",
"bucket": "string",
"provenance": {
"status": "served",
"redacted": true,
"engine": "string",
"scanned_at": "2019-08-24T14:15:22Z"
},
"offset": 0,
"next_offset": 0,
"total_chars": 0,
"text": "string"
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}List knowledge buckets GET
Lists the knowledge buckets of the app the API key belongs to, with the number of documents currently served from each. The key must be tied to an app; the app is taken from the key, never from the request.
Search served knowledge POST
Searches the documents currently served from the app's buckets. Combines keyword and semantic ranking and returns at most one hit per document. When semantic search is unavailable the response has `mode: "keyword"` and a `note` saying so. Documents in review or still being scanned are not searched; the previously served version keeps answering until the new one is released.