Skip to content
AI GovernanceMarkdown

AI Governance API

Every endpoint AI Governance serves on your realm's host, by area, with the page that explains each.

Available, with limitsAPI

Every call here is made on your realm’s own host with your session, sent as the x-cvyuh-token cookie; Call the API shows how to get one. You need a privilege that reads the realm’s configuration, such as RealmViewer or RealmOwner, held in the realm or in a realm above it; today the same privilege can also drop a device. Each call sees only that realm’s fleet. Unlike the rest of the realm’s API, the fleet spells its fields in snake_case, and its times are seconds since the Unix epoch; a skill’s frontMatter and the usage report are spelled in camelCase.

Terminal window
curl https://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/overview \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

What each device’s tools are is part of its fleet record: discoveries (each tool’s kind, version, path, mcp_servers and skills) and model_runtimes (each runtime’s kind and its models), read with GET .../devices/{device} below. See AI tool discovery and MCP servers and skills.

MethodEndpointWhat it doesPage
GEThttps://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/overviewThe fleet at a glance: total_devices, online_devices, offline_devices, config_failures, active_revision, and the most recent devicesFleet records
GEThttps://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devicesEvery approved device, with who approved it and its installed_toolsFleet records
GEThttps://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devices/{device}One device in full: discoveries, model_runtimes, recent_events and programsFleet records
DELETEhttps://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devices/{device}Drop the device from the fleet only; answers 204Fleet records

{device} is the fleet device id, the id in the fleet’s device list; it isn’t the device id on the realm’s device records. To take a device out of the realm, use Device removal, which drops it from the fleet too.

MethodEndpointWhat it doesPage
GEThttps://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/daemon-configThe configuration the realm gives its devices’ AI tools agents, as config; null until managed configuration arrivesWhat’s next for configuration
MethodEndpointWhat it doesPage
GEThttps://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/usageModel usage by user, device, tool, provider and model; empty until usage is collectedWhat’s next for models

usage takes range (24h, 7d by default, 30d or 90d), by (a comma-separated list of user, device, tool, provider and model), user, device, tool, provider or model to narrow it, and utcOffsetMinutes (from -840 to 840, 0 by default) for where daily totals begin. An unknown range, breakdown or offset answers 400.

AnswerWhy
204A device dropped
400A usage query with an unknown range, by or utcOffsetMinutes
401No session, or it has ended
403Your privileges don’t read this realm’s configuration
404device not found: no device in the realm’s fleet has that id
500The fleet couldn’t read its records; try again