curl --request POST \
--url https://api.axiom.co/v2/rbac/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"datasetCapabilities": {},
"description": "<string>",
"members": [
"<string>"
],
"orgCapabilities": {
"annotations": [],
"apiTokens": [],
"auditLog": [
"read"
],
"billing": [],
"dashboards": [],
"datasets": [],
"endpoints": [],
"flows": [],
"integrations": [],
"monitors": [],
"notifiers": [],
"rbac": [],
"sharedAccessKeys": [],
"users": [],
"views": []
},
"viewCapabilities": {}
}
'import requests
url = "https://api.axiom.co/v2/rbac/roles"
payload = {
"name": "<string>",
"datasetCapabilities": {},
"description": "<string>",
"members": ["<string>"],
"orgCapabilities": {
"annotations": [],
"apiTokens": [],
"auditLog": ["read"],
"billing": [],
"dashboards": [],
"datasets": [],
"endpoints": [],
"flows": [],
"integrations": [],
"monitors": [],
"notifiers": [],
"rbac": [],
"sharedAccessKeys": [],
"users": [],
"views": []
},
"viewCapabilities": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
datasetCapabilities: {},
description: '<string>',
members: ['<string>'],
orgCapabilities: {
annotations: [],
apiTokens: [],
auditLog: ['read'],
billing: [],
dashboards: [],
datasets: [],
endpoints: [],
flows: [],
integrations: [],
monitors: [],
notifiers: [],
rbac: [],
sharedAccessKeys: [],
users: [],
views: []
},
viewCapabilities: {}
})
};
fetch('https://api.axiom.co/v2/rbac/roles', 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.axiom.co/v2/rbac/roles",
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' => '<string>',
'datasetCapabilities' => [
],
'description' => '<string>',
'members' => [
'<string>'
],
'orgCapabilities' => [
'annotations' => [
],
'apiTokens' => [
],
'auditLog' => [
'read'
],
'billing' => [
],
'dashboards' => [
],
'datasets' => [
],
'endpoints' => [
],
'flows' => [
],
'integrations' => [
],
'monitors' => [
],
'notifiers' => [
],
'rbac' => [
],
'sharedAccessKeys' => [
],
'users' => [
],
'views' => [
]
],
'viewCapabilities' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.axiom.co/v2/rbac/roles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"datasetCapabilities\": {},\n \"description\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"orgCapabilities\": {\n \"annotations\": [],\n \"apiTokens\": [],\n \"auditLog\": [\n \"read\"\n ],\n \"billing\": [],\n \"dashboards\": [],\n \"datasets\": [],\n \"endpoints\": [],\n \"flows\": [],\n \"integrations\": [],\n \"monitors\": [],\n \"notifiers\": [],\n \"rbac\": [],\n \"sharedAccessKeys\": [],\n \"users\": [],\n \"views\": []\n },\n \"viewCapabilities\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.axiom.co/v2/rbac/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"datasetCapabilities\": {},\n \"description\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"orgCapabilities\": {\n \"annotations\": [],\n \"apiTokens\": [],\n \"auditLog\": [\n \"read\"\n ],\n \"billing\": [],\n \"dashboards\": [],\n \"datasets\": [],\n \"endpoints\": [],\n \"flows\": [],\n \"integrations\": [],\n \"monitors\": [],\n \"notifiers\": [],\n \"rbac\": [],\n \"sharedAccessKeys\": [],\n \"users\": [],\n \"views\": []\n },\n \"viewCapabilities\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v2/rbac/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"datasetCapabilities\": {},\n \"description\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"orgCapabilities\": {\n \"annotations\": [],\n \"apiTokens\": [],\n \"auditLog\": [\n \"read\"\n ],\n \"billing\": [],\n \"dashboards\": [],\n \"datasets\": [],\n \"endpoints\": [],\n \"flows\": [],\n \"integrations\": [],\n \"monitors\": [],\n \"notifiers\": [],\n \"rbac\": [],\n \"sharedAccessKeys\": [],\n \"users\": [],\n \"views\": []\n },\n \"viewCapabilities\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"datasetCapabilities": {},
"description": "<string>",
"members": [
"<string>"
],
"orgCapabilities": {
"annotations": [],
"apiTokens": [],
"auditLog": [
"read"
],
"billing": [],
"dashboards": [],
"datasets": [],
"endpoints": [],
"flows": [],
"integrations": [],
"monitors": [],
"notifiers": [],
"rbac": [],
"sharedAccessKeys": [],
"users": [],
"views": []
},
"viewCapabilities": {}
}Create role
Creates a new role in the organization with the specified permissions and member assignments.
curl --request POST \
--url https://api.axiom.co/v2/rbac/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"datasetCapabilities": {},
"description": "<string>",
"members": [
"<string>"
],
"orgCapabilities": {
"annotations": [],
"apiTokens": [],
"auditLog": [
"read"
],
"billing": [],
"dashboards": [],
"datasets": [],
"endpoints": [],
"flows": [],
"integrations": [],
"monitors": [],
"notifiers": [],
"rbac": [],
"sharedAccessKeys": [],
"users": [],
"views": []
},
"viewCapabilities": {}
}
'import requests
url = "https://api.axiom.co/v2/rbac/roles"
payload = {
"name": "<string>",
"datasetCapabilities": {},
"description": "<string>",
"members": ["<string>"],
"orgCapabilities": {
"annotations": [],
"apiTokens": [],
"auditLog": ["read"],
"billing": [],
"dashboards": [],
"datasets": [],
"endpoints": [],
"flows": [],
"integrations": [],
"monitors": [],
"notifiers": [],
"rbac": [],
"sharedAccessKeys": [],
"users": [],
"views": []
},
"viewCapabilities": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
datasetCapabilities: {},
description: '<string>',
members: ['<string>'],
orgCapabilities: {
annotations: [],
apiTokens: [],
auditLog: ['read'],
billing: [],
dashboards: [],
datasets: [],
endpoints: [],
flows: [],
integrations: [],
monitors: [],
notifiers: [],
rbac: [],
sharedAccessKeys: [],
users: [],
views: []
},
viewCapabilities: {}
})
};
fetch('https://api.axiom.co/v2/rbac/roles', 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.axiom.co/v2/rbac/roles",
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' => '<string>',
'datasetCapabilities' => [
],
'description' => '<string>',
'members' => [
'<string>'
],
'orgCapabilities' => [
'annotations' => [
],
'apiTokens' => [
],
'auditLog' => [
'read'
],
'billing' => [
],
'dashboards' => [
],
'datasets' => [
],
'endpoints' => [
],
'flows' => [
],
'integrations' => [
],
'monitors' => [
],
'notifiers' => [
],
'rbac' => [
],
'sharedAccessKeys' => [
],
'users' => [
],
'views' => [
]
],
'viewCapabilities' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.axiom.co/v2/rbac/roles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"datasetCapabilities\": {},\n \"description\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"orgCapabilities\": {\n \"annotations\": [],\n \"apiTokens\": [],\n \"auditLog\": [\n \"read\"\n ],\n \"billing\": [],\n \"dashboards\": [],\n \"datasets\": [],\n \"endpoints\": [],\n \"flows\": [],\n \"integrations\": [],\n \"monitors\": [],\n \"notifiers\": [],\n \"rbac\": [],\n \"sharedAccessKeys\": [],\n \"users\": [],\n \"views\": []\n },\n \"viewCapabilities\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.axiom.co/v2/rbac/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"datasetCapabilities\": {},\n \"description\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"orgCapabilities\": {\n \"annotations\": [],\n \"apiTokens\": [],\n \"auditLog\": [\n \"read\"\n ],\n \"billing\": [],\n \"dashboards\": [],\n \"datasets\": [],\n \"endpoints\": [],\n \"flows\": [],\n \"integrations\": [],\n \"monitors\": [],\n \"notifiers\": [],\n \"rbac\": [],\n \"sharedAccessKeys\": [],\n \"users\": [],\n \"views\": []\n },\n \"viewCapabilities\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v2/rbac/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"datasetCapabilities\": {},\n \"description\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"orgCapabilities\": {\n \"annotations\": [],\n \"apiTokens\": [],\n \"auditLog\": [\n \"read\"\n ],\n \"billing\": [],\n \"dashboards\": [],\n \"datasets\": [],\n \"endpoints\": [],\n \"flows\": [],\n \"integrations\": [],\n \"monitors\": [],\n \"notifiers\": [],\n \"rbac\": [],\n \"sharedAccessKeys\": [],\n \"users\": [],\n \"views\": []\n },\n \"viewCapabilities\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"datasetCapabilities": {},
"description": "<string>",
"members": [
"<string>"
],
"orgCapabilities": {
"annotations": [],
"apiTokens": [],
"auditLog": [
"read"
],
"billing": [],
"dashboards": [],
"datasets": [],
"endpoints": [],
"flows": [],
"integrations": [],
"monitors": [],
"notifiers": [],
"rbac": [],
"sharedAccessKeys": [],
"users": [],
"views": []
},
"viewCapabilities": {}
}Authorizations
Body
The role configuration containing name, description, members, and capability settings
Defines a role and its associated permissions within the system
Unique name identifier for the role
Defines the available permissions for dataset operations
Show child attributes
Show child attributes
Detailed description of the role's purpose and scope
List of user IDs that are assigned to this role
Defines organization-wide permissions and capabilities
Show child attributes
Show child attributes
Defines the available permissions for view operations
Show child attributes
Show child attributes
Response
The role was successfully created
Extends the base Role type to include a unique identifier
Unique name identifier for the role
Unique identifier for the role
Defines the available permissions for dataset operations
Show child attributes
Show child attributes
Detailed description of the role's purpose and scope
List of user IDs that are assigned to this role
Defines organization-wide permissions and capabilities
Show child attributes
Show child attributes
Defines the available permissions for view operations
Show child attributes
Show child attributes
Was this page helpful?