Page History
Table of Contents |
---|
...
Provides functionality to add, edit and delete content from a storage unit.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "content": {...}, "action": "add", //add, delete "policy": "merge", //add: merge, overwrite, new / delete: silent, mustexist "key": "B166F75594BF1B23A26A6F0074BEB88F", "version": 1445618448043 } |
Response
If the execute operation is successful, a 200 response code and an OK message are returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message":"OK"} |
If the storage unit doesn't exist, a 400 response code with a STORAGE_UNIT_DOESNT_EXIST message is returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message": "STORAGE_UNIT_DOESNT_EXIST"} |
Batch
Executes a list of JSON transactions against the storage unit. The batch expects a list of single line JSON strings.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{"content": {...},"action": "add", "policy": "merge", "key": "B166F75594BF1B23A26A6F0074BEB88F", "version": 1445618448043} {"content": {...}, "action": "delete", "policy": "silent", "key": "B6F5H6J8HGBF1B23A26A6F0074BEB8E5", "version": 1445618448133} |
Response
If the batch operation is successful, a 200 response code and an OK message are returned if no transactions failed. A COMPLETED_WITH_ERRORS message if one or more transactions failed.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "policy": "silent", //delete: silent, mustexist "key": "B6F5H6J8HGBF1B23A26A6F0074BEB8E5", "version": 1445618448133 } |
Response
If the delete operation is successful, a 200 response code and an OK message are returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message":"OK"} |
If the storage unit doesn't exist, a 400 response code with a STORAGE_UNIT_DOESNT_EXIST message is returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message": "STORAGE_UNIT_DOESNT_EXIST"} |
If the scope doesn't exist and the delete policy was MUSTEXIST, a 400 response code with a DELETED_SCOPE_DOESNT_EXIST message is returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message": "DELETED_SCOPE_DOESNT_EXIST"} |
Delete All
Deletes the provided scope for all content records of the storage unit. If the scope is the global $record scope or it is not provided, all content records are deleted.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "version": 1445618448133 } |
Response
If the delete all operation is successful, a 200 response code and an OK message are returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message":"OK"} |
If the storage unit doesn't exist, a 400 response code with a STORAGE_UNIT_DOESNT_EXIST message is returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message": "STORAGE_UNIT_DOESNT_EXIST"} |
If the scope doesn't exist and the delete policy was MUSTEXIST, a 400 response code with a DELETED_SCOPE_DOESNT_EXIST message is returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message": "DELETED_SCOPE_DOESNT_EXIST"} |
Delete If
Deletes a content record scope based on a comparison criteria (X field is equal, greater than, lesser than or not equal to a value).
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "version": 1445618448133, "policy": "silent", "test": "EQ", "xpath": "/url", "value": "E:\\LSA\\Foundations_of_Statistical_Natural_Language_Processing.pdf" } |
Response
Returns a 200 response code with the statusId to be used by the DeleteIfStatus API call.
Code Block | ||||
---|---|---|---|---|
| ||||
{"statusId": "storageUnit"} |
If the storage unit doesn't exist, a 400 response code with a STORAGE_UNIT_DOESNT_EXIST message is returned.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message": "STORAGE_UNIT_DOESNT_EXIST"} |
Delete If Status
Returns the current status of the delete if processing execution for the storage unit.
...
A 200 response code is received and the current status with the number of deleted items and/or errors.
Code Block | ||||
---|---|---|---|---|
| ||||
{"message":{"status":"complete","deleteCount":1}} |
...