Clinia
RegistryRelationships

Create a relationship between two resources in the registry

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

Create a relationship between two resources in the registry.

X-Clinia-API-Key<token>

In: header

Path Parameters

sourceKey*string

The key of the source.

relationshipType*string

Key of the relationship definition.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/sources/string/v1/relationships/string" \  -H "Content-Type: application/json" \  -d '{    "from": {      "id": "string",      "type": "string"    },    "to": {      "id": "string",      "type": "string"    },    "data": {}  }'
{  "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": {}  }}