Retrieve a relationship from a data partition
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId} \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId}"
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/relationships/{relationshipType}/{relationshipId}', 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/relationships/{relationshipType}/{relationshipId}",
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/relationships/{relationshipType}/{relationshipId}"
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/relationships/{relationshipType}/{relationshipId}")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId}")
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>",
"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"
},
"includes": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Relationships
Retrieve a relationship from a data partition
Retrieve a relationship from a data partition.
GET
/
partitions
/
{partitionKey}
/
v1
/
relationships
/
{relationshipType}
/
{relationshipId}
Retrieve a relationship from a data partition
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId} \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId}"
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/relationships/{relationshipType}/{relationshipId}', 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/relationships/{relationshipType}/{relationshipId}",
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/relationships/{relationshipType}/{relationshipId}"
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/relationships/{relationshipType}/{relationshipId}")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId}")
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>",
"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"
},
"includes": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Authorizations
apiKeybasicHttpAuthbearerHttpAuth
Path Parameters
The unique identifier of the relationship with the following formats:
- v1RelationshipID format:
{fromID}.{toID}(e.g.123.456). - v1Identifier format:
{system}:{value}:{use}(e.g.clinia:123:useorsource:123.456:clinia.worksAt).
Query Parameters
List of resource types to includes with the response. Includes must be valid resource types for the given relationship definition.
Response
A successful response.
The included resources.
The unique identifier of the relationship.
This is a key with the shape {fromID}.{toID}.
Pattern:
^[^.]+.[^.]+$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I