Skip to content

Organization

These routes publish what the console's Organization, API Keys and Activity pages show: who is in your organization, who is invited, which API tokens exist, what each token has done, and every run that finished on your clusters.

Route What it serves
GET /api/org/members the roster, the auto join rules, the outstanding invitations
GET /api/org/tokens every API token the organization holds, as metadata
GET /api/org/tokens/{token_id}/activity one token's activity trail; self is the calling token
DELETE /api/org/tokens/self the calling token revokes itself
GET /api/org/activity the organization's trail: every member's and every token's recorded write, newest first
GET /api/org/runs every finished run on your Kubernetes and Slurm clusters, newest first
GET /api/org/runs/summary the run totals over 24 hours, 7 days, 30 days or all
GET /api/org/capacity/changes every capacity request, limit price and Base Load block change, with who made it and what a request got

Contract: GET /api/org/openapi.json.

Every route takes an org API token. The organization is the token's own and nothing identifies it on the wire. Any of your organization's tokens reads these routes, cluster bound or org wide. The one write is a token revoking itself. Adding or removing a member, adding a rule, minting a token, and revoking another token are console actions. Removing a member revokes every token that member minted and stops that member's workspace. Retiring the organization revokes every token it holds and stops every member's workspace. The revokes appear in the activity trail under the actor system:offboard.

Members and invitations

curl -H "Authorization: Bearer $NC_TOKEN" \
  https://nationalcompute.com/api/org/members

members[] is the roster: username, email, name, is_active (false when the identity provider has suspended the account; true means active, or unknown while the identity provider read is degraded), last_login (RFC 3339, or null), and role. Every member holds the one organization role, admin. When the identity provider read is degraded, email and name read empty and last_login reads null rather than stale.

rules[] are the auto join rules, each {id, kind, value}. A domain rule admits every sign in whose email carries that domain. An email rule invites one address. invited[] lists the email rules no member has consumed yet, the rows the console shows as Invited. An invitation counts as consumed once a member carries the email, or its username form when the identity provider read is degraded. An invitation made from the console also emails that address a sign-in link, the link the sign-in page's mail carries, without the code: it opens a page with one Continue button, is valid for 24 hours and works on any device, and typing the address on the sign-in page sends a fresh link and code at any time. The mail counts against the address's limit of one mail a minute and 20 a day. A member who signs in with a Google account under that address can ignore the link.

Tokens

curl -H "Authorization: Bearer $NC_TOKEN" \
  https://nationalcompute.com/api/org/tokens

tokens[] lists every token, live and inactive, newest first: token_id (the middle segment of national_compute_<id>_<secret>), name, scopes as recorded at mint, cluster (the bound cluster, or null for an org wide token), expires_at, created_by, created_at, last_used_at, and revoked_at (null while live). A secret is shown once, at mint, on the console. It never appears here, and neither does its hash. The organization's kind, standard or public_research, is on GET /api/whoami as org_kind.

Activity

curl -H "Authorization: Bearer $NC_TOKEN" \
  https://nationalcompute.com/api/org/tokens/self/activity

The trail of one token, newest first. self is the calling token; a token_id from the token list reads any token of your organization. An id outside your organization reads 404 not-found, the same as an unknown id.

entries[] are the console audit rows the token wrote as actor. Writes are always recorded: capacity declares and swaps, limit prices, ssh key adds and revokes. The token's own mint and revoke rows are included, with the console user who performed them as actor. Two reads are recorded on every call as well, the VM capacity read and the ssh key list. Those rows stay out of the trail unless you pass reads=1. Other reads are not recorded. last_used_at on the token list says whether a token is in use.

Each entry carries id, ts (RFC 3339 UTC), actor (token:<id> for the token's own calls), action (for example vm_capacity_put, k8s_bid_put, vm_key_add, vm_token_mint, vm_token_revoke; with reads=1 also vm_capacity_get and vm_keys_get), subject (a cluster name, or the organization for key and token rows), and detail (the recorded arguments, free text).

Paging is by entry id. limit is 100 by default and clamps to 500. When more is true, pass the last entry's id as before for the next page. A limit or before that is not an integer, a before that is not positive, or a reads other than 1 or 0 reads 422 bad-request.

The console shows the same trail: the API Keys page has an Activity toggle on every token row, with a show reads switch in the panel. On the MCP server the token list and both trails are grid_api paths; self names no token there.

The organization's trail

curl -H "Authorization: Bearer $NC_TOKEN" \
  https://nationalcompute.com/api/org/activity

Every recorded write in your organization, newest first, human and token side by side. Three kinds of rows arrive: every write any of your tokens made, every row about the organization itself (token mint and revoke, the spend limit, the billing pages, member and rule changes), and your members' console writes on your clusters, tied to each cluster's own island. A limit price or a capacity declaration a member set on the console reads here with the member as actor, so an agent learns whose hand moved a ceiling before it acts on the change. Platform admin actions on your clusters are not included. Platform system rows about the organization are. A console row whose actor ties to no member, or whose cluster is not one of yours on its island, reads absent. Rows of another organization never appear, even from a cluster elsewhere that carries your organization's name or from a person who belongs to both organizations.

Entries carry the same fields as the token trail. Read rows hide unless reads=1. Paging is by entry id: limit is 100 by default and clamps to 500, and when more is true, pass the last entry's id as before. The response is {org_id, entries, more}.

Runs

curl -H "Authorization: Bearer $NC_TOKEN" \
  "https://nationalcompute.com/api/org/runs?since=7d"

Every finished run on your organization's clusters, newest ended first: each Kubernetes cluster's Run History and each Slurm cluster's finished jobs, on one list. The response is {runs, more, next_before, coverage}. While more is true, pass next_before as before for the next page. A bare UTC stamp as before reads the runs that ended strictly before it. Run stamps are UTC to the second without a zone suffix (2026-11-06T14:03:00); a trailing Z is accepted on input.

Parameter Meaning
since 24h, 7d, 30d or all, or a UTC stamp: runs that ended at or after it. A range token keeps a poll on one cached answer
before a previous page's next_before (<ended>~<id>), or a bare UTC stamp
limit runs per page, 50 by default, clamped to 1..100
cluster one cluster by name
who a who id: a member's id (an email address is accepted), token:<id>, platform, unknown or former. A filtered page reads at most 1,000 runs, so it can hold fewer than limit while more is true; keep paging with next_before
outcome comma separated outcome words; cancelled and removed name each other

Each run carries id (k8s-<n> or slurm-<cluster id>-<job id>), cluster, kind (k8s or slurm), name, gpus, submitted, started, ended, ran_s, gpu_hours (GPUs times time running), outcome, end_reason, preemptions, preempted_by, cancelled_by, who and capacity. A Kubernetes run adds workload (Kind/name), ns, init_s (time starting), exit_code, reserved and episodes, its state timeline. A Slurm run adds job_id.

Field Values
outcome Kubernetes: completed, failed, removed. Slurm: completed, failed, cancelled, timeout, node_fail, preempted, oom
end_reason {code, text}, null for a completed run. code is exit_nonzero, oom (exit 137), deadline, deleted, evicted, node_lost, billing_hold, rejected or unknown; text is a fixed sentence, never the scheduler's own message
preemptions requeues after at least 60 seconds of running; a Slurm job ended by preemption counts 1
preempted_by market (a higher bid took the node), reservation (the run's reserved seat was revoked), node (the node was taken or lost), or null when nothing recorded the cause
cancelled_by a who on a removed or cancelled run, null otherwise. A console cancel and an MCP delete are recorded; a kubectl delete and a Slurm cancel read unknown
capacity reserved, mixed, market (Kubernetes market clusters) or dedicated

No price, rate or limit appears on a run. A cluster outside your organization never appears; naming one as cluster reads 404 not-found, the same as an unknown name. A malformed parameter reads 422 bad-request with the field in detail.

Who

who names who started a run and cancelled_by who removed it, both as {kind, id, label}:

kind id label
member the username (the email address with @ read as .) the member's email address
agent the member's username <member> via Marshall or <member> via MCP
token token:<id> API token <name>
platform platform National Compute
unknown unknown Unknown: nothing recorded who
unknown former Former member: a person who has since left the organization

Everything National Compute does reads platform: platform admins and staff, system accounts and automation. A who filter matches the id exactly, so a member's id covers that member's own work and their agent's. Who started a run comes from a record taken during that run itself; a run with no such record reads unknown, never a guess. The filter and the totals attribute every run the same way the run shows it.

Coverage

coverage[] names, per cluster, from when the answer speaks: {cluster, kind, since, reason}.

reason Meaning
window Kubernetes keeps 365 days of runs, Slurm 7 days
first_record the cluster's records begin at since, later than its window
no_record nothing has finished on the cluster yet
unavailable the cluster's runs cannot be read right now; since is null and the cluster adds no runs

Run totals

curl -H "Authorization: Bearer $NC_TOKEN" \
  "https://nationalcompute.com/api/org/runs/summary?range=7d"

The totals behind the Activity page's summary line. range is 24h, 7d (the default), 30d or all; who and cluster filter as on runs. The response is {range, since, until, totals, by_cluster, by_who, coverage}; since is null for all.

totals, and every by_cluster[] entry beside its cluster, kind and since, carry finished, completed, failed, cancelled, preempted_runs, preemptions, gpu_hours, running_now and queued_now. by_who[] is {who, finished, gpu_hours}, an agent's work folded onto its member.

  • finished counts every run that ended in the range. failed includes Slurm's timeout, node_fail and oom. A Slurm job ended by preemption counts in finished and preempted_runs only.
  • preempted_runs counts runs preempted at least once in the range, finished or still running; preemptions counts the requeues.
  • Kubernetes gpu_hours is time on GPUs inside the range: a run that began earlier, or still runs, counts only its time inside it, and services count. A Slurm job's is GPUs times its elapsed time, in the range it ended.
  • running_now and queued_now are live counts: running or starting, and waiting.

There is no cost on this route. Spending lives on the billing API. The run list caches for 30 seconds and the totals for 60.

Capacity changes

curl -H "Authorization: Bearer $NC_TOKEN" \
  "https://nationalcompute.com/api/org/capacity/changes?since=2026-11-01T00:00:00Z"

One row per change to your organization's capacity, newest first, across every cluster you hold or held: the rows the console's Activity page shows in its Changes view. The response is {changes, more, next_before}. Every row carries id, kind, cluster, cluster_uuid, ts (RFC 3339 UTC), who, before and after. History reaches back to the start of each record; nothing ages out. Rows are cached for 30 seconds, so a change can take that long to appear.

cluster is the cluster's name, which is unique on its site only and can be taken again after the cluster is deleted. cluster_uuid is the cluster's uuid, the same for its whole life: key a cluster's rows on it.

kind A row is before / after
vm a VM cluster's requested size changed, with the limit price in force {max_gpus, limit_usd_gpu_hr}; before is null for the first request
limit only the limit price moved: on a VM cluster with the size unchanged, and every limit price change on a Kubernetes cluster {limit_usd_gpu_hr}; after null means the limit price was withdrawn, before null means there was none
reservation a Base Load block changed before {gpus, ends_at}, after {gpus, starts_at, ends_at}

limit_usd_gpu_hr is your own limit price in USD per GPU-hour, the figure you set. No reservation rate, price paid or note appears on any row.

What a request got

A vm row's outcome measures the request over its window: from ts to the next size change on the cluster, or to now while it still applies, or to the cluster's deletion.

Field Meaning
state one of the five states below
granted_gpus GPUs granted when the window closed; live for the request that still applies
peak_gpus the most GPUs granted at once inside the window
first_grant_at the first grant inside the window, or null
full_at when the granted GPUs first reached the request, or null
until when the window closed; null while the request still applies
superseded_by the id of the size change that replaced it, or null
state The request
granted got every GPU it asked for: the granted GPUs reached it
partial still applies, and part of it is granted
waiting still applies, and nothing is granted yet
withdrawn went to 0, or the cluster was deleted short of it
superseded was replaced by a later size change short of it

A node counts as granted from its hand over until its reclaim starts. A lower request is met at once while the nodes it gives back are still held, and granted_gpus can then read above the request until they are released.

Base Load block events

A reservation row adds block_id (the block's id in the Base Load book), event and reason.

event When
bought the block was bought
starts a block bought for a later start began
resized its size changed; the change replaces the block, so block_id names the new block
extended, shortened its end moved
ended its term ran out
cancelled it ended early; reason says why

reason is set on cancelled rows only: tenant, platform, billing_arrears (the balance stayed at or below zero with the block live), abuse (the organization was suspended) or cluster_deleted. A rate change that moves neither the size nor the end emits no row.

Who

who is {kind, id, label}.

kind id label
member the member's username, the email with @ read as . the member's email
token token:<token_id> API token <name>
agent the member's username <member> via MCP: the member's MCP sign in
platform platform National Compute
unknown former Former member
unknown unknown Unknown

Changes made by National Compute's staff and automation (billing holds, the market, cluster cleanup) read as platform. A change made by someone who has since left your organization reads as a former member. Neither carries an address. unknown with id unknown means no record names who made the change: a change from before the record kept it, or one made by a sign in that carried neither an email nor a username. It never reads as platform.

Filters and paging

Parameter Effect
since changes at or after this instant: RFC 3339 with an offset, or epoch seconds
kind vm, limit or reservation, or a comma separated list; all three by default
cluster one cluster by name, or by cluster_uuid; a name can match two clusters on different sites, a uuid matches one
who a who.id: a member's username (an address is accepted and read as its username), token:<token_id>, platform, former or unknown
limit rows per page, 50 by default, clamped to 1 to 100
before the cursor: a previous page's next_before, <ts>~<id>; a bare timestamp reads strictly older rows

When more is true, pass next_before as before for the next page; next_before is null on the last page. A since or before that is not a timestamp, a before cursor whose id is malformed, a limit that is not an integer, or a kind outside the three reads 422 bad-request. On the MCP server the feed is the grid_api path /api/org/capacity/changes, with the same parameters in params.

Rate limit

Every token carries a budget of requests per minute across all routes (300 by default; the vm contract states the figure in force). The call past it reads 429 rate-limited with retry_after_s, and the Retry-After header carries the same figure.

Revoking your own token

curl -X DELETE -H "Authorization: Bearer $NC_TOKEN" \
  https://nationalcompute.com/api/org/tokens/self

The calling token stops working at once. The next call with it reads 401 unauthorized. The response is {ok, token_id, revoked_at}. The audit row carries actor token:<id>, so the trail shows the token closing itself. No token can revoke another token. That stays a console action on the API Keys page.