Delete a Document

delete

/capture/api/v1.1/documents/{docId}

This operation will delete, from Capture, the document specified by the docId parameter.

Note: The OAuth token used in this request must represent an account that has been granted explict access to the step in which this document presently resides. It makes no difference if the account represents a Capture Administator or a Capture User.

Request

Supported Media Types
Path Parameters
Header Parameters
  • A header used to prevent Cross-Site Request Forgery (CSRF) attacks. The only supported value is XMLHttpRequest.

Body ()

This represents the document to be deleted. It can be the entire document object, but the only attribute that is necessary is the stateToken. It is necessary to verify the delete operation can proceed.

The value of the stateToken needs to be the value from the document to delete, its believed current state. If the stateToken value does not match the document's current stateToken value, the delete operation will result in an error.

Root Schema : schema
Type: object
Show Source
  • A generated string value that represents a particular state of the document.

    In general, it is used to allow modifications of the document to proceed. It is essentially saying ... delete this document if its current stateToken matches this value. If the values do not match, the modification is not permitted and the operation results in an error.

Back to Top

Response

Supported Media Types

204 Response

No Content

400 Response

Bad Request

The request could not be processed because it contains missing or invalid information, such as a validation error on an input field or a missing required value. The response will be an Error Detail object.

403 Response

Forbidden

The request was valid and was understood, but the server is refusing action. This may be due to the account not having the necessary permissions for a resource, or attempting a prohibited action (e.g. creating a duplicate item where only one is allowed). The response will be an Error Detail object.

404 Response

Not Found

The request includes a resource URI that does not exist. The response will be an Error Detail object.

409 Response

Conflict

This response indicates the request conflicts with current state of the target resource. The response will be an Error Detail object.

Generally, an error response of 412 (Precondition Failed) will be returned. But a Conflict can occur when there are simultaneous edits on a resource.

412 Response

Precondition Failed

The server does not meet one of the preconditions of the request. The response will be an Error Detail object.

This error response is used specifically when the stateToken used in the request body does not match the current stateToken of the resource.

500 Response

Internal Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request. The response will be an Error Detail object.

Back to Top

Examples

Example 1:

The following example shows how to delete a document.

curl -X DELETE -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1/content'

This deletes the document with the ID of 'dcf65d45-4f53-4f82-998c-5e189de1b6a1'. There is no response body on a successful completion of this operation.

Request Body

{
  "stateToken": "340f804ff4118f2f419bc3ca87ef1213"
}
Back to Top