curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/rights/{id}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"acls": [
"business_user"
],
"actionname": "create",
"allowedForOrganization": false,
"class": "document",
"definitionname": "d_default",
"description": "Right to view links between records.",
"group": "UI Feature",
"workflowname": "wf_archive"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/rights/{id}?token="
payload = {
"version": 1,
"acls": ["business_user"],
"actionname": "create",
"allowedForOrganization": False,
"class": "document",
"definitionname": "d_default",
"description": "Right to view links between records.",
"group": "UI Feature",
"workflowname": "wf_archive"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: 1,
acls: ['business_user'],
actionname: 'create',
allowedForOrganization: false,
class: 'document',
definitionname: 'd_default',
description: 'Right to view links between records.',
group: 'UI Feature',
workflowname: 'wf_archive'
})
};
fetch('https://sandbox.circularo.com/api/v1/rights/{id}?token=', 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://sandbox.circularo.com/api/v1/rights/{id}?token=",
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([
'version' => 1,
'acls' => [
'business_user'
],
'actionname' => 'create',
'allowedForOrganization' => false,
'class' => 'document',
'definitionname' => 'd_default',
'description' => 'Right to view links between records.',
'group' => 'UI Feature',
'workflowname' => 'wf_archive'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://sandbox.circularo.com/api/v1/rights/{id}?token="
payload := strings.NewReader("{\n \"version\": 1,\n \"acls\": [\n \"business_user\"\n ],\n \"actionname\": \"create\",\n \"allowedForOrganization\": false,\n \"class\": \"document\",\n \"definitionname\": \"d_default\",\n \"description\": \"Right to view links between records.\",\n \"group\": \"UI Feature\",\n \"workflowname\": \"wf_archive\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://sandbox.circularo.com/api/v1/rights/{id}?token=")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"acls\": [\n \"business_user\"\n ],\n \"actionname\": \"create\",\n \"allowedForOrganization\": false,\n \"class\": \"document\",\n \"definitionname\": \"d_default\",\n \"description\": \"Right to view links between records.\",\n \"group\": \"UI Feature\",\n \"workflowname\": \"wf_archive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/rights/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"acls\": [\n \"business_user\"\n ],\n \"actionname\": \"create\",\n \"allowedForOrganization\": false,\n \"class\": \"document\",\n \"definitionname\": \"d_default\",\n \"description\": \"Right to view links between records.\",\n \"group\": \"UI Feature\",\n \"workflowname\": \"wf_archive\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b",
"version": 3
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Update a right
PUT /rights/{id}
Rewrites a right in the catalogue - what it says about itself and, above all, which ACLs carry it, which is what decides who ends up holding it. The name is not among the things that can change: it is the identifier and the name the platform checks when the permission is enforced, so a right under another name is another right.
The whole right is replaced by what is sent, so a property left out is cleared rather than kept - including the ACLs, which means an update that forgets them detaches the right from every one of them. A change reaches a user on their next request, as rights are resolved once per request and not read again afterwards.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: update_rights
Required user role: admin
curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/rights/{id}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"acls": [
"business_user"
],
"actionname": "create",
"allowedForOrganization": false,
"class": "document",
"definitionname": "d_default",
"description": "Right to view links between records.",
"group": "UI Feature",
"workflowname": "wf_archive"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/rights/{id}?token="
payload = {
"version": 1,
"acls": ["business_user"],
"actionname": "create",
"allowedForOrganization": False,
"class": "document",
"definitionname": "d_default",
"description": "Right to view links between records.",
"group": "UI Feature",
"workflowname": "wf_archive"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: 1,
acls: ['business_user'],
actionname: 'create',
allowedForOrganization: false,
class: 'document',
definitionname: 'd_default',
description: 'Right to view links between records.',
group: 'UI Feature',
workflowname: 'wf_archive'
})
};
fetch('https://sandbox.circularo.com/api/v1/rights/{id}?token=', 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://sandbox.circularo.com/api/v1/rights/{id}?token=",
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([
'version' => 1,
'acls' => [
'business_user'
],
'actionname' => 'create',
'allowedForOrganization' => false,
'class' => 'document',
'definitionname' => 'd_default',
'description' => 'Right to view links between records.',
'group' => 'UI Feature',
'workflowname' => 'wf_archive'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://sandbox.circularo.com/api/v1/rights/{id}?token="
payload := strings.NewReader("{\n \"version\": 1,\n \"acls\": [\n \"business_user\"\n ],\n \"actionname\": \"create\",\n \"allowedForOrganization\": false,\n \"class\": \"document\",\n \"definitionname\": \"d_default\",\n \"description\": \"Right to view links between records.\",\n \"group\": \"UI Feature\",\n \"workflowname\": \"wf_archive\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://sandbox.circularo.com/api/v1/rights/{id}?token=")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"acls\": [\n \"business_user\"\n ],\n \"actionname\": \"create\",\n \"allowedForOrganization\": false,\n \"class\": \"document\",\n \"definitionname\": \"d_default\",\n \"description\": \"Right to view links between records.\",\n \"group\": \"UI Feature\",\n \"workflowname\": \"wf_archive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/rights/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"acls\": [\n \"business_user\"\n ],\n \"actionname\": \"create\",\n \"allowedForOrganization\": false,\n \"class\": \"document\",\n \"definitionname\": \"d_default\",\n \"description\": \"Right to view links between records.\",\n \"group\": \"UI Feature\",\n \"workflowname\": \"wf_archive\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b",
"version": 3
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Body
ACLs that are to carry the right, which is what decides who ends up holding it - a user holds it when one of their groups carries one of these. The list stands for the whole set, so a right left without any reaches nobody, and every ACL named here has to exist.
"business_user"
Kind of permission the right represents, which decides how it is resolved: document for a right over a metadata definition, workflow for one over a workflow transition, left out for a plain generic right. Once it is set, the name has to follow that class's naming format, or the right grants nothing at all.
"document"
Response
Returns the identifier and the new version of the right.