Knowledge
Get a document
GET
The document with its ingestion report: what happened to it, stage by stage, and why it failed if it did; while it is read or indexed, how far it has got (progress).
More in Knowledge API.
apiKeyheader
AuthorizationBearer <token>An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.
doc_id*stringSuccessful Response
application/json- response
id*stringkb_id*stringpath*stringsource*stringValue in
"upload""web""record""vault"source_url?string|nullstatus*stringValue in
"queued""parsing""indexing""indexed""partial""failed""skipped""paused""blocked""deleting"status_reason?string|nullerror?string|nullversion?integerDefault
0sha256?string|nullsize_bytes?integer|nullmime?string|nulltitle?string|nulldoc_date?string|nullmetadata?pages?integer|nullchunks?integer|nulltokens?integer|nullcreated_at?string|nullupdated_at?string|nullindexed_at?string|nullprogress?|nullreport?|nullcurl -X GET "https://api.synapseorch.com/api/v1/knowledge/documents/kdoc_01a10f6c8e0a2c4e6a8c0e2a4c6e8a0c" \ -H "Authorization: Bearer sk-syn-..."{ "id": "string", "kb_id": "string", "path": "string", "source": "upload", "source_url": "string", "status": "queued", "status_reason": "string", "error": "string", "version": 0, "sha256": "string", "size_bytes": 0, "mime": "string", "title": "string", "doc_date": "string", "metadata": {}, "pages": 0, "chunks": 0, "tokens": 0, "created_at": "string", "updated_at": "string", "indexed_at": "string", "progress": { "stage": "parse", "done": 0, "total": 0, "unit": "pages", "eta_s": 0, "waiting": { "reason": "rate_limited", "provider": "string", "provider_id": "string", "until": "string" }, "updated_at": "string" }, "report": { "report_version": 1, "doc_id": "string", "path": "string", "sha256": "string", "attempt": 1, "started_at": "string", "finished_at": "string", "outcome": "queued", "status_reason": "string", "stages": [ { "stage": "fetch", "status": "ok", "started_at": "string", "duration_ms": 0, "detail": {}, "error": { "code": "string", "message": "string", "retryable": false } } ], "pages": { "total": 0, "with_text": 0, "no_text_layer": 0, "ocr_applied": 0, "ocr_failed": 0, "skipped": [ 0 ] }, "chunks": { "count": 0, "by_kind": { "property1": 0, "property2": 0 }, "tokens": 0 }, "warnings": [ { "code": "no_text_layer", "message": "string", "page": 0, "block_id": "string", "count": 1 } ], "cost": { "est_usd": 0, "charged_microusd": 0, "by_stage": { "property1": 0, "property2": 0 } }, "parser": { "name": "string", "version": "string", "options_hash": "" }, "snapshot_id": "string", "retry": { "allowed": true, "hint": "string" } }}