Get Service Account
curl --request GET \
--url https://cloud.cdata.com/api/v1/admin/service-accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud.cdata.com/api/v1/admin/service-accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.cdata.com/api/v1/admin/service-accounts/{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/service-accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cloud.cdata.com/api/v1/admin/service-accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.cdata.com/api/v1/admin/service-accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/service-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": "active",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"permissions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "<string>",
"operations": [
"create"
],
"type": "connection",
"assigned_at": "2023-11-07T05:31:56Z",
"assigned_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"code": "SERVICE_ACCOUNT_NOT_FOUND",
"message": "The specified service account does not exist."
}
}Service Accounts
サービスアカウントの取得
Get a single service account, including its directly assigned permissions.
GET
/
service-accounts
/
{id}
Get Service Account
curl --request GET \
--url https://cloud.cdata.com/api/v1/admin/service-accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud.cdata.com/api/v1/admin/service-accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.cdata.com/api/v1/admin/service-accounts/{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/service-accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cloud.cdata.com/api/v1/admin/service-accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.cdata.com/api/v1/admin/service-accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/service-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": "active",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"permissions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "<string>",
"operations": [
"create"
],
"type": "connection",
"assigned_at": "2023-11-07T05:31:56Z",
"assigned_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"code": "SERVICE_ACCOUNT_NOT_FOUND",
"message": "The specified service account does not exist."
}
}承認
The access token received from the authorization server in the OAuth 2.0 flow.
パスパラメータ
Service account identifier (UUID).
レスポンス
OK
Service account identifier.
Unique display name within the organization.
Optional free-text description of the service account.
Current lifecycle state of the service account.
利用可能なオプション:
active, deactivated Auto-generated. Used for OAuth 2.0 client credentials authentication.
Idempotency key supplied by the calling system.
ISO 8601 UTC.
User ID of the creator.
Direct permissions assigned to this service account.
Show child attributes
Show child attributes
このページは役に立ちましたか?