curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource": "snowflake-prod",
"operations": [
"read",
"execute"
],
"type": "connection"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions"
payload = {
"resource": "snowflake-prod",
"operations": ["read", "execute"],
"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({
resource: 'snowflake-prod',
operations: ['read', 'execute'],
type: 'connection'
})
};
fetch('https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions', 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/service-accounts/{id}/permissions",
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([
'resource' => 'snowflake-prod',
'operations' => [
'read',
'execute'
],
'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/service-accounts/{id}/permissions"
payload := strings.NewReader("{\n \"resource\": \"snowflake-prod\",\n \"operations\": [\n \"read\",\n \"execute\"\n ],\n \"type\": \"connection\"\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/service-accounts/{id}/permissions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"snowflake-prod\",\n \"operations\": [\n \"read\",\n \"execute\"\n ],\n \"type\": \"connection\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions")
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 \"resource\": \"snowflake-prod\",\n \"operations\": [\n \"read\",\n \"execute\"\n ],\n \"type\": \"connection\"\n}"
response = http.request(request)
puts response.read_body{
"id": "p2b3c4d5-e6f7-8901-abcd-ef1234567890",
"service_account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"resource": "snowflake-prod",
"operations": [
"read",
"execute"
],
"type": "connection",
"assigned_at": "2026-06-15T11:00:00Z",
"assigned_by": "00000000-0000-0000-0000-000000000001"
}サービスアカウントに権限を割り当て
Assign a direct resource permission to a service account.
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource": "snowflake-prod",
"operations": [
"read",
"execute"
],
"type": "connection"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions"
payload = {
"resource": "snowflake-prod",
"operations": ["read", "execute"],
"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({
resource: 'snowflake-prod',
operations: ['read', 'execute'],
type: 'connection'
})
};
fetch('https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions', 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/service-accounts/{id}/permissions",
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([
'resource' => 'snowflake-prod',
'operations' => [
'read',
'execute'
],
'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/service-accounts/{id}/permissions"
payload := strings.NewReader("{\n \"resource\": \"snowflake-prod\",\n \"operations\": [\n \"read\",\n \"execute\"\n ],\n \"type\": \"connection\"\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/service-accounts/{id}/permissions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"snowflake-prod\",\n \"operations\": [\n \"read\",\n \"execute\"\n ],\n \"type\": \"connection\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/service-accounts/{id}/permissions")
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 \"resource\": \"snowflake-prod\",\n \"operations\": [\n \"read\",\n \"execute\"\n ],\n \"type\": \"connection\"\n}"
response = http.request(request)
puts response.read_body{
"id": "p2b3c4d5-e6f7-8901-abcd-ef1234567890",
"service_account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"resource": "snowflake-prod",
"operations": [
"read",
"execute"
],
"type": "connection",
"assigned_at": "2026-06-15T11:00:00Z",
"assigned_by": "00000000-0000-0000-0000-000000000001"
}承認
The access token received from the authorization server in the OAuth 2.0 flow.
パスパラメータ
Service account identifier (UUID).
ボディ
The name of the specific connection instance this permission applies to. This is the connection name as defined in Connect AI, not the connector type.
One or more operations to permit on the resource.
create, read, update, delete, execute Always connection. Classifies what category of resource the permission governs.
connection レスポンス
Created
Permission identifier.
The service account this permission is assigned to.
The connection name this permission applies to.
Allowed operations on the resource.
create, read, update, delete, execute Always connection. Classifies what category of resource the permission governs.
connection ISO 8601 UTC.
The user who assigned this permission.
このページは役に立ちましたか?