Clinia
RegistryBulk

Bulk create, upsert, or delete relationships

POST
/sources/{sourceKey}/v1/relationships/bulk

Bulk create, upsert, or delete relationships. The request body should contain a list of operations. All operations will be processed even if some of them fail.

headerX-Clinia-API-Key<token>
sourceKey*string

The source key.

The request body should contain a list of relationships to create, upsert, or delete. Operations of different types (e.g., "CREATE", "UPSERT") can be mixed and will be processed in the order they are provided.

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

Response Body

The bulk operation is valid and accepted with a status 'ACCEPTED'.

application/json
  1. response

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

taskId*v1TaskId

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*v1TaskSubmissionStatus

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.
Value in"ACCEPTED""PERSISTED"
Example Request
curl -X POST 'https://api..clinia.cloud/sources/string/v1/relationships/bulk' \  -H 'Content-Type: application/json' \  -d '{  "operations": [    {      "action": "CREATE",      "create": {        "type": "string",        "from": {          "id": "string",          "type": "string"        },        "to": {          "id": "string",          "type": "string"        },        "data": {}      }    }  ]}'
Example Response
{  "taskId": "string",  "status": "ACCEPTED"}

Browse accross resource or relationship collections in the registry POST

Browse across resource or relationship collections in the registry. This endpoint only accept federated search paths, which means that when using an operator it expects the collection type and collection key to be specified in the path. For example, `resources.<collectionKey>.<propertyKey>`. In order to initiate a browse session, you can specifiy in the body the `v1BrowseParameters` object with the following properties: - `filter`: A filter to apply to the browse session. Can contain any valid search operators (all except KNN). - `perPage`: The number of results to return per batch. Defaults to 100. Once the browse session is initiated, you can use the `cursor` returned in the response to continue browsing through the results. The `cursor` is a string that keeps track of the current position in the browse session and can be used to fetch the next batch of results. A browse session lives for 5 minutes, after which it will be automatically closed and a 404 error will be returned if you try to continue browsing. The session is a rolling session, meanining that each new request will extend the session by 5 minutes from the time of the request. A browse response contains the following properties: - `hits`: An array of results that match the browse session. - `meta`: An object containing metadata about the browse session, including the `cursor` and the total number of results available in the browse session. You should use the `hits` length to check if there are more results to browse. If `hits > 0` is true, you can use the `meta.cursor` to fetch the next batch of results. If `hits > 0` is false, it means that you have reached the end of the browse session and there are no more results to browse.

Bulk create, upsert, or delete resources POST

Bulk create, upsert, or delete resources. The request body should contain a list of operations. All operations will be processed even if some of them fail.