Clinia
Data PartitionRelationships

Retrieve a relationship from a data partition

GET
/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId}

Retrieve a relationship from a data partition.

X-Clinia-API-Key<token>

In: header

Path Parameters

partitionKey*string
relationshipType*string
relationshipId*string

The unique identifier of the relationship with the following formats:

  • v1RelationshipID format: {fromID}.{toID} (e.g. 123.456).
  • v1Identifier format: {system}:{value}:{use} (e.g. clinia:123:use or source:123.456:clinia.worksAt).

Query Parameters

includes?array<string>

List of resource types to includes with the response. Includes must be valid resource types for the given relationship definition.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/partitions/string/v1/relationships/string/string"
{  "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": {},  "includes": {    "property1": [      {        "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": {},        "contained": {          "property1": [            {              "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": {}            }          ],          "property2": [            {              "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": {}            }          ]        }      }    ],    "property2": [      {        "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": {},        "contained": {          "property1": [            {              "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": {}            }          ],          "property2": [            {              "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": {}            }          ]        }      }    ]  }}

Browse accross resource or relationship collections in the data partition POST

Browse across resource or relationship collections in the data partition. 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.

Browse across a resource includes POST

Browse across a given resource's includes in the data partition. In order to initiate a browse session, you can specifiy in the body the `v1BrowseIncludesRequest` object with the following properties: - `includes`: The list of includes to browse. It can be used to include only a relationship (e.g. `worksAt`) or a relationship and the targeted resource (e.g. `worksAt.clinic`). - `perPage`: The number of results to return per batch. Defaults to 100. 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, meaning 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.