Update Role
curl --request PATCH \
--url https://cloud.cdata.com/api/v1/admin/roles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Read access to Salesforce and HubSpot."
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/roles/{id}"
payload = { "description": "Read access to Salesforce and HubSpot." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'Read access to Salesforce and HubSpot.'})
};
fetch('https://cloud.cdata.com/api/v1/admin/roles/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Read access to Salesforce and HubSpot.'
]),
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/{id}"
payload := strings.NewReader("{\n \"description\": \"Read access to Salesforce and HubSpot.\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://cloud.cdata.com/api/v1/admin/roles/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Read access to Salesforce and HubSpot.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/roles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Read access to Salesforce and HubSpot.\"\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"
}
Roles
ロールの更新
Partially update a custom access role. Only fields included in the request body are modified. System roles cannot be modified. If you include permissions, it replaces the entire permissions list. Changes take effect in every workspace where the role is assigned.
PATCH
/
roles
/
{id}
Update Role
curl --request PATCH \
--url https://cloud.cdata.com/api/v1/admin/roles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Read access to Salesforce and HubSpot."
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/roles/{id}"
payload = { "description": "Read access to Salesforce and HubSpot." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'Read access to Salesforce and HubSpot.'})
};
fetch('https://cloud.cdata.com/api/v1/admin/roles/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Read access to Salesforce and HubSpot.'
]),
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/{id}"
payload := strings.NewReader("{\n \"description\": \"Read access to Salesforce and HubSpot.\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://cloud.cdata.com/api/v1/admin/roles/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Read access to Salesforce and HubSpot.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/roles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Read access to Salesforce and HubSpot.\"\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"
}
承認
oauth2basicAuth
ボディ
application/json
レスポンス
OK. Returns the full role object.
最終更新日 2026年11月13日
このページは役に立ちましたか?