Retrieve a document
Retrieve the info for a document.
curl --request GET \
--url https://api.agentset.ai/v1/namespace/{namespaceId}/documents/{documentId} \
--header 'Authorization: Bearer <token>'
{
"success": true,
"data": {
"id": "<string>",
"ingestJobId": "<string>",
"externalId": null,
"name": null,
"tenantId": null,
"status": "BACKLOG",
"error": null,
"source": {
"type": "TEXT",
"text": "<string>"
},
"properties": null,
"totalChunks": 123,
"totalTokens": 123,
"totalCharacters": 123,
"totalPages": 123,
"createdAt": "<string>",
"queuedAt": null,
"preProcessingAt": null,
"processingAt": null,
"completedAt": null,
"failedAt": null
}
}
Authorizations
Default authentication mechanism
Headers
The tenant id to use for the request. If not provided, the default tenant will be used.
Path Parameters
The id of the namespace to retrieve.
The id of the document to retrieve.
Response
The unique ID of the document.
The ingest job ID of the document.
A unique external ID.
The name of the document.
The tenant ID of the ingest job.
The status of the document.
BACKLOG
, QUEUED
, QUEUED_FOR_RESYNC
, QUEUED_FOR_DELETE
, PRE_PROCESSING
, PROCESSING
, DELETING
, CANCELLING
, COMPLETED
, FAILED
, CANCELLED
The error message of the document. Only exists when the status is failed.
The total number of chunks.
The total number of tokens.
The total number of characters.
The total number of pages. Will be 0 if the document is not paged (e.g. PDF).
The date and time the document was created.
The date and time the document was queued.
The date and time the document was pre-processed.
The date and time the document was processed.
The date and time the document was completed.
The date and time the document failed.
curl --request GET \
--url https://api.agentset.ai/v1/namespace/{namespaceId}/documents/{documentId} \
--header 'Authorization: Bearer <token>'
{
"success": true,
"data": {
"id": "<string>",
"ingestJobId": "<string>",
"externalId": null,
"name": null,
"tenantId": null,
"status": "BACKLOG",
"error": null,
"source": {
"type": "TEXT",
"text": "<string>"
},
"properties": null,
"totalChunks": 123,
"totalTokens": 123,
"totalCharacters": 123,
"totalPages": 123,
"createdAt": "<string>",
"queuedAt": null,
"preProcessingAt": null,
"processingAt": null,
"completedAt": null,
"failedAt": null
}
}