'dmsbatch' capability for WebSocket Token API

Table of Contents

Overview

Provides an interface for performing group CRUD operations on dynamic class entities.

Provides noticeable time savings on forwarding requests and responses between different machines on the path from the connection client to the DMS server in a sequential synchronous execution of operations.

General view of the request:
[
  "dmsbatch",
  {
    "qid": 0.1234,
    "classpath": "/rest/v1/model/SomeClass",
    "sync": true,
    "timeout": 20000,
    "batches": [
      {
        "operation": "update",
        "id": ...,
        "content": {"someProperty1": ..., "someProperty2": ...}
      },
      {
        "operation": "read",
        "filter": ["==",["property","someProperty1"],...]
      },
      ...
    ]
  }
]
General view of the answer:
[
  "dmsbatch_result",
  {
    "qid": 0.1234,
    "result": ok,
    "batches": [
      {
        "result": "ok",
        "content": ...
      },
      {
        "result": "ok",
        "content": ...
      },
      ...
    ]
  }
]

Each request and its corresponding response is packed into an array element batches. The sequence of responses strictly corresponds to the sequence of requests. If any request terminates with an error, the error is also placed in the corresponding position of the batches array in the response. In this case, the total result is always "ok".

In case of a timeout (default 60000 = 60 seconds), requests that have not been executed receive an error with a timeout code.

Each query is subject to all the same conditions, features, and constraints as a single rest query to dynamic classes.