Control Plane API
The control plane serves two APIs. The Control API is for people, the CLI, the console and CI. The fleet coordinator API is for fleet agents only. Both are defined as protobuf in api/proto/robotelos/, and the Control API is also served as REST under /api/v1/.
| API | Defined in | Served by role | Caller |
|---|---|---|---|
Control API: Accounts, Agents, Deployments, Promotions, Fleets | controlplane/v1/accounts.proto, platform.proto | accounts | Users, CLI, console, CI |
Fleet coordinator: FleetSync, FleetWatch, FleetObserve | fleet/v1/fleet.proto | fleets | Fleet agents |
Roles are chosen with ROBOTELOS_CONTROLPLANE_ROLES (comma separated). Exit code 2 means the configuration is wrong.
For diagnosis, ROBOTELOS_CONTROLPLANE_DIAG_ADDR (for example 127.0.0.1:6060) serves the Go profiler on that address; the fleet agent has ROBOTELOS_FLEET_DIAG_ADDR. Both are off when empty and accept a loopback address only, because a profile holds memory and stacks.
Authentication and authorization
- Control API: a signed-in user (OIDC; the CLI uses the device grant, the browser uses a session cookie) or an access token. Every account resource is named under an account, and the caller’s role in that account decides what they may do.
ROBOTELOS_API_OIDC_AUDIENCEsets the expected token audience; the gRPC address and TLS files areROBOTELOS_API_GRPC_ADDR,ROBOTELOS_API_GRPC_TLS_CERT_FILEandROBOTELOS_API_GRPC_TLS_KEY_FILE. - Fleets service: platform administrators only (
ROBOTELOS_PLATFORM_ADMINS). It is not scoped to an account. - Fleet coordinator: the fleet’s enrollment credential, plus optional mutual TLS with the certificate bound to the fleet (see Transports).
Conventions
- Optimistic concurrency.
UpdateAgentDrafttakes therevisionyou read, and deployments and promotions take anexpected_generation. A change made meanwhile is refused withAborted; read again and retry. - Immutable versions. A version freezes the draft and compiles a release with a content digest (
sha256:and 64 hex digits). Creating a version while the draft is unchanged returns the existing one. - Honest phases. A deployment reports
Accepted,Progressing,Distributed,Applied,ReadyorDegraded. Delivery is not application, and application is not readiness. - Production by promotion.
DeployAgentReleasetargetsdevandstgonly.prodis reached through a promotion. - Lists use
page_tokenandnext_page_token.
Accounts
| RPC | REST | Purpose |
|---|---|---|
GetCurrentUser | GET /api/v1/users/me | The signed-in user and active account |
SetActiveAccount | POST /api/v1/users/me/active-account | Select the active account |
ListAccounts | GET /api/v1/accounts | Accounts you belong to |
CreateAccount | POST /api/v1/accounts | Create an account |
GetAccountMembers | GET /api/v1/accounts/{account_id}/members | Members and pending invitations |
CreateAccountInvitation | POST /api/v1/accounts/{account_id}/invitations | Invite by email with a role |
RevokeAccountInvitation | DELETE /api/v1/accounts/{account_id}/invitations/{invitation_id} | Withdraw an invitation |
GetInvitation | GET /api/v1/invitations/{token} | Look up an invitation |
AcceptInvitation | POST /api/v1/invitations/{token}/accept | Join the account |
IssueConversationToken | POST /api/v1/accounts/{account_id}/conversation-token | A short-lived credential for the conversation gateway |
Agents
An agent has a freely editable draft and immutable versions.
| RPC | REST |
|---|---|
CreateAgent | POST /api/v1/accounts/{account_id}/agents |
GetAgent | GET .../agents/{agent_id} |
ListAgents | GET .../agents |
GetAgentDraft | GET .../agents/{agent_id}/draft |
UpdateAgentDraft | PUT .../agents/{agent_id}/draft |
CreateAgentRelease | POST .../agents/{agent_id}/releases |
ListAgentReleases | GET .../agents/{agent_id}/releases |
GetAgentRelease | GET .../agents/{agent_id}/releases/{version} |
(... is /api/v1/accounts/{account_id}.)
Deployments
| RPC | REST | Purpose |
|---|---|---|
ListEnvironments | GET .../environments | The environments and whether they are enabled |
SetEnvironmentEnabled | PATCH .../environments/{environment} | Turn the optional stg on or off |
DeployAgentRelease | POST .../agents/{agent_id}/environments/{environment}/deployments | Assign a release to dev or stg |
RollbackDeployment | POST .../agents/{agent_id}/environments/{environment}:rollback | Return to the previous version |
RevokeDeployment | POST .../agents/{agent_id}/environments/{environment}:revoke | Stop serving the agent there |
GetDeploymentStatus | GET .../agents/{agent_id}/environments/{environment}/status | Desired state, phase and per-fleet observation |
ListDeployments | GET .../agents/{agent_id}/environments/{environment}/deployments | History |
RecordEvaluation | POST .../agents/{agent_id}/evaluations | Evidence a promotion gate can require |
A deployment has a kind (deploy, promotion, rollback, revoke), a status (applying, completed, failed, cancelled) and a generation. It is completed only when the fleets observed it Ready.
Promotions
A promotion moves a release that runs in one environment to the next, with gates and approval.
| RPC | REST |
|---|---|
RequestPromotion | POST .../promotions |
GetPromotion | GET .../promotions/{promotion_id} |
ListPromotions | GET .../agents/{agent_id}/promotions |
ApprovePromotion | POST .../promotions/{promotion_id}:approve |
RejectPromotion | POST .../promotions/{promotion_id}:reject |
CancelPromotion | POST .../promotions/{promotion_id}:cancel |
States: requested, awaiting_approval, approved, applying, succeeded, failed, rejected, cancelled. Approved is not succeeded: a promotion succeeds when the fleets observe the release Ready.
Fleets (platform administrators)
| RPC | REST | Purpose |
|---|---|---|
CreateFleet | POST /api/v1/fleets | Create a fleet of class nonprod (dev, stg) or prod. The enrollment credential is returned once and never stored. |
ListFleets | GET /api/v1/fleets | Every fleet with its observation: connected (last seen under 30 seconds ago; derived, there is no disconnect event), first_seen_time, last_seen_time, agent_version, releases_by_phase, pools, pools_ready, ready_replicas |
ListAccountFleets | GET /api/v1/accounts/{account_id}/fleets | The fleets granted to the account, with the same observation; releases are the account’s own. Needs deployments.read, no platform role |
RotateFleetCredential | POST /api/v1/fleets/{fleet_id}:rotate-credential | New credential |
GrantFleetAccount / RevokeFleetAccount | PUT / DELETE /api/v1/fleets/{fleet_id}/accounts/{account_id} | Which accounts a fleet serves |
PutRuntimePool | PUT /api/v1/fleets/{fleet_id}/runtime-pools/{name} | Declare a shared runtime pool |
GetRuntimePool, ListRuntimePools | GET .../runtime-pools[/{name}] | Read pools and their observed state |
DeleteRuntimePool | DELETE .../runtime-pools/{name} | Mark the pool DELETING |
Fleet coordinator API (fleet agents)
| Service | RPC | Purpose |
|---|---|---|
FleetSync | WaitRevision | Long poll until the fleet’s revision passes the one given |
GetSnapshot | The fleet’s desired state: releases, pools, accounts | |
ReportStatus, ReportPools | Applied generation and pool readiness (unary) | |
FleetWatch | Watch (server stream) | Bookmarks when the revision changes |
FleetObserve | Observe (bidirectional stream) | Hello with epoch, state of the world, then upserts, deletes and heartbeats |
The same operations are carried over HTTP/1.1 as JSON (/v1/fleet/revision:wait, /v1/fleet/snapshot, /v1/fleet/status, /v1/fleet/pools, and /v1/fleet/watch as a stream of JSON lines); Observe is gRPC’s alone. See Watch and Observe and Transports.
Next steps
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.