Skip to main content
POST
/
terminology
/
v1
/
vocabularies
/
bulk
Bulk upsert or delete vocabularies
curl --request POST \
  --url https://{workspaceId}.clinia.cloud/terminology/v1/vocabularies/bulk \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '{
  "operations": [
    {
      "action": "CREATE",
      "upsert": {
        "key": "<string>",
        "title": "<string>",
        "description": "<string>"
      }
    }
  ]
}'
{
  "status": "SUCCESS",
  "receipts": [
    {
      "key": "<string>",
      "status": "SUCCESS",
      "error": {
        "code": 400,
        "message": "<string>",
        "type": "ALREADY_EXISTS",
        "details": [
          {}
        ]
      }
    }
  ]
}

Authorizations

X-Clinia-API-Key
string
header
required

Body

application/json

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

operations
object[]
required
  • Option 1
  • Option 2

Response

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.

status
enum<string>
required

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

Available options:
SUCCESS,
PENDING,
CANCELLED,
FAILURE
receipts
object[]

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.

I