Skip to main content
GET
Returns a page of the documents in a repository, sorted by name. Each document wraps one file and carries its indexing status. Documents synced from a connected source, such as a SharePoint folder, are listed too. Pass folder_id to list only the documents directly in one folder. Find folder ids with List folders. A page of a folder can hold fewer than limit documents, even none, while cursor is not null: its subfolders take up room in the page. Keep going until cursor is null. To find documents that failed to index, walk the pages and check indexing_status. indexing_error_code says why each one failed, when Wordsmith knows the cause.

Authentication

Requires an API key, or an OAuth token with repositories:read.

Path parameters

string
required
The repository id.

Query parameters

string
Only documents directly in this folder. Documents in its subfolders are not included.
string
The cursor from the previous page. Leave it out for the first page.
integer
default:"50"
Documents per page, from 1 to 100.

Response

Returns 200 with a page of documents. cursor is null on the last page.
object[]
string | null

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.

Errors