Skip to main content

Documents

Documents, document versions, fragments and the document paths of a pipeline. Documents, versions and fragments describes the lifecycle of a document, and Document paths describes paths.

📄️List document versions

Returns the versions of a document as a JSON array, newest first, without the list envelope. By default the array contains only current versions, and `include_expired=true` adds the expired versions. The array omits versions whose classification the key's classification allow-list does not cover. A document identifier that was never used, or whose versions were all deleted, returns HTTP 404. A document whose versions have all expired, or were all created after `as_of`, returns an empty array.

📄️List documents

Returns one page of the document versions in a pipeline that are current, or that were current at the time given in `as_of`. A document with several current versions appears once for each version. Query parameters filter the list by document fields, by path and by metadata, and the `status` filter finds versions whose processing is not complete or has failed. Without `path`, the list contains only the documents without a path; `path=>` lists every document that has a path. No single request lists the documents with and without a path together.

📄️Add a document

Adds a document to a pipeline, or a new version of the document that has the same `external_identifier` in the pipeline. The optional `path` field places the version at a document path, and a new version does not inherit the path of the previous version. Processing is asynchronous: the response returns the new version with the status `pending`, or `failed` when the processing job cannot be queued. The client application retrieves the document until the status is `success`, `failed` or `canceled`.

📄️Get fragments by ID

Returns the fragments of a pipeline that have the given identifiers, with the decrypted text in `page_content`, as a JSON array without the list envelope, in the order of the identifiers in the request. The array omits identifiers that match no fragment, fragments whose classification is outside the key's classification allow-list for the pipeline and, unless the request sets `include_expired=true`, fragments of expired document versions. A request names at most 1,000 identifiers.

📄️List document paths

Returns the paths of the documents in a pipeline that match the `path` pattern, with the number of documents at each path, ordered by the bytes of the path. The list counts the current document versions, or the versions that were current at the time given in `as_of`, and omits paths without such a version. The response does not use the list envelope: `first` sets the page size, from 1 to 1,000 with a default of 100, and `next` holds the last path of a full page, which the request for the next page passes in `after`.