Clinia
RegistryBundle

Bundle resource and relationship operations to be processed

POST
/sources/{sourceKey}/v1/bundle

Send a bundle of operations, including resource and relationship operations, to be processed atomically by the system.

Notes:

  • Order of Processing: Resource operations are executed first, followed by relationship operations.
  • Atomicity: The system processes the entire bundle as a single atomic transaction.
    • If all operations succeed, the changes are committed.
    • If any operation fails, all operations are rolled back, ensuring no partial changes.
X-Clinia-API-Key<token>

In: header

Path Parameters

sourceKey*string

The source key.

Request Body

application/json

The request body should contain a list of resources and relationships operations.

TypeScript Definitions

Use the request body type in TypeScript.

Contains a list of resource and relationship operations to be processed atomically by the system. Note:

  • Multiple unique @rootId token could be defined by suffixing the token with a number. For example, @rootId1, @rootId2, etc...
  • @rootId token could be used in any properties of type reference to refer to a created resources in the same bundle.
  • @rootId token could be used in the from and to fields of the relationship operations to refer to created resources in the same bundle.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/sources/string/v1/bundle" \  -H "Content-Type: application/json" \  -d '{    "resourceOperations": [      {        "action": "CREATE",        "create": {          "type": "string",          "data": {}        }      }    ],    "relationshipOperations": [      {        "action": "CREATE",        "create": {          "type": "string",          "from": {            "id": "string",            "type": "string"          },          "to": {            "id": "string",            "type": "string"          },          "data": {}        }      }    ]  }'
{  "taskId": "string",  "status": "ACCEPTED"}