curl --request GET \
--url https://api.blaxel.ai/v0/workspaces \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.blaxel.ai/v0/workspaces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.blaxel.ai/v0/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://api.blaxel.ai/v0/workspaces",
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://api.blaxel.ai/v0/workspaces"
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://api.blaxel.ai/v0/workspaces")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blaxel.ai/v0/workspaces")
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[
{
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"accountId": "<string>",
"displayName": "My Workspace",
"groupMappings": [
{
"groupName": "Engineering",
"role": "admin"
}
],
"hipaaInfo": {
"accountEnabled": true,
"unsafe": {
"enabled": true,
"updatedAt": "<string>",
"updatedBy": "<string>"
}
},
"id": "<string>",
"labels": {},
"name": "my-workspace",
"region": "us-west-2",
"resourceCounts": {},
"runtime": {
"generation": "mk3",
"sandbox": {
"disableProcessLogging": true
}
},
"status": "ready",
"statusReason": "<string>"
}
]{
"error": "Resource already exists",
"code": 409,
"message": "Invalid request body"
}{
"error": "Resource already exists",
"code": 409,
"message": "Invalid request body"
}List accessible workspaces
Returns all workspaces the authenticated user has access to. Each workspace is a separate tenant with its own resources, team members, and billing.
curl --request GET \
--url https://api.blaxel.ai/v0/workspaces \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.blaxel.ai/v0/workspaces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.blaxel.ai/v0/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://api.blaxel.ai/v0/workspaces",
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://api.blaxel.ai/v0/workspaces"
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://api.blaxel.ai/v0/workspaces")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blaxel.ai/v0/workspaces")
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[
{
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"accountId": "<string>",
"displayName": "My Workspace",
"groupMappings": [
{
"groupName": "Engineering",
"role": "admin"
}
],
"hipaaInfo": {
"accountEnabled": true,
"unsafe": {
"enabled": true,
"updatedAt": "<string>",
"updatedBy": "<string>"
}
},
"id": "<string>",
"labels": {},
"name": "my-workspace",
"region": "us-west-2",
"resourceCounts": {},
"runtime": {
"generation": "mk3",
"sandbox": {
"disableProcessLogging": true
}
},
"status": "ready",
"statusReason": "<string>"
}
]{
"error": "Resource already exists",
"code": 409,
"message": "Invalid request body"
}{
"error": "Resource already exists",
"code": 409,
"message": "Invalid request body"
}Authorizations
OAuth2 authentication with JWT tokens
Response
successful operation
The date and time when the resource was created
The date and time when the resource was updated
The user or service account who created the resource
The user or service account who updated the resource
Workspace account id
Workspace display name
"My Workspace"
Group-to-role mappings for directory sync (SCIM) group membership
Show child attributes
Show child attributes
HIPAA compliance state for a workspace. accountEnabled mirrors the account-level hipaa_compliance addon (set server-side from operator tooling and Stripe billing events). unsafe records a per-workspace opt-out toggled from workspace settings; absent when the account does not have the addon.
Show child attributes
Show child attributes
Autogenerated unique workspace id
Key-value pairs for organizing and filtering resources. Labels can be used to categorize resources by environment, project, team, or any custom taxonomy.
Show child attributes
Show child attributes
Workspace name
"my-workspace"
Workspace write region
"us-west-2"
Per-resource counts (agents, functions, models, sandboxes, policies, jobs, volumes, drives, volumetemplates, integrationconnections, previews, customdomains, serviceaccounts, images). Only populated when GetWorkspace is called with ?countResources=true.
Show child attributes
Show child attributes
Runtime configuration for the workspace infrastructure
Show child attributes
Show child attributes
Workspace status (created, account_binded, account_configured, workspace_configured, ready, error)
created, account_binded, account_configured, workspace_configured, ready, error "ready"
Reason for current status (only set for error status)
Was this page helpful?