Skip to main content
POST
/
partitions
/
{partitionKey}
/
v1
/
collections
/
{collectionKey}
/
resources
/
{resourceId}
/
browse-includes
Browse across a resource includes
curl --request POST \
  --url https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}/browse-includes \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '
{
  "cursor": "<string>",
  "includes": [
    "<string>"
  ],
  "perPage": 500
}
'
import requests

url = "https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}/browse-includes"

payload = {
"cursor": "<string>",
"includes": ["<string>"],
"perPage": 500
}
headers = {
"X-Clinia-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-Clinia-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({cursor: '<string>', includes: ['<string>'], perPage: 500})
};

fetch('https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}/browse-includes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}/browse-includes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cursor' => '<string>',
'includes' => [
'<string>'
],
'perPage' => 500
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Clinia-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}/browse-includes"

payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"includes\": [\n \"<string>\"\n ],\n \"perPage\": 500\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-Clinia-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}/browse-includes")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cursor\": \"<string>\",\n \"includes\": [\n \"<string>\"\n ],\n \"perPage\": 500\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}/browse-includes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Clinia-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cursor\": \"<string>\",\n \"includes\": [\n \"<string>\"\n ],\n \"perPage\": 500\n}"

response = http.request(request)
puts response.read_body
{
  "hits": [
    {
      "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"
      },
      "targetResource": {
        "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"
        },
        "contained": {}
      }
    }
  ],
  "meta": {
    "cursor": "<string>",
    "total": 123
  }
}
{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}
{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}
{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}
{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}
{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}

Authorizations

X-Clinia-API-Key
string
header
required

Path Parameters

partitionKey
string
required
collectionKey
string
required

Key of the collection.

resourceId
string
required

The unified resource id.

Body

application/json

Parameters to initiate or continue a browse includes session. To initiate a session, provide the list of includes to browse and optionally the number of results to return per page. To continue a session, provide the cursor returned from a previous response.

cursor
string

The cursor representing the current BrowseIncludes session.

includes
string[]

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
integer

The number of results to return per batch. Defaults to 100.

Required range: 1 <= x <= 1000

Response

A successful response containing the first batch of results and a cursor to continue browsing. 5 minutes after the request, the cursor will expire and a 404 error will be returned if you try to continue browsing.

hits
object[]
required
meta
object
required

Metadata about the browse session, including the cursor and the total number of results available in the browse session.