Clinia
Data PartitionResources

Retrieve a resource from a data partition

GET
/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}

Retrieve a resource from a data partition.

headerX-Clinia-API-Key<token>
partitionKey*string
collectionKey*string
resourceId*string

The resource ID. Can also be an identifier with one of the following formats:

  • source:{sourceRecordId}:{sourceKey}.{sourceRecordType} (e.g. source:123:mySourceA.clinic). This is useful to fetch a record when knowing its source record id.
  • mdm:{unifiedRecordId}:old (e.g. mdm:123:old). This is useful to fetch a unified record id that does not exist anymore after being merged.
includes?array<string>Deprecated

This field is deprecated and will be removed in a future version. Consider using the BrowseIncludes endpoint instead.

List of include keys to include with the response. It can be used to include relationship (e.g. worksAt) and related resources (e.g. worksAt.clinic).

Response Body

A successful response.

application/json
  1. response

The included resources or relationships. All odd number of path segments are relationships, and all even number of path segments are Resources.

id*The logical identifier
type*string

Type of the resource.

meta?
data*
contained?

Resources contained in this top-level resource. Contained resources exists only within the context of this top-level resource.

includes?unknown
Example Request
curl -X GET 'https://api..clinia.cloud/partitions/string/v1/collections/string/resources/mdm:123:old'
Example Response
{  "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": {}      }    ]  },  "includes": {    "property1": [      {        "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": {}      }    ],    "property2": [      {        "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": {}      }    ]  }}

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.

Run multiple queries POST

Execute several queries within a single request. It is possible to send multiple query items, where each of the item can be either a regular query or a federated query. To trigger a federated query, one must specify more then one collection key in the item.