Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeRDark
{
	"message":"COMPLETED_WITH_ERRORS",
	"batchErrors":[
		{
			"keys": [
				"APP_ZONE:69FCDBE0047FF81A784A3AF760132623",
				"APP_ZONE:AD469379FA86CE1EA257DEB8EE14166A",
				"APP_ZONE:1863C3368B404DC11E1BEA42CBF063E4",
				"APP_ZONE:FE0821AE1E07FD24C877D77B48966589"
			],
			"errors":"Request error",
			"event":"BatchEnd"}
	]
}

Delete

Deletes a scope or all scopes for a key in the specified storage unit.

...

The URL is composed by the Storage Unit and the scope (I.e. connectorocrindex, etc.) to delete from the record. If scope = $record , the or the scope is not provided, the whole record will be deleted.

...

  • key: The unique identifier of the content record. If the zone is not specified, the key that matches the local zone will be deleted.
  • version: A version to chronologically identify the recordtransaction. If a record with key already exists with a higher version, the request will be ignoreddiscarded.
  • policy: The policy to use when deleting a scope of the record:
    • silent (default): If the record/scope doesn't exist, the request completes without an error.
    • mustexist: If the record/scope doesn't exist, an error is reported back in the response.
Code Block
languagejs
themeRDarktext
 POSTDELETE transaction/delete/<storage-unit-name>/<optional:scope>

...

languagejs
themeRDark

{
    "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.

...

The delete all POST/DELETE request requires a JSON with the fields::

  • version: A version to chronologically identify the recordstransactions. If a record already with key already exists with a higher version, the delete action for that record key will not be executeddeleted.
Code Block
languagetextjs
themeRDark
DELETE POST transaction/deleteAll/<storage-unit-name>/<optional:scope>

...

languagejs
themeRDark

{
  "version": 1445618448133
}

 

Response

If the delete all operation is successful, a 200 response code and an OK message are returned.

...

Deletes a content record scope based on a comparison criteria (X field is equal (EQ), greater than (GT), lesser than (LT) or not equal to (NEQ) to a value).

Request

The URL is composed by the Storage Unit and the scope (I.e. connectorocrindex, etc.) to delete from the record. If scope = $record, the whole record will be deleted.

The delete if POST/The delete if POST/DELETE request requires a JSON with the fields::

  • version: A  A version to chronologically identify the record's transactions. If a record already with key already exists with a higher version, the delete action for that record key will not be executeddeleted.
  • policy: The policy to use when deleting the scope of the records:
    • silent (default): If the record/scope doesn't exist, the request completes without an error.
    • mustexist: If the record/scope doesn't exist, an error is reported back in the response for the record.
  • xpath: An xpath in the scope's JSON object for the field to evaluate.
  • test: The comparison operation to perform on the value of the field found by the xpath.
  • value: The value to compare against the value of the field found by the xpath.
  • scopeToDelete: The scope to delete in the record if the criteria is met. If scope to delete is not provided, the scope deleted is the same as the scope specified on the URL.
  • zone: Specific zone to scan records in. If not specified, local zone will be scanned for deletes.
Code Block
languagetext
 POSTDELETE transaction/deleteIf/<storage-unit-name>/<optional:scope>

...

languagejs
themeRDark

...

<scope>
{
	"version": 1445618448133,

...

	"policy": "silent",

...

	"test": "EQ", 

...

	"xpath": "/url", 

...

	"value": "E:\\LSA\\Foundations_of_Statistical_Natural_Language_Processing.pdf", 
	"scopeToDelete": "index"
}

 

Response

Returns a 200 response code with the statusId to be used by the DeleteIfStatus API call.

 

Code Block
languagejs
themeRDark
 {"statusId": "storageUnitid"}

 

If the storage unit doesn't exist, a 400 response code with a STORAGE_UNIT_DOESNT_EXIST message is returned.

...

Request

The delete if status GET /POST request will return a JSON with the current status of the deleteif processing if it that has been previously executed.

Code Block
languagetext
 GET transaction/deleteIfStatus/<storage-unit-name>id

Response

A 200 response code is received and the current status with the number of deleted items and/or errors.

...