curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId} \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}"
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/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}', 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}",
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/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}"
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/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}")
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{
"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": {},
"includes": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}Retrieve a resource from a data partition
Retrieve a resource from a data partition.
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId} \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}"
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/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}', 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}",
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/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}"
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/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/collections/{collectionKey}/resources/{resourceId}")
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{
"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": {},
"includes": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}Authorizations
Path Parameters
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.
Query Parameters
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
A successful response.
The included resources or relationships. All odd number of path segments are relationships, and all even number of path segments are Resources.
Type of the resource.
Show child attributes
Show child attributes
Resources contained in this top-level resource. Contained resources exists only within the context of this top-level resource.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?