AI Governance API's
List the inventory of MCP servers, aggregated per server (one row per fingerprint + version) with device counts, usage metrics, and risk.
Maximum number of records to return (default 20, max 100)
Opaque pagination cursor returned as nextPageToken in a prior response
Sort order (default DEVICE_COUNT_DESC)
Case-insensitive match on the server name
Exact match on transport (e.g. stdio, http, sse)
Unix timestamp in seconds; exclude servers not active since this time
Restrict to servers declared by an MDM/enterprise-managed config file (MANAGED) or by a user-writable one (UNMANAGED). Omit to return both.
Include servers whose declaration has disappeared from its config file. Such rows carry removedAt and keep the state they were in when they disappeared. Defaults to false, and total moves with it. A pageToken is only valid for the filter set that produced it: changing this value (or any other filter) mid-pagination silently restarts from the first page with a freshly recomputed total, rather than returning an error. Finish a pagination run before changing filters. Has no effect on tenants where removal reconciliation is not yet enabled.
falseSuccessful response
Invalid request parameters
Authentication failure
Rate Limit Exceeded or Daily Quota Exceeded
Internal Nightfall Error
GET /ai-governance/v1/mcp-servers HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"mcpServers": [
{
"id": "text",
"serverId": "text",
"canonicalName": "text",
"version": "text",
"transport": "text",
"risk": 1,
"riskLabel": "text",
"isShadow": true,
"remoteUrl": "text",
"clients": [
"ANTIGRAVITY"
],
"unrecognizedClients": [
"text"
],
"provenance": "FIRST_PARTY",
"provenanceOverridden": true,
"riskOverridden": true,
"isManaged": true,
"deviceCount": 1,
"clientCount": 1,
"totalSpawns": 1,
"totalNetworkCalls": 1,
"totalRequestBytes": 1,
"totalResponseBytes": 1,
"firstSeen": 1,
"lastUsed": 1,
"removedAt": 1,
"registry": {
"name": "text",
"description": "text",
"isOfficial": true,
"isVerified": true,
"popularityScore": 1,
"repositoryUrl": "text",
"websiteUrl": "text",
"license": "text",
"packageName": "text",
"packageRegistry": "text"
}
}
],
"total": 1,
"nextPageToken": "text"
}Fetch a single MCP server by its opaque id, including registry metadata when available.
Opaque MCP server id from a list response
Successful response
Invalid request parameters
Authentication failure
MCP server does not exist
Rate Limit Exceeded or Daily Quota Exceeded
Internal Nightfall Error
GET /ai-governance/v1/mcp-servers/{serverId} HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"serverId": "text",
"canonicalName": "text",
"version": "text",
"transport": "text",
"risk": 1,
"riskLabel": "text",
"isShadow": true,
"remoteUrl": "text",
"clients": [
"ANTIGRAVITY"
],
"unrecognizedClients": [
"text"
],
"provenance": "FIRST_PARTY",
"provenanceOverridden": true,
"riskOverridden": true,
"isManaged": true,
"deviceCount": 1,
"clientCount": 1,
"totalSpawns": 1,
"totalNetworkCalls": 1,
"totalRequestBytes": 1,
"totalResponseBytes": 1,
"firstSeen": 1,
"lastUsed": 1,
"removedAt": 1,
"registry": {
"name": "text",
"description": "text",
"isOfficial": true,
"isVerified": true,
"popularityScore": 1,
"repositoryUrl": "text",
"websiteUrl": "text",
"license": "text",
"packageName": "text",
"packageRegistry": "text"
}
}List the devices using a specific MCP server, with a per-client usage breakdown.
Opaque MCP server id from a list response
Sort order (default LAST_USED_DESC)
Match on device id, machine name, user name, or user email
Successful response
Invalid request parameters
Authentication failure
Rate Limit Exceeded or Daily Quota Exceeded
Internal Nightfall Error
GET /ai-governance/v1/mcp-servers/{serverId}/devices HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"devices": [
{
"deviceId": "text",
"userEmail": "text",
"userName": "text",
"machineName": "text",
"totalSpawns": 1,
"totalNetworkCalls": 1,
"totalRequestBytes": 1,
"totalResponseBytes": 1,
"lastUsed": 1,
"clientBreakdown": [
{
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"configuredName": "text",
"stdioTimesSpawned": 1,
"timesNetworkCalled": 1,
"lastUsedAt": 1,
"isShadow": true
}
]
}
],
"total": 1,
"nextPageToken": "text"
}List devices that have any MCP server installed, aggregated per device.
Sort order (default SERVER_COUNT_DESC)
Match on device machine name
Successful response
Invalid request parameters
Authentication failure
Rate Limit Exceeded or Daily Quota Exceeded
Internal Nightfall Error
GET /ai-governance/v1/devices HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"devices": [
{
"deviceId": "text",
"serverCount": 1,
"hookCount": 1,
"pluginCount": 1,
"extensionCount": 1,
"totalSpawns": 1,
"totalNetworkCalls": 1,
"lastActive": 1,
"firstSeen": 1,
"machineName": "text",
"os": "text",
"osVersion": "text",
"userEmail": "text",
"agentStatus": "text"
}
],
"total": 1,
"nextPageToken": "text"
}Fetch a device and the full list of MCP servers running on it. The server list is returned inline and is not paginated.
Device id from a device list response
Successful response
Invalid request parameters
Authentication failure
Device does not exist
Rate Limit Exceeded or Daily Quota Exceeded
Internal Nightfall Error
GET /ai-governance/v1/devices/{deviceId} HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"device": {
"deviceId": "text",
"serverCount": 1,
"hookCount": 1,
"pluginCount": 1,
"extensionCount": 1,
"totalSpawns": 1,
"totalNetworkCalls": 1,
"lastActive": 1,
"firstSeen": 1,
"machineName": "text",
"os": "text",
"osVersion": "text",
"userEmail": "text",
"agentStatus": "text"
},
"mcpServers": [
{
"id": "text",
"serverId": "text",
"canonicalName": "text",
"version": "text",
"transport": "text",
"risk": 1,
"riskLabel": "text",
"isShadow": true,
"remoteUrl": "text",
"clients": [
"ANTIGRAVITY"
],
"unrecognizedClients": [
"text"
],
"provenance": "FIRST_PARTY",
"provenanceOverridden": true,
"riskOverridden": true,
"isManaged": true,
"deviceCount": 1,
"clientCount": 1,
"totalSpawns": 1,
"totalNetworkCalls": 1,
"totalRequestBytes": 1,
"totalResponseBytes": 1,
"firstSeen": 1,
"lastUsed": 1,
"removedAt": 1,
"registry": {
"name": "text",
"description": "text",
"isOfficial": true,
"isVerified": true,
"popularityScore": 1,
"repositoryUrl": "text",
"websiteUrl": "text",
"license": "text",
"packageName": "text",
"packageRegistry": "text"
}
}
]
}List the plugin inventory, aggregated per plugin (one row per client, marketplace, name and version) with a device count and what the plugin bundles. A plugin is a governance object because of what it brings with it — MCP servers, hooks and app declarations — not merely because it is installed.
Maximum number of records to return (default 20, max 100)
Opaque pagination cursor returned as nextPageToken in a prior response
Case-insensitive match on the plugin name
Restrict to plugins declared by an MDM/enterprise-managed config file (MANAGED) or by a user-writable one (UNMANAGED). Omit to return both.
Include plugins whose declaration has disappeared from every file that declared them. Such rows carry removedAt and keep the state they were in when they disappeared. Defaults to false, and total moves with it. A pageToken is only valid for the filter set that produced it: changing this value (or any other filter) mid-pagination silently restarts from the first page with a freshly recomputed total, rather than returning an error. Has no effect on tenants where removal reconciliation is not yet enabled.
falseSuccessful response
Total matching plugins (present on the first page)
Opaque cursor for the next page; omitted when there are no more results
Invalid request parameters
Authentication failure
Rate Limit Exceeded or Daily Quota Exceeded
Internal Nightfall Error
GET /ai-governance/v1/plugins HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"plugins": [
{
"id": "text",
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"marketplace": "text",
"name": "text",
"version": "text",
"status": "INSTALLED",
"trustState": "BLOCKED",
"provenance": "FIRST_PARTY",
"isManaged": true,
"description": "text",
"author": "text",
"repositoryUrl": "text",
"deviceCount": 1,
"bundledMcpCount": 1,
"bundledHookCount": 1,
"bundledAppCount": 1,
"removedAt": 1
}
],
"total": 1,
"nextPageToken": "text"
}List the devices that declare a given plugin. The response also carries a small plugin-level header, so a caller deep-linking to this route can render a title without a second request.
There is no separate get-plugin endpoint, and little would be gained by one: the /plugins rollup row already carries status, trust state, provenance, description, author, repository URL and the bundled counts. The header here adds only provenanceOverridden on top of that.
Opaque plugin id from a list response; it encodes the (client, marketplace, name, version) key. Version is part of the identity because the rollup is per version — one plugin name can occupy several rows, each with its own deviceCount — so pass the id from the row you want, unmodified.
Match on device id, machine name, user name, or user email
Successful response
Invalid request parameters
Authentication failure
Plugin is not present on any device. Only returned for an unfiltered first page: a request carrying search or pageToken returns 200 with an empty list instead, because neither an empty filtered result nor a page past the end proves the plugin is absent.
Internal Nightfall Error
GET /ai-governance/v1/plugins/{pluginId}/devices HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"plugin": {
"id": "text",
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"marketplace": "text",
"name": "text",
"status": "INSTALLED",
"trustState": "BLOCKED",
"provenance": "FIRST_PARTY",
"provenanceOverridden": true,
"description": "text",
"author": "text",
"repositoryUrl": "text"
},
"devices": [
{
"deviceId": "text",
"userEmail": "text",
"userName": "text",
"machineName": "text",
"status": "INSTALLED",
"trustState": "BLOCKED",
"version": "text",
"bundledMcpCount": 1,
"bundledHookCount": 1,
"bundledAppCount": 1
}
],
"total": 1,
"nextPageToken": "text"
}List the plugins declared on a given device. Unlike the company rollup these are per-declaration rows, so they carry where the plugin came from on disk instead of a device count.
See the same parameter on /plugins.
falseSuccessful response
Invalid request parameters
Authentication failure
Internal Nightfall Error
GET /ai-governance/v1/devices/{deviceId}/plugins HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"plugins": [
{
"id": "text",
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"marketplace": "text",
"name": "text",
"version": "text",
"status": "INSTALLED",
"trustState": "BLOCKED",
"provenance": "FIRST_PARTY",
"sourceType": "text",
"isManaged": true,
"bundledMcpCount": 1,
"bundledHookCount": 1,
"bundledAppCount": 1,
"removedAt": 1
}
],
"total": 1,
"nextPageToken": "text"
}List the hook inventory, aggregated per hook (one row per client, event and handler payload) with a device count. A hook is code an AI agent runs at a lifecycle point — before a tool call, after one, on prompt submission — so it is the inventory where "what can this agent execute on my endpoint" is answered.
Case-insensitive match on the hook's handler payload
Filter to these hook event names. Repeatable, max 20. Matched exactly, including case.
There is no fixed vocabulary: each AI client vendor names its own lifecycle points, so the set grows as vendors add events and as new clients appear. Values observed in the field, by client — Claude Code: PreToolUse, PostToolUse, SessionStart, Stop, UserPromptSubmit, Notification, PermissionRequest. Claude: PreToolUse, PostToolUse, SessionStart, Stop, UserPromptSubmit. Codex: PreToolUse, PostToolUse, Stop, UserPromptSubmit. Copilot: PreToolUse, PostToolUse, PreCompact, SessionStart, Stop, SubagentStart, SubagentStop, UserPromptSubmit. Cursor: beforeShellExecution, afterShellExecution, beforeReadFile, afterFileEdit, afterTabFileEdit, beforeTabFileRead, beforeMCPExecution, afterMCPExecution, beforeSubmitPrompt, afterAgentResponse, afterAgentThought, preToolUse, postToolUse, postToolUseFailure, preCompact, sessionStart, sessionEnd, stop, subagentStart, subagentStop.
IMPORTANT — the same lifecycle point is spelled differently by different vendors and this filter does not normalize. Cursor uses camelCase where the others use PascalCase, so preToolUse and PreToolUse are distinct values, each matching only its own vendors' hooks. To ask "show me all pre-tool-use hooks" pass both spellings. The pairs differing only by case are preToolUse/PreToolUse, postToolUse/PostToolUse, preCompact/PreCompact, sessionStart/SessionStart, stop/Stop, subagentStart/SubagentStart and subagentStop/SubagentStop; Cursor's remaining events have no PascalCase equivalent.
Restrict to hooks declared by an MDM/enterprise-managed config file (MANAGED) or by a user-writable one (UNMANAGED). Omit to return both.
Include hooks whose declaration has disappeared from every file that declared them. Such rows carry removedAt. Defaults to false, and total moves with it. A pageToken is only valid for the filter set that produced it: changing this value (or any other filter) mid-pagination silently restarts from the first page with a freshly recomputed total, rather than returning an error.
falseSuccessful response
Invalid request parameters
Authentication failure
Internal Nightfall Error
GET /ai-governance/v1/hooks HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"hooks": [
{
"id": "text",
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"eventName": "text",
"handlerType": "text",
"command": "text",
"commandHash": "text",
"isManaged": true,
"deviceCount": 1,
"removedAt": 1
}
],
"total": 1,
"nextPageToken": "text"
}List the devices that declare a given hook. The response also carries a small hook-level header, so a caller deep-linking to this route can render a title without a second request.
There is no separate get-hook endpoint, and little would be gained by one: the /hooks rollup row already carries the client, event, handler type and the handler payload itself. The header here adds only matcher.
Opaque hook id from a list response; it encodes the (client, event, handler hash) key
Match on device id, machine name, user name, or user email
Successful response
Invalid request parameters
Authentication failure
Hook is not present on any device. Only returned for an unfiltered first page: a request carrying search or pageToken returns 200 with an empty list instead, because neither an empty filtered result nor a page past the end proves the hook is absent.
Internal Nightfall Error
GET /ai-governance/v1/hooks/{hookId}/devices HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"hook": {
"id": "text",
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"eventName": "text",
"handlerType": "text",
"command": "text",
"commandHash": "text",
"matcher": "text"
},
"devices": [
{
"deviceId": "text",
"userEmail": "text",
"userName": "text",
"machineName": "text"
}
],
"total": 1,
"nextPageToken": "text"
}List the hooks declared on a given device. Unlike the company rollup these are per-declaration rows, so they carry which file on disk declared the hook and the matcher that scopes it — neither of which survives the rollup.
See the same parameter on /hooks.
falseSuccessful response
Invalid request parameters
Authentication failure
Internal Nightfall Error
GET /ai-governance/v1/devices/{deviceId}/hooks HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"hooks": [
{
"id": "text",
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"eventName": "text",
"handlerType": "text",
"command": "text",
"commandHash": "text",
"matcher": "text",
"isManaged": true,
"removedAt": 1
}
],
"total": 1,
"nextPageToken": "text"
}List the IDE-extension inventory, aggregated per extension and version across every IDE and device. An IDE carries hundreds of extensions and a handful of them can talk to a model, so aiOnly is usually the filter you want.
Case-insensitive match on the extension id or display name
Restrict to extensions installed on this device.
Restrict to extensions classified as AI-capable.
falseSuccessful response
Invalid request parameters
Authentication failure
Internal Nightfall Error
GET /ai-governance/v1/ide-extensions HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"extensions": [
{
"id": "text",
"extensionId": "text",
"publisher": "text",
"displayName": "text",
"version": "text",
"clients": [
"ANTIGRAVITY"
],
"unrecognizedClients": [
"text"
],
"provenance": "FIRST_PARTY",
"provenanceOverridden": true,
"isAi": true,
"deviceCount": 1
}
],
"total": 1,
"nextPageToken": "text"
}Fetch a single extension by its opaque id, including its Open VSX registry record and a per-IDE, per-profile breakdown. VS Code profiles are separate extension sets, so the same extension can be present in one profile of a machine and absent from another.
Opaque extension id from a list response; it encodes the (extension id, version) key
Successful response
Single-extension view, with the registry record and per-IDE breakdown.
Unix timestamp (seconds) of the earliest observed install.
Unix timestamp (seconds) of the most recent observation.
Invalid request parameters
Authentication failure
Extension or version does not exist on any device
Internal Nightfall Error
GET /ai-governance/v1/ide-extensions/{extensionId} HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"extensionId": "text",
"publisher": "text",
"name": "text",
"displayName": "text",
"capabilities": [
"text"
],
"provenance": "FIRST_PARTY",
"provenanceOverridden": true,
"isAi": true,
"deviceCount": 1,
"firstInstalledAt": 1,
"lastSeenAt": 1,
"registry": {
"source": "text",
"namespace": "text",
"name": "text",
"verified": true,
"deprecated": true,
"latestVersion": "text",
"lookupStatus": "OK",
"checkedAt": 1
},
"clients": [
{
"client": "ANTIGRAVITY",
"unrecognizedClient": "text",
"profiles": [
{
"profileId": "text",
"versions": [
{
"version": "text",
"provenance": "FIRST_PARTY",
"anyPrerelease": true,
"anyPinned": true,
"firstInstalledAt": 1
}
]
}
]
}
]
}List the devices on which a given extension is installed.
Match on device id, machine name, user name, or user email
Successful response
Total matching devices. Only meaningful on the first page; a request carrying a pageToken does not recompute it.
Invalid request parameters
Authentication failure
Extension or version is not installed on any device. Only returned for an unfiltered first page: a request carrying search or pageToken returns 200 with an empty list instead, because neither an empty filtered result nor a page past the end proves the extension is absent.
Internal Nightfall Error
GET /ai-governance/v1/ide-extensions/{extensionId}/devices HTTP/1.1
Host: api.nightfall.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"extension": {
"id": "text",
"extensionId": "text",
"publisher": "text",
"displayName": "text",
"provenance": "FIRST_PARTY"
},
"devices": [
{
"deviceId": "text",
"userEmail": "text",
"userName": "text",
"machineName": "text",
"clients": [
"ANTIGRAVITY"
],
"unrecognizedClients": [
"text"
],
"installedAt": 1
}
],
"total": 1,
"nextPageToken": "text"
}Last updated
Was this helpful?