Get dashboard stats
const url = 'https://osctrl.net/api/v1/stats';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://osctrl.net/api/v1/stats \ --header 'Authorization: <Authorization>'Returns cross-environment dashboard statistics.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
object
Per-env breakdown, in stable alphabetical order by name.
object
PlatformCounts buckets the env’s nodes by OS family (linux / darwin / windows / other). Drives the Nodes-table QuickFilters chip row. Counts are total (active + inactive), since the filter chip lists all nodes of that platform regardless of staleness — the Active/Inactive toggle is independent.
object
Cross-env platform breakdown — sum of every accessible env’s PlatformCounts.
object
TotalActiveCarves counts active carve-type queries.
TotalActiveQueries counts standard query-type active queries (excludes carves).
Cross-env totals (the user’s allowed envs only).
Examplegenerated
{ "active_nodes": 1, "environments": [ { "active": 1, "active_carves": 1, "active_queries": 1, "inactive": 1, "name": "example", "platform_counts": { "darwin": 1, "linux": 1, "other": 1, "windows": 1 }, "total": 1, "uuid": "example" } ], "inactive_hours": 1, "inactive_nodes": 1, "platform_counts": { "darwin": 1, "linux": 1, "other": 1, "windows": 1 }, "total_active_carves": 1, "total_active_queries": 1, "total_nodes": 1}Bad request
object
Examplegenerated
{ "code": "example", "error": "example"}Unauthorized
object
Examplegenerated
{ "code": "example", "error": "example"}Forbidden
object
Examplegenerated
{ "code": "example", "error": "example"}Not found
object
Examplegenerated
{ "code": "example", "error": "example"}Conflict
object
Examplegenerated
{ "code": "example", "error": "example"}Too many requests
object
Examplegenerated
{ "code": "example", "error": "example"}Internal server error
object
Examplegenerated
{ "code": "example", "error": "example"}Service unavailable
object
Examplegenerated
{ "code": "example", "error": "example"}