Skip to Content
CosmicAC Logo
API referenceApp node API

App node API reference

Routes of the app node API, with the base URL, authentication, team selection, and permissions that apply to them.

The app node API is the HTTP API that cosmicac-app-node serves. The web interface and the CLI use it to manage accounts, teams, API keys, jobs, storage volumes, and the other resources of a CosmicAC deployment. This page describes the base URL, authentication, team selection, and permissions of the API, and lists its routes. Each route page lists the route's parameters, request body, permissions, and example requests.

Base URL

Every path in this reference is relative to your app node URL, which is the APP_NODE_URL value that cosmicac config show prints. The deployment serves the API under the /api path of its base URL, so the app node URL has the form <base-url>/api. The example requests on the route pages use https://your-app-node-url in its place.

Authentication

CosmicAC reads the session token from the ttr-token header. Signing in issues the token.

ttr-token: <session-token>

CosmicAC binds a token to the IP address that requested it, and rejects the token from any other host. A request without the header, or with a token that doesn't resolve, fails with a 401 status code.

The following routes don't require a session token.

  • GET /v1/health
  • POST /login
  • POST /pwd/forgot, POST /pwd/reset, and POST /pwd/reset/verify, which reset a forgotten password
  • The Google and CLI sign-in routes under /oauth

POST /v1/invites/accept accepts a request with or without a session token. If the request includes a token, CosmicAC validates it.

Team selection

A route that acts on a team reads the team from one of two places. Each route page says which.

  • Path parameter: the route acts on the team in the id path parameter, as in /v1/teams/<id>/members.
  • X-Team-Id header: the route acts on the team that the header names. If your account belongs to more than one team, you must send the header, and a request without it fails with a 400 status code. If your account belongs to one team, the route uses that team.

Permissions

Each route page lists what the route requires beyond a session token. The following table explains each requirement, worded as the route pages state it.

RequirementMeaning
Requires platform admin.The caller's account is a platform administrator.
Requires team capabilityThe caller's role in the selected team grants the named capability, such as jobs.read.
Requires global permissionA deployment-wide role of the caller's account grants the named permission, such as users.activate.
Requires permissionA deployment-wide role of the caller's account grants the named permission, such as users:rw.

If the caller doesn't meet a team capability or permission requirement, the request fails with a 403 status code. For the actions that each role can take, see Teams and roles.

Route pages

Endpoints

MethodPathRoute page
GET/oauth/google/callbackAuthentication routes
POST/oauth/exchangeAuthentication routes
GET/oauth/cli/authorizeAuthentication routes
GET/oauth/cli/session/<session-id>Authentication routes
POST/oauth/cli/exchangeAuthentication routes
POST/loginAuthentication routes
POST/pwd/forgotAuthentication routes
POST/pwd/resetAuthentication routes
POST/pwd/reset/verifyAuthentication routes
GET/auth/userinfoAuthentication routes
PATCH/auth/userinfoAuthentication routes
POST/auth/change-passwordAuthentication routes
POST/auth/logoutAuthentication routes
POST/auth/logout/allAuthentication routes
POST/auth/tokenAuthentication routes
POST/auth/team-authAuthentication routes
GET/v1/teamsTeam routes
POST/v1/teamsTeam routes
GET/v1/teams/<id>Team routes
PATCH/v1/teams/<id>Team routes
GET/v1/teams/<id>/permissionsTeam routes
POST/v1/teams/<id>/archiveTeam routes
POST/v1/teams/<id>/unarchiveTeam routes
GET/v1/teams/<id>/membersUser routes
POST/v1/teams/<id>/membersUser routes
DELETE/v1/teams/<id>/members/<user-id>User routes
PATCH/v1/teams/<id>/members/<user-id>User routes
POST/v1/admin/users/deactivateUser routes
POST/v1/admin/users/activateUser routes
POST/v1/teams/<id>/invitesInvitation routes
DELETE/v1/teams/<id>/invites/<invite-id>Invitation routes
POST/v1/invites/acceptInvitation routes
GET/v1/api-keysAPI key routes
POST/v1/api-keysAPI key routes
GET/v1/api-keys/usageAPI key routes
GET/v1/api-keys/<id>API key routes
DELETE/v1/api-keys/<id>API key routes
PATCH/v1/api-keys/<id>API key routes
POST/v1/admin/api-keys/backfill-teamAPI key routes
POST/auth/jobs/actionJob routes
GET/v1/auth/jobsJob routes
POST/v1/auth/jobsJob routes
GET/auth/job/<id>Job routes
POST/auth/job/<id>Job routes
DELETE/auth/job/<id>Job routes
PATCH/auth/job/<id>Job routes
POST/auth/job/<id>/replica/<replica-id>Job routes
DELETE/auth/job/<id>/replica/<replica-id>Job routes
GET/auth/job/<id>/status-flowJob routes
POST/v1/auth/jobs/validateJob routes
GET/v1/auth/endpoints/availabilityJob routes
POST/v1/admin/jobs/backfill-teamJob routes
GET/v1/model-mastersRecommended model configuration routes
POST/v1/model-mastersRecommended model configuration routes
GET/v1/model-masters/previewRecommended model configuration routes
GET/v1/model-masters/optionsRecommended model configuration routes
GET/v1/model-masters/<id>Recommended model configuration routes
DELETE/v1/model-masters/<id>Recommended model configuration routes
PATCH/v1/model-masters/<id>Recommended model configuration routes
GET/v1/teams/<id>/storage-volumesStorage volume routes
POST/v1/teams/<id>/storage-volumesStorage volume routes
GET/v1/teams/<id>/storage-volumes/racksStorage volume routes
GET/v1/teams/<id>/storage-volumes/<volume-id>Storage volume routes
DELETE/v1/teams/<id>/storage-volumes/<volume-id>Storage volume routes
PATCH/v1/teams/<id>/storage-volumes/<volume-id>Storage volume routes
POST/v1/teams/<id>/storage-volumes/<volume-id>/resizeStorage volume routes
GET/v1/admin/storage-quotasStorage quota routes
PUT/v1/admin/storage-quotas/<team-id>Storage quota routes
GET/v1/admin/nodesNode reservation routes
GET/v1/admin/node-reservationsNode reservation routes
GET/v1/node-statsNode reservation routes
PUT/v1/admin/node-reservations/<team-id>Node reservation routes
GET/v1/teams/<id>/capacityNode reservation routes
GET/auth/list-thingsResource routes
GET/auth/list-racksResource routes
GET/auth/tail-logResource routes
GET/auth/serversResource routes
GET/auth/user/notification-channelNotification routes
POST/auth/user/notification-channelNotification routes
GET/auth/user/notificationNotification routes
POST/auth/user/notification/<notification-id>/dismissNotification routes
POST/auth/user/notification/dismiss-allNotification routes
GET/auth/user/vapid-keyNotification routes
POST/auth/user/push-notification-testNotification routes
GET/auth/user/activitiesNotification routes
GET/auth/settings/webhookWebhook routes
POST/auth/settings/webhookWebhook routes
DELETE/auth/settings/webhookWebhook routes
PATCH/auth/settings/webhookWebhook routes
POST/auth/settings/webhook/testWebhook routes
POST/auth/settings/webhook/regenerate-secretWebhook routes
GET/auth/settings/webhook/deliveriesWebhook routes
GET/v1/observability-settingsObservability routes
PUT/v1/observability-settingsObservability routes
DELETE/v1/observability-settingsObservability routes
GET/v1/instance-settingsInstance setting routes
POST/v1/instance-settingsInstance setting routes
GET/v1/instance-settings/<key>Instance setting routes
PUT/v1/instance-settings/<key>Instance setting routes
GET/v1/dashboardDashboard routes
GET/v1/control-plane/healthDashboard routes
GET/v1/feedbackFeedback routes
POST/v1/feedbackFeedback routes
GET/v1/feedback/<id>Feedback routes
POST/v1/feedback/<id>/retry-webhookFeedback routes
GET/v1/diagnostic-bundle/<id>Feedback routes
GET/v1/healthHealth routes

What's next

On this page