curl --request POST \
--url https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk \
--header 'Content-Type: application/json' \
--header 'X-Clinia-API-Key: <api-key>' \
--data '
{
"operations": [
{
"upsert": {
"definition": "<string>",
"designation": {}
}
}
]
}
'import requests
url = "https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk"
payload = { "operations": [{ "upsert": {
"definition": "<string>",
"designation": {}
} }] }
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({operations: [{upsert: {definition: '<string>', designation: {}}}]})
};
fetch('https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk', 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/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk",
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([
'operations' => [
[
'upsert' => [
'definition' => '<string>',
'designation' => [
]
]
]
]
]),
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/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk"
payload := strings.NewReader("{\n \"operations\": [\n {\n \"upsert\": {\n \"definition\": \"<string>\",\n \"designation\": {}\n }\n }\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/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n {\n \"upsert\": {\n \"definition\": \"<string>\",\n \"designation\": {}\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk")
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 \"operations\": [\n {\n \"upsert\": {\n \"definition\": \"<string>\",\n \"designation\": {}\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"receipts": [
{
"code": "<string>",
"error": {
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}
}
]
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Bulk upsert, update or delete concepts
Bulk upsert, update or delete concepts. Bulk operations are processed synchronously.
curl --request POST \
--url https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk \
--header 'Content-Type: application/json' \
--header 'X-Clinia-API-Key: <api-key>' \
--data '
{
"operations": [
{
"upsert": {
"definition": "<string>",
"designation": {}
}
}
]
}
'import requests
url = "https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk"
payload = { "operations": [{ "upsert": {
"definition": "<string>",
"designation": {}
} }] }
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({operations: [{upsert: {definition: '<string>', designation: {}}}]})
};
fetch('https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk', 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/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk",
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([
'operations' => [
[
'upsert' => [
'definition' => '<string>',
'designation' => [
]
]
]
]
]),
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/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk"
payload := strings.NewReader("{\n \"operations\": [\n {\n \"upsert\": {\n \"definition\": \"<string>\",\n \"designation\": {}\n }\n }\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/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n {\n \"upsert\": {\n \"definition\": \"<string>\",\n \"designation\": {}\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/terminology/v1/vocabularies/{vocabularyKey}/concepts/bulk")
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 \"operations\": [\n {\n \"upsert\": {\n \"definition\": \"<string>\",\n \"designation\": {}\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"receipts": [
{
"code": "<string>",
"error": {
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}
}
]
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Authorizations
Path Parameters
The key of the vocabulary.
Body
The request body should contain a list of concepts to upsert, update or delete.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Response
The bulk operation is valid.
Response contains the status of bulk request and status of each processed operation.
Bulk request status will be SUCCESS if all operations are successful, otherwise FAILURE.
The status of the bulk request. If one or more operations failed, the status will be FAILURE.
SUCCESS, PENDING, CANCELLED, FAILURE In case of failure, receipts of the operations are returned. Every operation sent will have a receipt corresponding to their original order. Each receipt will contain the status of the operation and an error if the operation failed.
Show child attributes
Show child attributes
Was this page helpful?