Get a workspace
curl --request GET \
--url https://api.runaether.dev/workspaces/{workspaceID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/workspaces/{workspaceID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/workspaces/{workspaceID}', 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.runaether.dev/workspaces/{workspaceID}",
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.runaether.dev/workspaces/{workspaceID}"
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.runaether.dev/workspaces/{workspaceID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/workspaces/{workspaceID}")
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{
"created_at": "2023-11-07T05:31:56Z",
"display_state": "deleted",
"hardware": {
"cpu_kind": "shared",
"cpus": 8,
"gpu_kind": "a10",
"memory_mb": 16512,
"volume_size_gb": 250
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keep_active": true,
"previews": [
{
"name": "<string>",
"port": 32768,
"url": "<string>"
}
],
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startable": true,
"updated_at": "2023-11-07T05:31:56Z",
"vm_size": "small",
"error_message": "<string>",
"git_ref": "<string>",
"last_accessed_at": "2023-11-07T05:31:56Z",
"last_shutdown_at": "2023-11-07T05:31:56Z",
"last_started_at": "2023-11-07T05:31:56Z",
"machine_id": "<string>",
"private_ip": "<string>",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "org_membership_required",
"error": "<string>"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Workspaces
Get a workspace
Reads one workspace: its rendered display_state, whether the workspace itself could be started (startable), whether idle shutdown is suspended for it (keep_active), its VM size, hardware and declared previews.
Use this tool when you need to:
- Check whether a workspace is ready, starting, stopped or errored before connecting to it
- Learn whether the workspace still has what a start needs, from startable
- Find a workspace’s bound task, machine, VM size or declared preview URLs
Examples:
- GET /workspaces/
- GET /workspaces/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21
Hints:
- workspaceID is the workspace’s uuid (422 otherwise); a deleted workspace is 404.
- display_state is idle, starting, preparing, ready, stopping, stopped, suspending, suspended or error; vm_size is the one runtime class it runs on, medium, large or xl, or small (no longer launchable).
- startable is true for an idle, stopped or suspended workspace that still has its machine and a bound task. It is the workspace’s half of a start, not the task’s: read the bound task’s can.connect_live (getTask) before offering one, and connectTask with start_sandbox=true can still refuse it (409 sandbox_needs_message for an errored task, 402 by runtime admission, 409 task_creator_deleted).
- task_id is the bound task, absent once a revive unbound it; machine_id and private_ip are absent without a machine; previews lists each declared preview’s name, port and url.
- Use listProjectWorkspaces or listAllWorkspaces instead to find workspaces; use connectTask on its task to open a live connection to it and updateWorkspace to change keep_active or vm_size.
- Owners, admins and members of the workspace’s organization, whichever organization the caller selected; a viewer or billing member is refused with 403 org_role_insufficient, a suspended organization with 403 org_suspended, a workspace in no organization the caller belongs to is 404, and 503 when the membership check is unavailable. An agent host’s grant is refused with 403 agent_host_route_not_allowed.
GET
/
workspaces
/
{workspaceID}
Get a workspace
curl --request GET \
--url https://api.runaether.dev/workspaces/{workspaceID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/workspaces/{workspaceID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/workspaces/{workspaceID}', 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.runaether.dev/workspaces/{workspaceID}",
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.runaether.dev/workspaces/{workspaceID}"
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.runaether.dev/workspaces/{workspaceID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/workspaces/{workspaceID}")
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{
"created_at": "2023-11-07T05:31:56Z",
"display_state": "deleted",
"hardware": {
"cpu_kind": "shared",
"cpus": 8,
"gpu_kind": "a10",
"memory_mb": 16512,
"volume_size_gb": 250
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keep_active": true,
"previews": [
{
"name": "<string>",
"port": 32768,
"url": "<string>"
}
],
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startable": true,
"updated_at": "2023-11-07T05:31:56Z",
"vm_size": "small",
"error_message": "<string>",
"git_ref": "<string>",
"last_accessed_at": "2023-11-07T05:31:56Z",
"last_shutdown_at": "2023-11-07T05:31:56Z",
"last_started_at": "2023-11-07T05:31:56Z",
"machine_id": "<string>",
"private_ip": "<string>",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "org_membership_required",
"error": "<string>"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Response
OK