Skip to main content
PATCH
/
sources
/
{sourceKey}
/
v1
/
relationships
/
{relationshipType}
/
{id}
Update a relationship between two resources in the registry
curl --request PATCH \
  --url https://{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/relationships/{relationshipType}/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '
[
  {
    "op": "replace",
    "path": "/name",
    "value": "New Clinic"
  }
]
'
{
  "taskId": "<string>",
  "status": "ACCEPTED",
  "relationship": {
    "id": "<string>",
    "type": "<string>",
    "from": {
      "id": "<string>",
      "type": "<string>"
    },
    "to": {
      "id": "<string>",
      "type": "<string>"
    },
    "data": {},
    "meta": {
      "createdAt": "2023-11-07T05:31:56Z",
      "identifier": [
        {
          "id": "<string>",
          "system": "<string>",
          "value": "<string>",
          "use": "<string>",
          "period": {
            "id": "<string>",
            "start": "<string>",
            "end": "<string>"
          }
        }
      ],
      "source": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

X-Clinia-API-Key
string
header
required

Path Parameters

sourceKey
string
required

The key of the source.

relationshipType
string
required

The key of the relationship definition.

id
string
required

The id of the relationship. The unique identifier of the relationship. This is a key with the shape {fromID}.{toID}.

Body

application/json
op
enum<string>
default:add
required
Available options:
add,
remove,
replace
path
string
required

Property path.

value
any

Value for the operation. Can be any type - string, number, boolean, array or object.

Response

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

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

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
relationship
object
required