Skip to main content

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

  • idstring

    Unique workspace identifier (UUID). Pass this as workspaceId on the other /v1 endpoints to filter results to this workspace.

  • namestring

    Display name of the workspace.

  • slugstring

    URL-safe short identifier, unique across all workspaces.

  • parentWorkspaceIdstring | null

    The id of the parent workspace, or null for a top-level workspace. Child workspaces reference their parent here.

  • isActiveboolean

    Whether the workspace is currently active.

  • createdAttimestamp

    When 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.

GET/v1/workspaces
curl https://polaris.revlv.com/v1/workspaces \
-H "Authorization: Bearer {token}"
Response
{
"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:

GET/v1/devices
curl -G https://polaris.revlv.com/v1/devices \
-H "Authorization: Bearer {token}" \
-d workspaceId=b2c3d4e5-f6a7-8901-bcde-f12345678901

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.