List document versions
GET/documents/:document_id/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.
Permissions. Read on the document's pipeline.
Documents, versions and fragments describes versions and point-in-time reads.
Request
Responses
- 200
- 400
- 401
- 403
- 404
The body is an array of the document's versions, newest first. The array is empty when no version matches, or when the key's classification allow-list does not cover the document's classification.
The as_of value lies outside the range of valid timestamps (Invalid version).
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The key lacks read permission on the pipeline that contains the document (Unauthorized: read access to Pipeline required).
No version of a document with this identifier exists, because the identifier was never used or every version was deleted (Document not found, with the identifier in details.id).