Skip to main content
POST
/
operations
/
v1
/
review-assignments
Bulk assign reviews
curl --request POST \
  --url https://api.{workspaceId}.clinia.cloud/operations/v1/review-assignments \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '
{
  "operationIds": [
    "<string>"
  ],
  "reviewerId": "<string>"
}
'
import requests

url = "https://api.{workspaceId}.clinia.cloud/operations/v1/review-assignments"

payload = {
"operationIds": ["<string>"],
"reviewerId": "<string>"
}
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({operationIds: ['<string>'], reviewerId: '<string>'})
};

fetch('https://api.{workspaceId}.clinia.cloud/operations/v1/review-assignments', 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/operations/v1/review-assignments",
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([
'operationIds' => [
'<string>'
],
'reviewerId' => '<string>'
]),
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/operations/v1/review-assignments"

payload := strings.NewReader("{\n \"operationIds\": [\n \"<string>\"\n ],\n \"reviewerId\": \"<string>\"\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/operations/v1/review-assignments")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"operationIds\": [\n \"<string>\"\n ],\n \"reviewerId\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.{workspaceId}.clinia.cloud/operations/v1/review-assignments")

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 \"operationIds\": [\n \"<string>\"\n ],\n \"reviewerId\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "results": [
    {
      "operationId": "<string>",
      "assignment": {
        "id": "<string>",
        "operationId": "<string>",
        "reviewerId": "<string>",
        "assignerId": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      },
      "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

X-Clinia-API-Key
string
header
required

Body

application/json
operationIds
string[]
required

List of operation IDs to assign. Existing assignments are overwritten.

Minimum array length: 1
reviewerId
string
required

ID of the user to assign to the reviews.

Response

A successful response. Check status for an overall summary and each result's status for per-operation outcome.

status
enum<string>
required
Available options:
SUCCESS,
FAILURE
results
object[]
required