Create Role
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sales Read Only",
"description": "Read access to the Salesforce connection.",
"permissions": [
{
"connection_id": "c3d4e5f6-a7b8-4901-8cde-f23456789012",
"operations": [
"read"
],
"type": "connection"
}
]
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/roles"
payload = {
"name": "Sales Read Only",
"description": "Read access to the Salesforce connection.",
"permissions": [
{
"connection_id": "c3d4e5f6-a7b8-4901-8cde-f23456789012",
"operations": ["read"],
"type": "connection"
}
]
}
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: 'Sales Read Only',
description: 'Read access to the Salesforce connection.',
permissions: [
{
connection_id: 'c3d4e5f6-a7b8-4901-8cde-f23456789012',
operations: ['read'],
type: 'connection'
}
]
})
};
fetch('https://cloud.cdata.com/api/v1/admin/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://cloud.cdata.com/api/v1/admin/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' => 'Sales Read Only',
'description' => 'Read access to the Salesforce connection.',
'permissions' => [
[
'connection_id' => 'c3d4e5f6-a7b8-4901-8cde-f23456789012',
'operations' => [
'read'
],
'type' => 'connection'
]
]
]),
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://cloud.cdata.com/api/v1/admin/roles"
payload := strings.NewReader("{\n \"name\": \"Sales Read Only\",\n \"description\": \"Read access to the Salesforce connection.\",\n \"permissions\": [\n {\n \"connection_id\": \"c3d4e5f6-a7b8-4901-8cde-f23456789012\",\n \"operations\": [\n \"read\"\n ],\n \"type\": \"connection\"\n }\n ]\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://cloud.cdata.com/api/v1/admin/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Read Only\",\n \"description\": \"Read access to the Salesforce connection.\",\n \"permissions\": [\n {\n \"connection_id\": \"c3d4e5f6-a7b8-4901-8cde-f23456789012\",\n \"operations\": [\n \"read\"\n ],\n \"type\": \"connection\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/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\": \"Sales Read Only\",\n \"description\": \"Read access to the Salesforce connection.\",\n \"permissions\": [\n {\n \"connection_id\": \"c3d4e5f6-a7b8-4901-8cde-f23456789012\",\n \"operations\": [\n \"read\"\n ],\n \"type\": \"connection\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30",
"name": "Sales Read Only",
"type": "access_role",
"description": "Read access to the Salesforce connection.",
"permissions": [
{
"connection_id": "c3d4e5f6-a7b8-4901-8cde-f23456789012",
"operations": [
"read"
],
"type": "connection"
}
],
"created_at": "2026-06-01T12:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}Create Role
Create a custom access role in the account. System roles cannot be created through the API. Access roles are defined once for the account and can be assigned in any workspace. The permissions of a role take effect only in the workspace of each referenced connection.
POST
/
roles
Create Role
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sales Read Only",
"description": "Read access to the Salesforce connection.",
"permissions": [
{
"connection_id": "c3d4e5f6-a7b8-4901-8cde-f23456789012",
"operations": [
"read"
],
"type": "connection"
}
]
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/roles"
payload = {
"name": "Sales Read Only",
"description": "Read access to the Salesforce connection.",
"permissions": [
{
"connection_id": "c3d4e5f6-a7b8-4901-8cde-f23456789012",
"operations": ["read"],
"type": "connection"
}
]
}
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: 'Sales Read Only',
description: 'Read access to the Salesforce connection.',
permissions: [
{
connection_id: 'c3d4e5f6-a7b8-4901-8cde-f23456789012',
operations: ['read'],
type: 'connection'
}
]
})
};
fetch('https://cloud.cdata.com/api/v1/admin/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://cloud.cdata.com/api/v1/admin/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' => 'Sales Read Only',
'description' => 'Read access to the Salesforce connection.',
'permissions' => [
[
'connection_id' => 'c3d4e5f6-a7b8-4901-8cde-f23456789012',
'operations' => [
'read'
],
'type' => 'connection'
]
]
]),
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://cloud.cdata.com/api/v1/admin/roles"
payload := strings.NewReader("{\n \"name\": \"Sales Read Only\",\n \"description\": \"Read access to the Salesforce connection.\",\n \"permissions\": [\n {\n \"connection_id\": \"c3d4e5f6-a7b8-4901-8cde-f23456789012\",\n \"operations\": [\n \"read\"\n ],\n \"type\": \"connection\"\n }\n ]\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://cloud.cdata.com/api/v1/admin/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Read Only\",\n \"description\": \"Read access to the Salesforce connection.\",\n \"permissions\": [\n {\n \"connection_id\": \"c3d4e5f6-a7b8-4901-8cde-f23456789012\",\n \"operations\": [\n \"read\"\n ],\n \"type\": \"connection\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/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\": \"Sales Read Only\",\n \"description\": \"Read access to the Salesforce connection.\",\n \"permissions\": [\n {\n \"connection_id\": \"c3d4e5f6-a7b8-4901-8cde-f23456789012\",\n \"operations\": [\n \"read\"\n ],\n \"type\": \"connection\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30",
"name": "Sales Read Only",
"type": "access_role",
"description": "Read access to the Salesforce connection.",
"permissions": [
{
"connection_id": "c3d4e5f6-a7b8-4901-8cde-f23456789012",
"operations": [
"read"
],
"type": "connection"
}
],
"created_at": "2026-06-01T12:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}Authorizations
oauth2basicAuth
Body
application/json
Response
Created
Last modified on November 12, 2026
Was this page helpful?