Versions Compared

Key

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

...

Adds a new content record scope for the given key in the specified scope.

Request

The URL is composed by the Storage Unit and the scope (I.e. connectorocrindex, etc) to which the key content will be saved to.

...

  • key: The unique identifier of the content record.
  • version: A version to identify the record. If a record with key already exists with a higher version, the request will be ignored.
  • Keys will be saved with a zone prefix. If the prefix is not specified, the local zone prefix will be added automatically. Because of the prefix, a key cannot contain colon (:) characters as it is used as the prefix separator.
  • version: A version to chronologically identify the transaction. If a record with key already exists with a higher version, the request will be discarded.
  • content: JSON content associated with the content: JSON content associated with the scope being added. Content will be saved encrypted and compressed if specified on the storage unit configuration.
  • policy: The policy to use when adding a new content record:
    • new: only adds the content if the key doesn't exist in the storage unit.
    • overwrite: if a record with key already exists, it overwrites all of it's previous content (discards other existing scopes for that key), otherwise, it adds the record.
    • merge: if a record with key already exists, it adds the scope information without affecting any other scopes for this record.
Code Block
languagejs
themetextRDark
 POSTPUT transaction/add/<storage-unit-name>/<scope>
Code Block
languagejs
themeRDark

{
    "content": {"doc": {..."test":"value"}},
    "policy": "merge", //overwrite, merge, new
    "key": "LOCAL_ZONE:B166F75594BF1B23A26A6F0074BEB88F",
    "version": 1445618448043
}  

Response

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

...

The URL is composed by the Storage Unit and the scope (I.e. connectorocrindex, etc) to which the key content will be saved tothe key content will be saved to. Note: scope is required if the action is add/update, for other actions it is optional.

The execute POST/PUT request requires a JSON with the fields:::

  • key: The unique identifier of the content record. Keys will be saved with a zone prefix. If the prefix is not specified, the local zone prefix will be added automatically. Because of the prefix, a key cannot contain colon (:) characters as it is used as the prefix separatorkey: The unique identifier of the content record.
  • version: A version to chronologically identify the recordtransaction. If a record with key already exists with a higher version, the request will be ignoreddiscarded.
  • content: JSON content associated with the scope being addedWhen the action is add/update, it is JSON content to store. Content will be saved encrypted and compressed if specified on the storage unit configuration.
  • action: The action transaction type to execute on the record's scope: add, update,  deletedelete. Custom transaction types can be specified in this field to trigger custom document and general events as described in here.
  • policy: The policy to use when executing the action on the content record:
    • add/update actions
      • new: only adds the content if
      the
      • the key
      doesn
      •  doesn't exist in the storage unit.
      • overwrite: if a record with key already exists, it overwrites all of it's previous content (discards other existing scopes for that key), otherwise, it adds the record.
      • merge: if a record with key already exists, it adds the scope information without affecting any other scopes for this record.
    • delete actions:
      • silent: If the record/scope for key doesn't exist, the request completes without an error.
      • mustexist: If the record/scope for key doesn't exist, an error is reported back
      in the response
      • in the response.
    • custom actions: policy is not required in these cases.
Code Block
languagetext
 POST transaction/execute/<storage-unit-name>/<scope>
Code Block
languagejs
themeRDark
 {
    "content": {"doc": {..."test":"value"}},
    "action": "add", //add, delete
    "policy": "merge", //add: merge, overwrite, new / delete: silent, mustexist
    "key": "LOCAL_ZONE: "B166F75594BF1B23A26A6F0074BEB88F",
    "version": 1445618448043
}
 

Response

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

...

Executes a list of JSON transactions against the storage unit. The batch expects a list of single line JSON strings.

Request

The URL is composed by the Storage Unit and the scope (I.e. connectorocrindex, etc) to which the key content against which all transactions will be saved executed to.

The batch POST/PUT request requires a list of JSON objects separated by a new line, each with:with:

  • key: The unique identifier of the content record. Keys will be saved with a zone prefix. If the prefix is not specified, the local zone prefix will be added automatically. Because of the prefix, a key cannot contain colon (:) characters as it is used as the prefix separatorkey: The unique identifier of the content record.
  • version: A version to chronologically identify the recordtransaction. If a record with key already exists with a higher version, the request will be ignoreddiscarded.
  • content: JSON content associated with the scope being addedWhen the action is add/update, it is JSON content to store. Content will be saved encrypted and compressed if specified on the storage unit configuration.
  • action: The action transaction type to execute on the record's scope: addupdate, delete. Custom transaction types can be specified in this field to trigger custom document and general events as described in here.
  • policy: The policy to use when executing the action on the content record:
    • add/update actions
      • new: only adds the content if
      the
      • the key
      doesn
      •  doesn't exist in the storage unit.
      • overwrite: if a record with key already exists, it overwrites all of it's previous content (discards other existing scopes for that key), otherwise, it adds the record.
      • merge: if a record with key already exists, it adds the scope information without affecting any other scopes for this record.
      delete actions:
      • silent: If the record/scope for key doesn't exist, the request completes without an error.
      • mustexist: If the record/scope for key doesn't exist, an error is reported back in the response.
    • custom actions: policy is not required in these cases.

An optional report parameter can be specified to get processing statistics and error reports.

...