Skip to content

REST API

1 min read

The gateway serves its API under /api/. The full description, with request and response schemas, is an OpenAPI 3.1 document:

  • On a running install: https://<javo address>/api/openapi.json, without sign-in.
  • With config.api.docs.enabled, an interactive Swagger UI at /api/docs/ (its files ship in the image; nothing loads from a CDN).
  • The same document as built from this version of the code: openapi.json. javo openapi prints it too, with no cluster needed.
Scheme How
Personal API token Authorization: Bearer <token>. A read token may only read; tokens cannot manage tokens. See API tokens.
Browser session The javo_session cookie set at sign-in, used by the web UI.

admin

MethodPathWhat it does
POST/api/admin/ai/askPlatform admins: ask about the report; the answer cites its rows and changes nothing
GET/api/admin/appsEvery person's apps, newest first (platform admins)
GET/api/admin/backupsThe database backups and their health (platform admins)
POST/api/admin/backupsBack up the database now (platform admins)
POST/api/admin/backups/nowRun the backup job now (platform admins)
POST/api/admin/backups/restoreRun the restore job now: a full backup, for everyone or one person (platform admins)
POST/api/admin/backups/restoresRestore a full backup, for everyone or one person, as part of a run of the restore job (its run calls this)
GET/api/admin/backups/restores/{run}Where a restore stands, home by home
POST/api/admin/backups/runsStart a full backup as part of a run of the backup job (its run calls this)
GET/api/admin/backups/runs/{run}Where a full backup stands, step by step
POST/api/admin/backups/{name}/previewWhat restoring apps from a database backup would do; nothing is changed (platform admins)
POST/api/admin/backups/{name}/restoreBring back apps from a database backup; they wait for a release (platform admins)
GET/api/admin/reportPlatform admins: failures by cause, apps by state and template, idle apps
GET/api/admin/restoresRestores whose apps wait to be released (platform admins)
POST/api/admin/restores/{name}/releaseLet a restore's held apps go (platform admins)
GET/api/admin/usageHow long apps ran in the last days, per person or group (platform admins)

ai

MethodPathWhat it does
POST/api/ai/commandAsk in plain words for changes to your apps; each comes back as a plan to approve
POST/api/ai/draftFill the new app form from a description; nothing is created
POST/api/ai/feedbackSay whether an AI answer was right (logged, nothing else)
GET/api/ai/statusWhich AI features are on
POST/api/workspaces/{name}/diagnosis/explainAsk the model to explain a failure; its evidence is checked against what was sent

auth

MethodPathWhat it does
POST/api/auth/local/loginSign in with a local account
POST/api/auth/logoutSign out and end the session
GET/api/auth/optionsThe ways to sign in
GET/api/infoWhich optional parts of the server are on
GET/api/meThe signed-in user
GET/api/reasonsThe words for one catalog reason

branding

MethodPathWhat it does
GET/api/brandingThe install's product name, logo, favicon and accent

environments

MethodPathWhat it does
GET/api/environmentsList the environments you can run an app or a job in

files

MethodPathWhat it does
GET/api/filesList a folder of the user's home
GET/api/files/rawDownload or show one file of the user's home
POST/api/files/warmGet the user's home folder ready to list

jobs

MethodPathWhat it does
GET/api/enginesThe ways a file can be run as a job
POST/api/job-samples/{template}Make a template's sample job (run on demand)
GET/api/jobsThe user's jobs
POST/api/jobsCreate a job
GET/api/jobs/{name}One of the user's jobs with its runs
PUT/api/jobs/{name}Change a job
DELETE/api/jobs/{name}Delete a job (its run folders are kept)
PUT/api/jobs/{name}/envSet a job's environment variables: plain values and values from your secrets (from the next run on)
POST/api/jobs/{name}/pausePause a job's schedule
POST/api/jobs/{name}/resumeResume a job's schedule
POST/api/jobs/{name}/runRun a job now
POST/api/jobs/{name}/runs/{run}/cancelCancel a run that is still going
GET/api/jobs/{name}/runs/{run}/logA run's log as plain text, followed live while the run is going
PUT/api/jobs/{name}/sizeChange the size or custom amount a job's runs get (from the next run on)
POST/api/schedule/previewUpcoming run times of a schedule, as the cluster will run them

plans

MethodPathWhat it does
POST/api/plansPropose a change for review; nothing changes until it is approved
GET/api/plans/{id}A proposed change and its state
POST/api/plans/{id}/approveApprove and make a proposed change (browser session only)
POST/api/plans/{id}/rejectTurn down a proposed change (browser session only)

secrets

MethodPathWhat it does
GET/api/secretsYour secrets: names, notes, dates and the apps and jobs that use them, never the values
POST/api/secretsStore a secret
PUT/api/secrets/{name}Replace a secret's value or change its note
DELETE/api/secrets/{name}Delete a secret no app or job uses

sharing

MethodPathWhat it does
GET/api/directoryPeople and the caller's own groups matching a search
GET/api/sharedApps other people shared with the user
GET/api/workspaces/{name}/sharingWho can open one of the user's apps
PUT/api/workspaces/{name}/sharingChange who can open one of the user's apps

storage

MethodPathWhat it does
GET/api/admin/storageStorage capability report
GET/api/storageWhat the caller's files are on
GET/api/storage/placementWhere a new app would run

templates

MethodPathWhat it does
GET/api/templatesTemplates the user may create apps from
PUT/api/templates/{name}Create or replace a template (template admins)
DELETE/api/templates/{name}Delete a template (template admins)

tokens

MethodPathWhat it does
GET/api/tokensYour personal API tokens
POST/api/tokensCreate a personal API token
DELETE/api/tokens/{id}Revoke a personal API token

workspaces

MethodPathWhat it does
GET/api/idle-stopThe allowed "Stop when idle" timeouts and the default for new apps
GET/api/previewsWhether new apps can have pull request previews, and their limits
POST/api/previews/webhookMake a webhook address and secret for an app not yet created (shown once)
POST/api/samples/{template}Start a template's sample app
GET/api/sizesSizes the caller can run an app at, and their custom amount allowance
GET/api/workspacesThe user's apps
POST/api/workspacesCreate an app
GET/api/workspaces/exportThe user's apps as a YAML file to keep or import elsewhere
POST/api/workspaces/importImport a YAML file of apps; they arrive stopped and private
POST/api/workspaces/import/previewWhat importing a YAML file of apps would do; nothing is changed
GET/api/workspaces/{name}One of the user's apps
DELETE/api/workspaces/{name}Delete an app (the home folder is kept)
PUT/api/workspaces/{name}/api-accessChange whether an app can call the API as you (a running app restarts)
GET/api/workspaces/{name}/diagnosisWhy an app failed: the cause the rules found, its evidence and the changes that may fix it
PUT/api/workspaces/{name}/envSet an app's environment variables: plain values and values from your secrets (a running app restarts)
GET/api/workspaces/{name}/eventsKubernetes events of an app's pod and home folder (with the Job that readies it), oldest first; the home step's warnings come before its other events
PUT/api/workspaces/{name}/idle-stopChange when an app stops for being idle (a running app keeps running)
PUT/api/workspaces/{name}/launchChange an app's command, and for an image app its image and port (a running app restarts)
GET/api/workspaces/{name}/logsThe latest lines the app wrote
GET/api/workspaces/{name}/logs/streamFollow the app's log live (server-sent events, one line event per log line)
GET/api/workspaces/{name}/previewsThe app's preview settings and what the last look at its pull requests found
PUT/api/workspaces/{name}/previewsTurn pull request previews on or off and set how many (GitHub repositories only)
POST/api/workspaces/{name}/previews/webhookMake the webhook address and secret that start a preview sync at once (shown once; replaces any earlier pair)
POST/api/workspaces/{name}/redeployPull the newest commit (or home file) and restart the app
POST/api/workspaces/{name}/restartRestart an app (its pod is replaced; a stopped app stays stopped)
PUT/api/workspaces/{name}/sizeChange an app's size or custom amount (a running app restarts)
PUT/api/workspaces/{name}/source/tokenTake the access token of the app's private repository from one of your secrets (the app restarts)
DELETE/api/workspaces/{name}/source/tokenClone the app's repository without an access token (the app restarts)
POST/api/workspaces/{name}/startStart an app
GET/api/workspaces/{name}/steps/{step}/logFollow the log of the containers doing a startup step's work, one after another, as they write it (newline-delimited JSON records; ends once every one of them has finished)
POST/api/workspaces/{name}/stopStop an app
GET/api/workspaces/{name}/thumbnailThe app's picture, for anyone who may open the app
PUT/api/workspaces/{name}/thumbnailSet the picture shown on the app's card (owner or platform admin)
DELETE/api/workspaces/{name}/thumbnailRemove the app's picture; its card shows the app kind's logo again