Tawa docs
Knowledge

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.

GET
/knowledge/documents/{docId}

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.

Authorization

AuthorizationBearer <token>

Your API key as a bearer token.

In: header

Path Parameters

docId*string

The doc_id returned by search.

Query Parameters

offset?integer

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
}