Get a task from the registry
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/tasks/{taskId} \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/tasks/{taskId}"
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/tasks/{taskId}', 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/tasks/{taskId}",
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/tasks/{taskId}"
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/tasks/{taskId}")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/tasks/{taskId}")
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{
"status": "SUCCESS",
"taskId": "<string>",
"receipts": [
{
"receivedAt": "2023-11-07T05:31:56Z",
"taskId": "<string>",
"action": "CREATE",
"status": "SUCCESS",
"targetType": "RELATIONSHIP",
"id": "<string>",
"type": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"error": {
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
},
"pipelineExecution": {
"id": "<string>",
"pipelineDefinitionId": "<string>",
"status": "SUCCESSFUL"
}
}
]
}{
"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": {}
}Task
Get a task from the registry
Get the operation receipts related to a task id.
GET
/
sources
/
{sourceKey}
/
v1
/
tasks
/
{taskId}
Get a task from the registry
curl --request GET \
--url https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/tasks/{taskId} \
--header 'X-Clinia-API-Key: <api-key>'import requests
url = "https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/tasks/{taskId}"
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/tasks/{taskId}', 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/tasks/{taskId}",
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/tasks/{taskId}"
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/tasks/{taskId}")
.header("X-Clinia-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/sources/{sourceKey}/v1/tasks/{taskId}")
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{
"status": "SUCCESS",
"taskId": "<string>",
"receipts": [
{
"receivedAt": "2023-11-07T05:31:56Z",
"taskId": "<string>",
"action": "CREATE",
"status": "SUCCESS",
"targetType": "RELATIONSHIP",
"id": "<string>",
"type": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"error": {
"code": 400,
"message": "<string>",
"type": "ALREADY_EXISTS",
"details": "<array>",
"additionalContext": {}
},
"pipelineExecution": {
"id": "<string>",
"pipelineDefinitionId": "<string>",
"status": "SUCCESSFUL"
}
}
]
}{
"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
apiKeybasicHttpAuthbearerHttpAuth
Path Parameters
The source key.
The task id. 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>).
Query Parameters
If set to true, the operation receipts of the task will be included in the response. Else only the status of the task will be returned.
Response
The task with the given id.
Status of the task.
SUCCESS: All the operations of the task completed successfully.PENDING: At least one operation in the task is still pending.CANCELLED: All the operations in the task were cancelled.FAILURE: At least one operations failed or was cancelled.
Available options:
SUCCESS, PENDING, CANCELLED, FAILURE 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>).
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?