curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations"
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/history/{collectionType}/{collectionKey}/{itemId}/operations', 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/history/{collectionType}/{collectionKey}/{itemId}/operations",
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/history/{collectionType}/{collectionKey}/{itemId}/operations"
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/history/{collectionType}/{collectionKey}/{itemId}/operations")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations")
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>",
"targetType": "resources",
"operationId": "<string>",
"taskId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"action": "CREATE",
"userInfo": {
"id": "<string>",
"email": "<string>"
}
}
]{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {},
"applicationErrorCode": "REGISTRY_DUPLICATE_IDENTIFIER"
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {},
"applicationErrorCode": "REGISTRY_DUPLICATE_IDENTIFIER"
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}Get the history for a record or relationship
Retrieves a list of all operations performed on a specific source entity (record or relationship). Results can be paginated and filtered by a date range.
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations"
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/history/{collectionType}/{collectionKey}/{itemId}/operations', 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/history/{collectionType}/{collectionKey}/{itemId}/operations",
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/history/{collectionType}/{collectionKey}/{itemId}/operations"
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/history/{collectionType}/{collectionKey}/{itemId}/operations")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations")
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>",
"targetType": "resources",
"operationId": "<string>",
"taskId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"action": "CREATE",
"userInfo": {
"id": "<string>",
"email": "<string>"
}
}
]{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {},
"applicationErrorCode": "REGISTRY_DUPLICATE_IDENTIFIER"
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {},
"applicationErrorCode": "REGISTRY_DUPLICATE_IDENTIFIER"
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}{
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
}Authorizations
Path Parameters
The source key.
The type of the collection.
resources, relationships The key of the collection.
The id of the item.
Query Parameters
The number of items to return per page.
The page number to retrieve.
The start of the date range filter (ISO 8601 format). The default value is the beginning of time.
The end of the date range filter (ISO 8601 format). The default value is now.
Response
A list of version history items for the entity.
The unique identifier of the resource or relationship.
The collection type of the entity.
resources, relationships The unique identifier of the operation.
The identifier of the task that processed this operation.
The exact time the operation was applied.
The action to perform.
CREATE, UPSERT, DELETE, UPDATE Information about the user or service that performed the operation.
Show child attributes
Show child attributes
Was this page helpful?