Skip to main content
POST
/
sources
/
{sourceKey}
/
v1
/
purge
Purge operation request for resources or relationships
curl --request POST \
  --url https://{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/purge \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '{
  "collectionType": "resources",
  "collectionKey": "<string>"
}'
{
  "taskId": "<string>",
  "status": "ACCEPTED",
  "purgeOperation": {
    "taskId": "<string>",
    "purgeId": "<string>",
    "collectionType": "resources",
    "collectionKey": "<string>",
    "status": "SUCCESS",
    "deletedCount": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-Clinia-API-Key
string
header
required

Path Parameters

sourceKey
string
required

The key of the source.

Body

application/json
collectionType
enum<string>
required

Type of document, either relationships or resources.

Available options:
resources,
relationships,
objects
collectionKey
string
required

Key of the resource or relationship collection.

Response

A successful response for a valid and accepted purge operation with status 'ACCEPTED'.

Response when a task has been accepted for asynchronous processing. The task will be executed in the background.

purgeOperation
object
required
taskId
string
required

The task identifier. Used to track an async task in the system. Use the task ID to poll for completion status. The taskId holds different prefix to represent different tasks.

  • oneOf task: s_<id>.
  • bulk task: bk_<id> (deprecated: <id> only).
  • bundle task: bd_<id> (deprecated: <id> only).
  • purge task: pg_<id> (deprecated: purge:<id>).
status
enum<string>
required

Status of the task submission.

  • ACCEPTED: The task has been accepted for asynchronous processing. The task will be executed in the background.
  • PERSISTED: The task has been executed synchronously and the results are immediately persisted.
Available options:
ACCEPTED,
PERSISTED
I