Clinia
RegistryRelationships

Update a relationship between two resources in the registry

PATCH
/sources/{sourceKey}/v1/relationships/{relationshipType}/{id}

Update a relationship between two resources in the registry. The from and to fields in the body are ignored in favor of respecting the id path argument.

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

The key of the source.

relationshipType*string

The key of the relationship definition.

id*string

The id of the relationship.

Match^[^.]+.[^.]+$
application/json
  1. body
[index: integer]?

Response Body

The relationship was updated successfully with a status 'PERSISTED'.

application/json
  1. response

Response when a task has been executed synchronously and the results are immediately persisted.

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"
relationship*
Example Request
curl -X PATCH 'https://api..clinia.cloud/sources/string/v1/relationships/string/string' \  -H 'Content-Type: application/json' \  -d '[  {    "op": "replace",    "path": "/name",    "value": "New Clinic"  }]'
Example Response
{  "taskId": "string",  "status": "ACCEPTED",  "relationship": {    "id": "string",    "type": "string",    "from": {      "id": "string",      "type": "string"    },    "to": {      "id": "string",      "type": "string"    },    "meta": {      "createdAt": "2019-08-24T14:15:22Z",      "identifier": [        {          "id": "string",          "system": "string",          "value": "string",          "use": "string",          "period": {            "id": "string",            "start": "string",            "end": "string"          }        }      ],      "source": "string",      "updatedAt": "2019-08-24T14:15:22Z"    },    "data": {}  }}