curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/rights?token=' \
--header 'Content-Type: application/json' \
--data '
{
"name": "view_links",
"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?token="
payload = {
"name": "view_links",
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'view_links',
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?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?token=",
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([
'name' => 'view_links',
'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?token="
payload := strings.NewReader("{\n \"name\": \"view_links\",\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("POST", 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.post("https://sandbox.circularo.com/api/v1/rights?token=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"view_links\",\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?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"view_links\",\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"
}Create a right
POST /rights
Adds a named permission to the tenant’s catalogue and records which ACLs are to carry it. Nobody holds a right directly: a user belongs to groups, a group carries ACLs, and a right names the ACLs that carry it - so a right created without any grants nothing to anybody.
The name is the identifier and it is what the platform looks for when a permission is enforced, which means a newly invented name gates nothing until something checks it. Rights the product itself relies on are shipped as seed data rather than created here; this endpoint serves the administration screens and a tenant’s own additions.
Whether the right ever reaches a real person also depends on allowedForOrganization, since a right without it is resolved only for users who belong to no organization.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: add_rights
Required user role: admin
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/rights?token=' \
--header 'Content-Type: application/json' \
--data '
{
"name": "view_links",
"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?token="
payload = {
"name": "view_links",
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'view_links',
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?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?token=",
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([
'name' => 'view_links',
'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?token="
payload := strings.NewReader("{\n \"name\": \"view_links\",\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("POST", 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.post("https://sandbox.circularo.com/api/v1/rights?token=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"view_links\",\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?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"view_links\",\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
Body
Identifier of the right, which is also the name checked wherever the permission is enforced. It has to be one no other right already uses. Where a class is set, a name that does not follow that class's format is still accepted here, but the right then grants nothing when it is resolved.
1"view_links"
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 version of the newly created right.