Delete or expire a document
DELETE/pipelines/:pipeline_id/documents/:document_id
Deletes or expires a document in a pipeline. Without expire, the operation permanently removes every version and every fragment of the document and returns status 204. With expire=true, the operation marks every current version as expired and returns status 200, and the version history remains readable.
Permissions. To delete: read, write and execute on the pipeline, and the document's classification in the allow-list. To expire: write and execute on the pipeline, and the document's classification in the allow-list.
Documents, versions and fragments compares expiry and deletion.
Request
Responses
- 200
- 204
- 400
- 401
- 403
- 404
The document was expired (expire=true). The body is empty.
The document was deleted. The body is empty.
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 pipeline exists, and the key lacks write or execute permission on the pipeline or the key's classification allow-list does not include the document's classification (Unauthorized: access level ... required for Pipeline with id ...). An expiry also returns 403 when the license does not permit the operation (Invalid license: ...).
No pipeline with this identifier exists, or the pipeline has no version of the document created at or before as_of (Pipeline with id <id> not found or Document with id <id> not found). A deletion also returns Pipeline with id <id> not found when the key lacks read permission on the pipeline.