Remotehost Docs
API ReferenceOrg workspaces

Read a workspace's network

GET
/orgs/{orgId}/workspaces/{workspaceId}/network

The preview links of the workspace's machines that still open, from the projects where the caller holds sandbox.read, and each environment's egress, from those where it holds environments.read. A workspace network (WireGuard, peers, Tailscale, private networks by label) and preview links' URLs are not served, and are named in unavailable. A caller who cannot see the workspace (a member holding no project in it) gets the same 404 as a workspace that does not exist. API keys cannot call it. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.

Authorization

bearerAuth
AuthorizationBearer <token>

A RemoteHost API key (rh_sk_...) or a user session token.

In: header

Path Parameters

orgId*string
workspaceId*string

Query Parameters

limit?string

How many rows a list holds: 1 to 500, 100 by default. Disks and machines come most recently active first, preview links newest first, and egress project by project with each project's default environment first; the total says how many there are in all.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/orgs/string/workspaces/string/network"
{  "workspace": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "kind": "internal"  },  "previewLinks": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "machineId": "9f61f395-8150-4531-9240-2cb221ad2692",      "port": 0,      "audience": "team",      "label": "string",      "endUserId": "string",      "createdAt": "string",      "expiresAt": "string",      "lastSeenAt": "string"    }  ],  "previewLinkTotal": 0,  "egress": [    {      "environment": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string"      },      "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",      "isDefault": true,      "enforced": true,      "policy": "none",      "allowlist": [        "string"      ]    }  ],  "egressTotal": 0,  "privateNetwork": {    "enabled": true,    "prefix": "string",    "machineTotal": 0,    "machines": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "address": "string",        "environment": {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "name": "string"        }      }    ]  },  "unavailable": [    {      "field": "wireguard",      "reason": "not_metered",      "message": "string"    }  ]}