Skip to Content
Xeonr Developer Docs

Using the API

Services, authentication, scopes, roles and error codes.

Everything the console does is a call to https://burrow.prod.wtf, and the CLI makes the same ones. The API is ConnectRPC, which over plain JSON is an ordinary POST with a JSON body — no client library required.

POST https://burrow.prod.wtf/xeonr.burrow.v1.<Service>/<Method>
Content-Type: application/json
Authorization: Bearer <token>

A generated client is usually nicer than hand-rolling it. The schema is published as proto.prod.wtf/xeonr/burrow.

Authentication

Any of three credentials:

  • an access token from burrow login (the OAuth device flow against auth.xeonr.io);
  • a team API key created in the console, xk_…, sent the same way. It is a Xeonr Auth API key owned by the team: it carries exactly one team and the role it was created with, capped at editor — it cannot create another, and it cannot reach TokenService at all. A burrow_tok_… token minted before October 2026 is the same thing and keeps working unchanged;
  • the console's session cookie, so the console needs no separate surface.

Two more exist for managed names:

  • a delegated token: a person's token exchanged by another Xeonr product acting for them. It reaches only ManagedReservationService, and is refused everywhere else;
  • an agent credential, xk_… owned by one reservation. It opens that reservation's tunnel and reaches no API method at all.

Scopes

A token has to carry the scope the method asks for. burrow login requests all of them, so a CLI session that signed in normally already has whatever its holder can hold.

ScopeGrants
burrow:tunnels:readsee which tunnels are up
burrow:names:readlist reserved names and held leases
burrow:names:editreserve names, release leases
burrow:names:adminrelease anything the team holds
burrow:tokens:admincreate and revoke team API keys
burrow:domains:readlist custom domains
burrow:domains:adminadd, verify and remove custom domains
burrow:traffic:readsearch request history, including captured bodies
burrow:audit:readthe audit feed and the session history
burrow:filters:readlist your saved traffic filters
burrow:filters:editsave and delete your traffic filters
burrow:managed:readfor a product acting for you: read the names it manages
burrow:managed:editfor a product acting for you: create, change and delete the names it manages
burrow:managed:reconcilea managing product's service account only

burrow login and the console do not request the three burrow:managed: scopes. They belong to a product that manages names in your team (see Managed names).

Within one resource, admin implies edit implies read: burrow:names:admin satisfies a method that asks for burrow:names:read.

A team API key carries scopes too — the ones its role maps to. An editor key holds burrow:names:edit, burrow:filters:edit and the read scopes; a viewer key holds the read scopes only. Neither holds burrow:tokens:admin or burrow:domains:admin.

Tokens issued before October 2026 predate these scopes. If a call that used to work now answers permission_denied naming a scope, run burrow login again.

Team scope and roles

The scope is what your credential may do. Your role in the team that owns the resource is the other half, and both have to allow a call.

Every method names a team by URN or slug in team. Omit it and the caller's only team is used; if they are in several, the call is refused and says so.

RoleComes fromMay
viewermembershipread tunnels, names, history, activity
editorthe editor team roleopen tunnels, reserve names, release leases
adminthe admin team role, or team ownershipAPI keys, domains, releasing names others reserved

Methods

MethodRoleScopeAPI key?
DeploymentService/GetDeploymentnone — no credential needed——
MeService/GetMeany—yes
TunnelService/ListTunnelsviewerburrow:tunnels:readyes
TunnelService/GetTunnelviewerburrow:tunnels:readyes
ReservationService/ListReservationsviewerburrow:names:readyes
ReservationService/CreateReservationeditorburrow:names:edityes
ReservationService/UpdateReservationeditorburrow:names:edityes
ReservationService/DeleteReservationadminburrow:names:adminyes
ReservationService/CreateReservationCredentialeditorburrow:tokens:adminno
ReservationService/ListReservationCredentialsviewerburrow:names:readyes
ReservationService/RevokeReservationCredentialeditorburrow:tokens:adminno
LeaseService/ListSlugLeasesviewerburrow:names:readyes
LeaseService/ListPortLeasesviewerburrow:names:readyes
LeaseService/DeleteSlugLeaseeditorburrow:names:edityes
LeaseService/DeletePortLeaseeditorburrow:names:edityes
DomainService/ListDomainsviewerburrow:domains:readyes
DomainService/CreateDomainadminburrow:domains:adminno
DomainService/VerifyDomainadminburrow:domains:adminno
DomainService/DeleteDomainadminburrow:domains:adminno
TokenService/ListTokensadminburrow:tokens:adminno
TokenService/CreateTokenadminburrow:tokens:adminno
TokenService/DeleteTokenadminburrow:tokens:adminno
TrafficService/ListRequestsviewerburrow:traffic:readyes
TrafficService/ListConnectionsviewerburrow:traffic:readyes
TrafficService/GetTransferviewerburrow:traffic:readyes
AuditService/ListAuditEntriesviewerburrow:audit:readyes
SessionService/ListSessionsviewerburrow:audit:readyes
FilterService/ListSavedFiltersviewerburrow:filters:readyes
FilterService/CreateSavedFilterviewerburrow:filters:edityes
FilterService/DeleteSavedFilterviewerburrow:filters:edityes
ManagedReservationService/*see Managed namesburrow:managed:*no

UpdateReservation, CreateDomain and VerifyDomain answer permission_denied for a managed name or its domain. DeleteReservation and DeleteDomain work on them as usual. DeletePortLease answers permission_denied for a port a product pinned to a name it manages (managed_by set on the lease). Deleting the name returns that port. The three ReservationService credential methods refuse a managed name too: its product mints its agent credentials. They mint and revoke an agent credential for a name the team holds itself. Minting takes burrow:tokens:admin rather than burrow:names:edit, so no API key can mint a credential.

DeploymentService.GetDeployment is the one method that needs no credential. It describes the deployment: the tunnel domain, where agents dial, the console's URL, the issuer and the CLI's OAuth client id. It is what the CLI reads before it has a credential. It replaces GET /config.json, which is no longer served; a CLI older than the release that switched answers 404 at burrow login until burrow upgrade.

curl -s -X POST https://burrow.prod.wtf/xeonr.burrow.v1.DeploymentService/GetDeployment \
  -H 'Content-Type: application/json' -d '{}'

Pagination

Every list method is cursor-paged. Send limit (up to 500; 0 means 50) and, for the next page, the next_cursor the previous response returned. An empty next_cursor means that was the last page. The cursor is opaque — do not construct one, and do not expect the same cursor to stay valid across a deployment.

# first page
-d '{"team":"core-infra","limit":100}'
# the next
-d '{"team":"core-infra","limit":100,"cursor":"<next_cursor from the last response>"}'

A malformed cursor is invalid_argument, not a silent restart at the first page: a client that has lost its place is told so.

Lists are newest-first. For most that is by creation time; the two lease lists are ordered by expiry, because a lease has no creation time of its own.

ListTunnels, ListReservations, ListDomains and ListTokens also return total: how many rows there are across every page. cursor and limit do not change it, so a count needs only a limit of 1. ListTokens counts what the request lists, so include_revoked changes the total.

Two things to know:

  • ListReservations returns quota alongside the page, and quota_used, the names counted against it. Both count the whole team, not the page, so they do not change as you walk the cursor. quota_used is total minus the managed names, which do not count. Each Reservation carries managed_by, the managing product, which is empty for the team's own names.
  • ListTunnels pages a snapshot of live state rather than a table. The page is cut from what the gateway's live view held when the request arrived, so a tunnel that connects or drops while you are paging is not guaranteed to appear exactly once across the pages.

Slugs and TCP ports are two methods rather than one returning both: one response cannot carry two independently paged collections under one cursor.

ListAuditEntries returns only changes that happened unless you set include_failures. A mutation that was refused or failed (permission_denied, invalid_argument, resource_exhausted, …) is recorded too, under the same action as the change it tried to make. With include_failures: true the feed includes it, with outcome: AUDIT_OUTCOME_FAILURE and its failure_code. Every other entry has outcome: AUDIT_OUTCOME_SUCCESS. The error message is never returned. Leave the flag unset if your client does not read outcome: otherwise a refused attempt looks like a change.

ListSessions and ListAuditEntries also take time_from and time_to. The window is half-open — [time_from, time_to) — so two adjacent windows cannot both return the same row. Both default to unbounded. For sessions that means the whole 90-day retention window rather than the whole life of the team. For the audit feed it means everything the Xeonr platform audit log still holds for the team, under that log's retention.

The audit feed has been read from the platform audit log since October 2026, and its cursors and entry ids changed shape when it moved:

  • An audit cursor issued before the move answers invalid_argument. Start again from the first page, with time_from set if you want to resume near where you were.
  • AuditEntry.id is now a 26-character ULID, not a UUID. Entries from before the move are still in the feed, but under new ids, so a UUID you stored then matches nothing the feed returns.

Looking up one tunnel

GetTunnel finds a tunnel by name, which is its hostname label. If the tunnel is up, tunnel is its live row. team, team_slug and protocol tell you who owns the name and what it carries.

Unlike the list methods, an omitted team does not mean "my only team". GetTunnel searches every team you are in, so a link that names only the tunnel can be resolved in one call:

-d '{"name":"checkout"}'

If the name is not up but is one of your teams' reserved names, tunnel is absent and team and protocol come from the reservation. reserved says whether the name is reserved. This fallback, and reserved, need burrow:names:read as well. A credential with only burrow:tunnels:read sees only names that are up.

If the name is neither up nor reserved in any team searched, the call fails with not_found. That covers an ephemeral slug that has gone down: its history is in ListRequests and ListConnections. Another team's tunnel is also not_found, not permission_denied.

Reservation settings

UpdateReservation takes a update_mask and writes only the fields it names. A request whose mask is empty is invalid_argument rather than a no-op that looks like it worked, and a mask naming a field this server cannot write is refused rather than ignored — so a client cannot believe it set something it did not.

Today the only writable field is retention_days:

{
  "team": "urn:xeonr:auth:team:…",
  "reservation": "checkout",
  "update_mask": { "paths": ["retention_days"] },
  "retention_days": 90
}

retention_days is how long captured traffic for that name is kept. Zero means the deployment default. A value above the deployment maximum is clamped, not refused — the response carries what was actually set, so compare it with what you sent rather than assuming. reservation accepts the id or the name, as DeleteReservation does.

Shortening retention is not reversible: records already past the new window are deleted shortly after, on the store's next merge.

Saved filters

A saved filter is a TrafficService query kept under a name. It is private to the person who saved it within one team — nobody else's are visible, and another member's id answers not_found rather than forbidden. The owner comes from the credential, so there is nothing to send.

CreateSavedFilter takes the same filter object ListRequests takes, so a saved filter can be handed straight back:

curl -sS https://burrow.prod.wtf/xeonr.burrow.v1.FilterService/CreateSavedFilter \
  -H "Authorization: Bearer $BURROW_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"team":"core-infra","name":"5xx on checkout","filter":{"tunnel":"checkout","status":"5xx"}}'

Saving over a name you already used replaces that filter rather than failing, and keeps its id and its position in the list — adjusting one clause does not move it to the top.

Errors

A refusal is a Connect error: an HTTP status and a body carrying a code.

{ "code": "permission_denied", "message": "you do not have admin access in this team" }
CodeMeans
unauthenticatedno credential, or it has expired — sign in again
permission_deniedauthenticated, but not at the role or scope this needs
invalid_argumentthe request failed validation, or a cursor was malformed
not_foundno such object in this team
already_existsthat hostname is already reserved
failed_preconditionthe state forbids it — a domain whose TXT record is not live yet
resource_exhaustedthe team's reserved-name limit, or the TCP pool, is full
unavailablesomething this deployment needs is not configured or is down

Messages are written to be shown to the person who hit them. Match on code, print message.

Example

curl -sS https://burrow.prod.wtf/xeonr.burrow.v1.TrafficService/ListRequests \
  -H "Authorization: Bearer $BURROW_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
        "team": "core-infra",
        "limit": 20,
        "filter": { "status": "5xx", "timeFrom": "2026-10-01T00:00:00Z" }
      }'

On this page