Skip to main content
POST
/
sources
/
{sourceKey}
/
v1
/
browse
Browse accross resource or relationship collections in the registry
curl --request POST \
  --url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/browse \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '
{
  "collectionKeys": [
    "<string>"
  ],
  "params": {
    "cursor": "<string>",
    "filter": {
      "and": "<array>",
      "id": "<string>"
    },
    "properties": {
      "include": [
        "<string>"
      ],
      "exclude": [
        "<string>"
      ]
    },
    "perPage": 123
  }
}
'
import requests

url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/browse"

payload = {
    "collectionKeys": ["<string>"],
    "params": {
        "cursor": "<string>",
        "filter": {
            "and": "<array>",
            "id": "<string>"
        },
        "properties": {
            "include": ["<string>"],
            "exclude": ["<string>"]
        },
        "perPage": 123
    }
}
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({
    collectionKeys: ['<string>'],
    params: {
      cursor: '<string>',
      filter: {and: '<array>', id: '<string>'},
      properties: {include: ['<string>'], exclude: ['<string>']},
      perPage: 123
    }
  })
};

fetch('https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/browse', 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/sources/{sourceKey}/v1/browse",
  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([
    'collectionKeys' => [
        '<string>'
    ],
    'params' => [
        'cursor' => '<string>',
        'filter' => [
                'and' => '<array>',
                'id' => '<string>'
        ],
        'properties' => [
                'include' => [
                                '<string>'
                ],
                'exclude' => [
                                '<string>'
                ]
        ],
        'perPage' => 123
    ]
  ]),
  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/sources/{sourceKey}/v1/browse"

	payload := strings.NewReader("{\n  \"collectionKeys\": [\n    \"<string>\"\n  ],\n  \"params\": {\n    \"cursor\": \"<string>\",\n    \"filter\": {\n      \"and\": \"<array>\",\n      \"id\": \"<string>\"\n    },\n    \"properties\": {\n      \"include\": [\n        \"<string>\"\n      ],\n      \"exclude\": [\n        \"<string>\"\n      ]\n    },\n    \"perPage\": 123\n  }\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/sources/{sourceKey}/v1/browse")
  .header("X-Clinia-API-Key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"collectionKeys\": [\n    \"<string>\"\n  ],\n  \"params\": {\n    \"cursor\": \"<string>\",\n    \"filter\": {\n      \"and\": \"<array>\",\n      \"id\": \"<string>\"\n    },\n    \"properties\": {\n      \"include\": [\n        \"<string>\"\n      ],\n      \"exclude\": [\n        \"<string>\"\n      ]\n    },\n    \"perPage\": 123\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/browse")

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  \"collectionKeys\": [\n    \"<string>\"\n  ],\n  \"params\": {\n    \"cursor\": \"<string>\",\n    \"filter\": {\n      \"and\": \"<array>\",\n      \"id\": \"<string>\"\n    },\n    \"properties\": {\n      \"include\": [\n        \"<string>\"\n      ],\n      \"exclude\": [\n        \"<string>\"\n      ]\n    },\n    \"perPage\": 123\n  }\n}"

response = http.request(request)
puts response.read_body
{
  "hits": [
    {
      "score": 123,
      "resource": {},
      "traversedProperties": {},
      "highlighting": {}
    }
  ],
  "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": {}
}

Authorizations

X-Clinia-API-Key
string
header
required

Path Parameters

sourceKey
string
required

The source from which to execute the query.

Body

application/json
collectionKeys
string[]
required

The collection keys to which the browse session applies.

params
object
required

Parameters to initiate a browse session. This object can contain a filter, a sort, and the number of results to return per page. The perPage property specifies the number of results to return per page, with a default value of 100 and a maximum of 1000.

Response

A successful response containting 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.