Operation Categories

CMI Protocol operations can be categorized in different ways:

By type: Operations are categorized into four types:
Session: See Sessions
Read: See Read Operations
Write: See Write Operations
Batch: See Batch Transactions
By target: Except for Session and Batch type, each operation has a target attribute, which is a particular type that the operation works on, such as Participant, Business Agreement, and so on.
By command: Each operation falls into one of the pre-defined commands, as explained in CMI Protocol Commands.

CMI Protocol Commands

Command

Definition

INSERT

Insert new data. If the data exists, an error message is returned.

Used only for the Write operation. See also Command Rules for the Parent/Child Element.

UPDATE

Update existing data. If the data does not exist, an error message is returned.

Used only for the Write operation. See also Command Rules for the Parent/Child Element.

UPSERT

Update or insert data. The CMI Protocol tries to insert the data if it does not exist, or update the data if it exists. In either case, a success response is returned.

Used only for the Write operation. See also Command Rules for the Parent/Child Element.

DELETE

Delete data. If the data does not exist, an Error message is returned.

Used only for the Write operation. See also Command Rules for the Parent/Child Element.

GETONE

Get one data. If no data exists, an empty response is returned. If more than one data exists, the first matched data is returned.

Used only for the Read operation.

GETMANY

Get a set of data. If no data exists, an empty response is returned.

Used only for the Read operation.

LOGIN

Log in and create a session.

If the authentication check is passed, a session resource is created and a response containing the new generated session ID is returned.
If the authentication check is not passed, a new session ID is still internally generated for audit log purpose, but an error message is returned and no session resources are created.

LOGOUT

Log out and destroy the session.

If the target session resource exists, any session resources are destroyed and success response returned.
If the target session resource does not exist, an error message is returned.

EXECUTE

Run a batch of requests.

If the given batchId does not exist (already run or canceled), an error message is returned.
If the given batchId does exist, CMI Protocol always tries to run the requests of the batch and return a success response, even if all requests fail.
Transactions are performed based on the timestamp and in the order that they have been received.

CANCEL

Cancel a batch of requests.

If the given batchId does not exist (already run or canceled), an error message is returned.
If the given batchId does exist, CMI Protocol tries to delete all the stored data and return a success response.