curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role_id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/roles"
payload = { "role_id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30" }
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({role_id: '9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30'})
};
fetch('https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/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/groups/{id}/workspaces/{workspace_id}/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([
'role_id' => '9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30'
]),
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/groups/{id}/workspaces/{workspace_id}/roles"
payload := strings.NewReader("{\n \"role_id\": \"9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30\"\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/groups/{id}/workspaces/{workspace_id}/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role_id\": \"9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/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 \"role_id\": \"9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30\"\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-b8c9-4012-9def-345678901234",
"group_id": "5a4b3c2d-1e0f-4a9b-8c7d-6e5f4a3b2c10",
"workspace_id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"role_id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30",
"role_name": "Sales Read Only",
"role_type": "access_role",
"granted_at": "2026-06-01T12:00:00Z",
"granted_by": "00000000-0000-0000-0000-000000000001"
}Assign Group Workspace Role
Assign a workspace-scoped role (system, such as workspace_admin, or custom access) to a group. Valid for both scim and custom groups. The account-wide admin role cannot be granted to a group. It is always a direct assignment to a user or service account. The group must be a direct member of the target workspace before this call. Assignment of workspace-scoped system roles to groups is not yet supported by the backend, so the system role behavior described here reflects the intended design.
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role_id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/roles"
payload = { "role_id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30" }
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({role_id: '9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30'})
};
fetch('https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/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/groups/{id}/workspaces/{workspace_id}/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([
'role_id' => '9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30'
]),
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/groups/{id}/workspaces/{workspace_id}/roles"
payload := strings.NewReader("{\n \"role_id\": \"9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30\"\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/groups/{id}/workspaces/{workspace_id}/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role_id\": \"9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/groups/{id}/workspaces/{workspace_id}/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 \"role_id\": \"9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30\"\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-b8c9-4012-9def-345678901234",
"group_id": "5a4b3c2d-1e0f-4a9b-8c7d-6e5f4a3b2c10",
"workspace_id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"role_id": "9c8b7a65-4d3e-4f21-b0a9-8c7d6e5f4a30",
"role_name": "Sales Read Only",
"role_type": "access_role",
"granted_at": "2026-06-01T12:00:00Z",
"granted_by": "00000000-0000-0000-0000-000000000001"
}Authorizations
OAuth 2.0 client credentials. Alternatively, you can authenticate with a personal access token (PAT) by sending Authorization: Basic base64(email:PAT).
Scopes
Write access to group resources.
Path Parameters
Group identifier (UUID).
Workspace identifier (UUID).
Body
Role to assign. Must exist in the organization.
Response
Created. Returns the new assignment.
A workspace-scoped role assignment for a group.
Assignment identifier.
The group this role is assigned to.
The workspace this role is assigned in.
The role identifier.
The name of the role.
system_role: built-in, non-modifiable. access_role: custom, fully manageable.
system_role, access_role ISO 8601 UTC.
The user who granted the role.
Was this page helpful?