Repositories and search
Get document
Read one document in a repository, including its indexing status.
GET
Returns one document. Use it to check whether a document is searchable yet: it is once
indexing_status is indexed. When it is failed, indexing_error_code says why, if Wordsmith knows.
The document’s file_id is a normal file. Read or download its content through the files API.
Authentication
Requires an API key, or an OAuth token withrepositories:read.
Path parameters
The document id. This is the
id from List documents, not the file_id.Response
Returns200 with the document.
The uploaded file behind the document.
null for a document synced from a connected source, such as SharePoint.pending until it is indexed, then indexed. failed when indexing failed, or it has not finished two days after the document was added. encrypted when a sensitivity label encrypts the file and Wordsmith keeps it encrypted. restricted when a sensitivity label limits who may read the file, so Wordsmith does not index it and each reader gets a copy only after your data loss prevention policy allows it.Why the document failed to index, as one of the indexing error codes.
null unless indexing_status is failed, and when Wordsmith does not know the cause.The uploaded file’s sensitivity label from your organisation’s labelling system, such as Microsoft Purview:
provider, name (null when Wordsmith can’t name the label) and is_protected (the label encrypts the file). null when the file has no label, and for a document synced from a connected source.Indexing error codes
indexing_error_code says why a document failed to index. It is null while indexing_status is not failed. It is also null when the document failed with no known cause, which includes a document that is still not indexed two days after it was added.
Today a code is set only for a document synced from a connected source. An uploaded file that fails to index returns null.
New codes can be added. Treat a code you don’t know as a failure with no known cause.