Create Workspace
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/workspaces"
payload = {
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance"
}
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: 'Finance Analytics',
description: 'Workspace for the finance analytics team.',
external_id: 'tf-workspace-finance'
})
};
fetch('https://cloud.cdata.com/api/v1/admin/workspaces', 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/workspaces",
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' => 'Finance Analytics',
'description' => 'Workspace for the finance analytics team.',
'external_id' => 'tf-workspace-finance'
]),
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/workspaces"
payload := strings.NewReader("{\n \"name\": \"Finance Analytics\",\n \"description\": \"Workspace for the finance analytics team.\",\n \"external_id\": \"tf-workspace-finance\"\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/workspaces")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Finance Analytics\",\n \"description\": \"Workspace for the finance analytics team.\",\n \"external_id\": \"tf-workspace-finance\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/workspaces")
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\": \"Finance Analytics\",\n \"description\": \"Workspace for the finance analytics team.\",\n \"external_id\": \"tf-workspace-finance\"\n}"
response = http.request(request)
puts response.read_body{
"id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance",
"is_default": false,
"member_count": 0,
"connection_count": 0,
"created_at": "2026-06-01T12:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}{
"id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance",
"is_default": false,
"member_count": 0,
"connection_count": 0,
"created_at": "2026-06-01T12:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required field or invalid value."
}
}{
"error": {
"code": "WORKSPACE_NAME_CONFLICT",
"message": "A workspace with this name already exists in the organization."
}
}Workspaces
ワークスペースの作成
Create a workspace. If you supply external_id and a workspace with that external_id already exists, the existing workspace is returned with HTTP 200. This makes repeated applies from infrastructure-as-code tools safe.
POST
/
workspaces
Create Workspace
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/workspaces"
payload = {
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance"
}
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: 'Finance Analytics',
description: 'Workspace for the finance analytics team.',
external_id: 'tf-workspace-finance'
})
};
fetch('https://cloud.cdata.com/api/v1/admin/workspaces', 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/workspaces",
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' => 'Finance Analytics',
'description' => 'Workspace for the finance analytics team.',
'external_id' => 'tf-workspace-finance'
]),
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/workspaces"
payload := strings.NewReader("{\n \"name\": \"Finance Analytics\",\n \"description\": \"Workspace for the finance analytics team.\",\n \"external_id\": \"tf-workspace-finance\"\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/workspaces")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Finance Analytics\",\n \"description\": \"Workspace for the finance analytics team.\",\n \"external_id\": \"tf-workspace-finance\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/workspaces")
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\": \"Finance Analytics\",\n \"description\": \"Workspace for the finance analytics team.\",\n \"external_id\": \"tf-workspace-finance\"\n}"
response = http.request(request)
puts response.read_body{
"id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance",
"is_default": false,
"member_count": 0,
"connection_count": 0,
"created_at": "2026-06-01T12:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}{
"id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"name": "Finance Analytics",
"description": "Workspace for the finance analytics team.",
"external_id": "tf-workspace-finance",
"is_default": false,
"member_count": 0,
"connection_count": 0,
"created_at": "2026-06-01T12:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required field or invalid value."
}
}{
"error": {
"code": "WORKSPACE_NAME_CONFLICT",
"message": "A workspace with this name already exists in the organization."
}
}承認
oauth2basicAuth
ボディ
application/json
レスポンス
OK. A workspace with this external_id already exists. Returns the existing workspace.
最終更新日 2026年11月13日
このページは役に立ちましたか?