Workspaces
The workspaces your token can reach — the workspace it belongs to plus any workspaces nested directly beneath it. Use a workspace's id as the workspaceId filter on the other endpoints to scope a request to a single workspace.
The workspace object
idstringUnique workspace identifier (UUID). Pass this as
workspaceIdon the other/v1endpoints to filter results to this workspace.namestringDisplay name of the workspace.
slugstringURL-safe short identifier, unique across all workspaces.
parentWorkspaceIdstring | nullThe
idof the parent workspace, ornullfor a top-level workspace. Child workspaces reference their parent here.isActivebooleanWhether the workspace is currently active.
createdAttimestampWhen the workspace was created (UTC).
List workspaces GET /v1/workspaces
Returns every workspace your token can access — the workspace the token belongs to, plus any workspaces nested directly beneath it. The top-level workspace has a parentWorkspaceId of null; its children reference it by id.
Takes no parameters, and the result is not paginated.
- cURL
- JavaScript
- Go
- PHP
curl https://polaris.revlv.com/v1/workspaces \
-H "Authorization: Bearer {token}"
const res = await fetch('https://polaris.revlv.com/v1/workspaces', {
headers: { 'Authorization': 'Bearer {token}' },
});
const { data } = await res.json();
req, _ := http.NewRequest("GET", "https://polaris.revlv.com/v1/workspaces", 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))
$response = $client->get('https://polaris.revlv.com/v1/workspaces', [
'headers' => ['Authorization' => 'Bearer {token}'],
]);
echo $response->getBody();
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Main Fleet",
"slug": "main-fleet",
"parentWorkspaceId": null,
"isActive": true,
"createdAt": "2026-01-15T08:00:00Z"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Region — Visayas",
"slug": "region-visayas",
"parentWorkspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActive": true,
"createdAt": "2026-02-01T09:30:00Z"
}
]
}
Filtering reads by workspace
The Devices, Connected Clients, Clients, and Telemetry endpoints accept an optional workspaceId query parameter. Pass any id from GET /v1/workspaces to scope the response to just that workspace:
- cURL
- JavaScript
curl -G https://polaris.revlv.com/v1/devices \
-H "Authorization: Bearer {token}" \
-d workspaceId=b2c3d4e5-f6a7-8901-bcde-f12345678901
const res = await fetch(
'https://polaris.revlv.com/v1/devices?workspaceId=b2c3d4e5-f6a7-8901-bcde-f12345678901',
{ headers: { 'Authorization': 'Bearer {token}' } },
);
const { data } = await res.json();
Omit workspaceId to return data across every workspace your token can reach. The workspace must be one your token can access — a valid id outside that set returns 403 Forbidden, and a value that isn't a UUID returns 400 Bad Request.