Upsert a contained resource in the registry
curl --request PUT \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId} \
--header 'Content-Type: application/json' \
--header 'X-Clinia-API-Key: <api-key>' \
--data '
{
"type": "<string>",
"data": {},
"contained": {}
}
'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}"
payload = {
"type": "<string>",
"data": {},
"contained": {}
}
headers = {
"X-Clinia-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Clinia-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', data: {}, contained: {}})
};
fetch('https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}', 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/resources/{resourceType}/{id}/{containKey}/{containedResourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'data' => [
],
'contained' => [
]
]),
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/resources/{resourceType}/{id}/{containKey}/{containedResourceId}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"data\": {},\n \"contained\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"data\": {},\n \"contained\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Clinia-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"data\": {},\n \"contained\": {}\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>",
"resource": {
"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": {}
}
}{
"taskId": "<string>",
"resource": {
"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": {}
}
}{
"taskId": "<string>",
"resource": {
"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": {}
}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Resources
Upsert a contained resource in the registry
Upsert a contained resource in the registry.
PUT
/
sources
/
{sourceKey}
/
v1
/
resources
/
{resourceType}
/
{id}
/
{containKey}
/
{containedResourceId}
Upsert a contained resource in the registry
curl --request PUT \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId} \
--header 'Content-Type: application/json' \
--header 'X-Clinia-API-Key: <api-key>' \
--data '
{
"type": "<string>",
"data": {},
"contained": {}
}
'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}"
payload = {
"type": "<string>",
"data": {},
"contained": {}
}
headers = {
"X-Clinia-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Clinia-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', data: {}, contained: {}})
};
fetch('https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}', 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/resources/{resourceType}/{id}/{containKey}/{containedResourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'data' => [
],
'contained' => [
]
]),
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/resources/{resourceType}/{id}/{containKey}/{containedResourceId}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"data\": {},\n \"contained\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"data\": {},\n \"contained\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/resources/{resourceType}/{id}/{containKey}/{containedResourceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Clinia-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"data\": {},\n \"contained\": {}\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>",
"resource": {
"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": {}
}
}{
"taskId": "<string>",
"resource": {
"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": {}
}
}{
"taskId": "<string>",
"resource": {
"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": {}
}
}{
"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 key of the source.
Type of the resource. Key of the profile.
Id of the resource.
Key of the contained resource. This is the key of the profile that defines the contained resource type.
Id of the contained resource.
Body
application/json
Response
A successful response when the contained resource was replaced with a status 'PERSISTED'. The root resource is returned.
- Option 1
- Option 2
Response when a task has been executed synchronously and the results are immediately persisted.
The task identifier. Used to track an async task in the system. Use the task ID to poll for completion status. The taskId holds different prefix to represent different tasks.
- oneOf task:
s_<id>. - bulk task:
bk_<id>(deprecated:<id>only). - bundle task:
bd_<id>(deprecated:<id>only). - purge task:
pg_<id>(deprecated:purge:<id>).
Status of the task submission.
ACCEPTED: The task has been accepted for asynchronous processing. The task will be executed in the background.PERSISTED: The task has been executed synchronously and the results are immediately persisted.
Available options:
ACCEPTED, PERSISTED Show child attributes
Show child attributes
Was this page helpful?
⌘I