Public Web API: Batch saving of items from different apps

Saving of items is performed in a single transaction.
An array of app items with pseudo-identifiers in the format $ref/xxxx is expected. Any string can be used as xxxx.
When saving items, such identifiers will be converted to UUIDs.
Pseudo-identifiers can be used to link app items. To do this, pass a pseudo-identifier of the app item in the relevant relation field.
Example request:

{"items":[{"namespace":"apps","code":"app01","context":{"__id":"$ref/1","dependedApp02":["$ref/2"]}},{"namespace":"apps","code":"app02","context":{"__id":"$ref/2","dependedApp01":["$ref/1"]}}],"withEventHandlers":false}

Example response:

{"error":"","pseudoIDsMap":{"$ref/1":"f23c2673-b8b4-4bf6-b543-3d0c6bcb99b3","$ref/2":"e7705800-65e6-43c6-9af0-fadaffe277eb"},"savedItemsCount":2,"success":true}

Request

POST /pub/v1/app/items/batch

Request body

The resource sent in the request body is  Batch saving of items from different apps — Request. It contains the following writable properties:

{
    "items": {},
    "withEventHandlers": "boolean"
}

Properties

Name Type Description Additional
items object

List of Items to be created (items must contain pseudo-identifiers in the format $ref/xxxx)

Required
withEventHandlers boolean

Run event handlers

Optional

Authorization

This request requires the use of one of following authorisation methods: API key

Response

The following HTTP status codes may be returned:

Status code Description Resource
200 OK

Response model for batch saving of items from different apps

Response model for batch saving of items from different apps (Batch saving of items from different apps)