List all collections in a source
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections"
headers = {"X-Clinia-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Clinia-API-Key': '<api-key>'}};
fetch('https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections', 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/collections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Clinia-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Clinia-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"numPages": 123,
"page": 123,
"perPage": 123,
"total": 123
},
"data": [
{
"key": "<string>",
"profile": {
"properties": {},
"key": "<string>",
"description": "<string>",
"contained": {}
},
"pipeline": {
"steps": [
{
"vectorizer": {
"inputProperty": "content.passages",
"propertyKey": "vector",
"modelId": "text-embedding-004",
"dimensions": 768,
"propertyDescription": "The vectorized content"
},
"trigger": {
"operator": {
"and": "<array>",
"id": "<string>"
}
}
}
],
"id": "<string>"
}
}
]
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Collections
List all collections in a source
List all collections in a registry.
GET
/
sources
/
{sourceKey}
/
v1
/
collections
List all collections in a source
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections"
headers = {"X-Clinia-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Clinia-API-Key': '<api-key>'}};
fetch('https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections', 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/collections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Clinia-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Clinia-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"numPages": 123,
"page": 123,
"perPage": 123,
"total": 123
},
"data": [
{
"key": "<string>",
"profile": {
"properties": {},
"key": "<string>",
"description": "<string>",
"contained": {}
},
"pipeline": {
"steps": [
{
"vectorizer": {
"inputProperty": "content.passages",
"propertyKey": "vector",
"modelId": "text-embedding-004",
"dimensions": 768,
"propertyDescription": "The vectorized content"
},
"trigger": {
"operator": {
"and": "<array>",
"id": "<string>"
}
}
}
],
"id": "<string>"
}
}
]
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Was this page helpful?
⌘I