Description
The DeleteDocument API deletes all versions of a specified Document from the specified Store.
ACL
The user is not allowed to delete a document if the user doesn't have delete ACL on this document
Specific Request Parameters
(Refer to Common Request Parameters)
Name | Description | Required | Default | Possible Values |
---|---|---|---|---|
apsdb.store | The store name from which you are to delete your document. | No |
| |
apsdb.documentKey | The unique document identifier. It is unique in its store. | Yes |
|
|
apsdb.runAs | It allows the owner to run a service as one of his own users. The possible values are any of the usernames. | No |
|
|
apsdb.authToken | This parameter is used to sign the request with a token that was initially obtained by calling VerifyCredentails API. For more details on signing requests, please refer to the page entitled Authentication . | No |
Specific Response Elements
(Refer to Common Response Elements)
Specific Logical Errors
(Refer to Common Logical Error Codes)
Error | Message | Status Code |
---|---|---|
STORE_NOT_FOUND | The store was not found | 404 |
DOCUMENT_NOT_FOUND | The document with “document_key” “[documentKey]” could not be found for update | 404 |
PARAMETER_REQUIRED |
| 400 |
Examples
Sample Request
Request URL: http://sandbox.apstrata.com/apsdb/rest/[authenticationkey]/DeleteDocument?apsws.time=[timestamp]&apsws.authSig=[signature]
POST parameters:
apsdb.store=ClevelandMain apsdb.documentKey=doc_key_1
Sample XML Response
Success XML:
<response xmlns="http://www.apstrata.com/services/schemas/apstrata_database_response.xsd"> <metadata> <requestId>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</requestId> <status>success</status> </metadata> </response>
Failure XML:
<response xmlns="http://www.apstrata.com/services/schemas/apstrata_database_response.xsd"> <metadata> <requestId>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</requestId> <status>failure</status> <errorCode>[errorCode]</errorCode> <errorDetail>[failMsg]</errorDetail> </metadata> </response>
Sample JSON Response
{"response": { "metadata": { "requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "status": "success" } }}