Clinia
TerminologyVocabularies

Bulk upsert or delete vocabularies

POST
/terminology/v1/vocabularies/bulk

Bulk upsert or delete vocabularies. Bulk operations are processed synchronously.

headerX-Clinia-API-Key<token>

The request body should contain a list of vocabularies to upsert or delete.

application/json
  1. body
operations*array<|>

Response Body

The bulk operation is valid. Response contains the status of bulk request and status of each processed operation. Bulk request status will be SUCCESS if all operations are successful, otherwise FAILURE.

application/json
  1. response
status*v1OperationStatus

The status of the bulk request. If one or more operations failed, the status will be FAILURE.

Value in"SUCCESS""PENDING""CANCELLED""FAILURE"
receipts?array<>

In case of failure, receipts of the operations are returned. Every operation sent will have a receipt corresponding to their original order. Each receipt will contain the status of the operation and an error if the operation failed.

Example Request
curl -X POST 'https://api..clinia.cloud/terminology/v1/vocabularies/bulk' \  -H 'Content-Type: application/json' \  -d '{  "operations": [    {      "action": "CREATE",      "upsert": {        "key": "string",        "title": "string",        "description": "string"      }    }  ]}'
Example Response
{  "status": "SUCCESS",  "receipts": [    {      "key": "string",      "status": "SUCCESS",      "error": {        "code": 400,        "message": "string",        "type": "ALREADY_EXISTS",        "details": [          {}        ],        "additionalContext": {}      }    }  ]}