API reference

The 59 operations an API key can call, grouped by resource. Send the key as Authorization: Bearer pvk_… to https://api.passivedev.com. A key needs every scope an operation lists; see API keys and API key scopes. Errors are described in API errors. The same document is served at api.passivedev.com/openapi.json.

Apps

GET/apps

List Apps

List deployed apps visible to the authenticated user.

Scopesapps:read

Responses

  • 200Successful Response
POST/apps

Deploy App

Deploy a hosted app to available workers.

Scopesapps:write

Request body application/json · DeployRequest

NameTypeRequired
app_namestringyes
envobjectno
imagestringyes
portintegeryes
proxy_timeout_sinteger | nullno
with_databasebooleanno

Responses

  • 202Successful Response
  • 422Validation Error
POST/apps/deploy-git

Deploy From Git

Deploy an app from a GitHub repo with auto-detected (or overridden) build settings.

Scopesapps:write

Request body application/json · GitDeployRequest

NameTypeRequired
app_namestringyes
branchstringno
build_cmdstring | nullno
enable_pr_previewsbooleanno
envobjectno
frameworkstring | nullno
install_cmdstring | nullno
output_dirstring | nullno
portinteger | nullno
proxy_timeout_sinteger | nullno
repo_full_namestringyes
root_directorystringno
with_databasebooleanno

Responses

  • 201Successful Response
  • 422Validation Error
GET/apps/detect

Detect App Framework

Detect the framework for a GitHub repo without deploying.

Scopesapps:read

Parameters

NameInTypeRequired
repo_full_namequerystringyes
branchquerystringno
root_directoryquerystringno

Responses

  • 200Successful Response
  • 422Validation Error
POST/apps/upload

Deploy Static App

Deploy a static site from a zip upload.

Scopesapps:write

Request body multipart/form-data · Body_deploy_static_app_apps_upload_post

NameTypeRequired
app_namestringyes
envstringno
filestringyes
proxy_timeout_sinteger | nullno
with_databasebooleanno

Responses

  • 201Successful Response
  • 422Validation Error
GET/apps/{app_name}

Get App

Get details for a single deployed app (owner or legacy only).

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
DELETE/apps/{app_name}

Undeploy App

Stop and remove a deployed app (owner or legacy only).

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 204Successful Response
  • 422Validation Error
PUT/apps/{app_name}/branch

Change Branch Endpoint

Switch branch; ``Prefer: respond-async`` answers before the build.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Request body application/json · ChangeBranchRequest

NameTypeRequired
branchstringyes

Responses

  • 202Successful Response
  • 422Validation Error
POST/apps/{app_name}/database

Attach Database

Inject a database's DATABASE_URL into an app's env and redeploy.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Request body application/json · AttachDatabaseRequest

NameTypeRequired
database_idstringyes

Responses

  • 202Successful Response
  • 422Validation Error
DELETE/apps/{app_name}/database

Detach Database

Remove DATABASE_URL from an app's env and redeploy. The database survives.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 202Successful Response
  • 422Validation Error
POST/apps/{app_name}/deploy-latest

Deploy Latest Endpoint

Deploy the branch head; ``Prefer: respond-async`` answers before the build.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 202Successful Response
  • 422Validation Error
GET/apps/{app_name}/deployments

List Deployment History

Return recent deployments — what shipped, what triggered it, how it went.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/apps/{app_name}/deployments/drift

Deployment Drift

How far the running commit is behind its branch head.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/apps/{app_name}/deployments/{deployment_id}/build-log

Get Deployment Build Log

The build output of one deployment, kept after later deploys replace the live log.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes
deployment_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/apps/{app_name}/domains

List Domains

List an app's custom domains plus the DNS setup targets.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
POST/apps/{app_name}/domains

Add Domain

Register a custom domain for an app (starts pending; verified if DNS already points at us and shows the domain is the caller's).

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Request body application/json · DomainRequest

NameTypeRequired
domainstringyes

Responses

  • 201Successful Response
  • 422Validation Error
DELETE/apps/{app_name}/domains/{domain}

Remove Domain

Remove a custom domain from an app.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes
domainpathstringyes

Responses

  • 204Successful Response
  • 422Validation Error
POST/apps/{app_name}/domains/{domain}/verify

Verify Domain

Re-run the DNS check for a domain. Flips status both ways — a verified domain whose DNS moved away goes back to pending.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes
domainpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/apps/{app_name}/env

Get App Env

Return env values in the clear, for someone who explicitly asked.

Scopesapps:secrets

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
PUT/apps/{app_name}/env

Update App Env

Replace an app's environment map and redeploy so the change takes effect.

Scopesapps:secretsapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Request body application/json · UpdateEnvRequest

NameTypeRequired
envobjectno

Responses

  • 202Successful Response
  • 422Validation Error
GET/apps/{app_name}/events

List App Events

The app's timeline, newest first: every placement and status write.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes
beforequerystringno
limitqueryintegerno

Responses

  • 200Successful Response
  • 422Validation Error
GET/apps/{app_name}/logs

Tail Logs

Recent log lines over plain HTTP, for callers that cannot hold a WebSocket.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes
linesqueryintegerno
follow_secondsquerynumberno

Responses

  • 200Successful Response
  • 422Validation Error
POST/apps/{app_name}/logs/token

Mint Logs Token

Mint a short-lived token for the app's log-stream WebSocket.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/apps/{app_name}/metrics

Get App Metrics

Return per-deployment request metrics.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes
hoursqueryintegerno

Responses

  • 200Successful Response
  • 422Validation Error
POST/apps/{app_name}/redeploy

Redeploy App Endpoint

Re-run the app's current artifact; ``Prefer: respond-async`` answers before the build.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 202Successful Response
  • 422Validation Error
GET/apps/{app_name}/requests

List Requests

The app's recent requests, newest first.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes
limitqueryintegerno
status_classqueryinteger | nullno
methodquerystring | nullno
containsquerystring | nullno
beforequerystring | nullno

Responses

  • 200Successful Response
  • 422Validation Error
POST/apps/{app_name}/rollback

Rollback App

Re-deploy from a previous successful deployment snapshot (no rebuild).

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Request body application/json · RollbackRequest

NameTypeRequired
deployment_idstringyes

Responses

  • 202Successful Response
  • 422Validation Error
GET/apps/{app_name}/traffic

Get Traffic

Current blue/green state plus each variant's A/B results.

Scopesapps:read

Parameters

NameInTypeRequired
app_namepathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
PUT/apps/{app_name}/traffic

Set Traffic

Set the A/B weights across the app's variants.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Request body application/json · TrafficSplitRequest

NameTypeRequired
stickybooleanno
weightsobjectyes

Responses

  • 200Successful Response
  • 422Validation Error
POST/apps/{app_name}/traffic/promote

Promote Variant

Send 100% of traffic to *color*. The loser stays warm for a while so the promotion can be undone by promoting the other color straight back.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes
colorquerystringyes

Responses

  • 202Successful Response
  • 422Validation Error
POST/apps/{app_name}/variants

Create Variant

Boot a second version of the app into its idle slot at 0% traffic.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes

Request body application/json · CreateVariantRequest

NameTypeRequired
branchstringno
deployment_idstringno
labelstringno

Responses

  • 202Successful Response
  • 422Validation Error
DELETE/apps/{app_name}/variants/{color}

Delete Variant

Abort an experiment: all traffic back to the active variant, candidate torn down.

Scopesapps:write

Parameters

NameInTypeRequired
app_namepathstringyes
colorpathstringyes

Responses

  • 202Successful Response
  • 422Validation Error

Crons

GET/crons

List Cron Jobs

Scopescrons:write

Responses

  • 200Successful Response
POST/crons

Create Cron Job

Scopescrons:write

Request body application/json · CreateCronRequest

NameTypeRequired
commandstringyes
enabledbooleanno
job_type"shell" | "python"no
namestringyes
schedule"every_5_minutes" | "hourly" | "daily" | "weekly"yes

Responses

  • 201Successful Response
  • 422Validation Error
PATCH/crons/{cron_id}

Update Cron Job

Scopescrons:write

Parameters

NameInTypeRequired
cron_idpathstringyes

Request body application/json · CronUpdate

NameTypeRequired
commandstring | nullno
enabledboolean | nullno
namestring | nullno
schedule"every_5_minutes" | "hourly" | "daily" | "weekly" | nullno

Responses

  • 200Successful Response
  • 422Validation Error
DELETE/crons/{cron_id}

Delete Cron Job

Scopescrons:write

Parameters

NameInTypeRequired
cron_idpathstringyes

Responses

  • 204Successful Response
  • 422Validation Error

Databases

GET/databases

List Databases

This org's databases, each with ``stats``: size, connections, limit, as of when.

Scopesdb:read

Responses

  • 200Successful Response
POST/databases

Create Database

Provision a database and return its connection string, once.

Scopesdb:write

Request body application/json · CreateDatabaseRequest

NameTypeRequired
namestringyes

Responses

  • 201Successful Response
  • 422Validation Error
GET/databases/{database_id}

Get Database

One database, with ``stats``: size, connections, limit, as of when.

Scopesdb:read

Parameters

NameInTypeRequired
database_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
PATCH/databases/{database_id}

Update Database

Change the database role's connection limit, without recreating anything.

Scopesdb:write

Parameters

NameInTypeRequired
database_idpathstringyes

Request body application/json · UpdateDatabaseRequest

NameTypeRequired
connection_limitintegeryes

Responses

  • 200Successful Response
  • 422Validation Error
DELETE/databases/{database_id}

Delete Database

Drop a database and its role. Refuses while any app is attached.

Scopesdb:write

Parameters

NameInTypeRequired
database_idpathstringyes

Responses

  • 204Successful Response
  • 422Validation Error
GET/databases/{database_id}/backups

List Database Backups

This database's backups, newest first, the one running, and recent restores.

Scopesdb:read

Parameters

NameInTypeRequired
database_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
POST/databases/{database_id}/backups

Create Database Backup

Back this database up now. 202: it runs in the background.

Scopesdb:write

Parameters

NameInTypeRequired
database_idpathstringyes

Responses

  • 202Successful Response
  • 422Validation Error
GET/databases/{database_id}/history

Get Database History

Recent executions against this database, newest first.

Scopesdb:data

Parameters

NameInTypeRequired
database_idpathstringyes
limitqueryintegerno

Responses

  • 200Successful Response
  • 422Validation Error
POST/databases/{database_id}/query

Execute Database Sql

Run a statement as the database's own role.

Scopesdb:write

Parameters

NameInTypeRequired
database_idpathstringyes

Request body application/json · ExecuteSqlRequest

NameTypeRequired
sqlstringyes
writebooleanno

Responses

  • 200Successful Response
  • 422Validation Error
POST/databases/{database_id}/restore

Restore Database

Restore one of this database's backups into a **new** database named *name*.

Scopesdb:write

Parameters

NameInTypeRequired
database_idpathstringyes

Request body application/json · RestoreDatabaseRequest

NameTypeRequired
backup_idstringyes
namestringyes

Responses

  • 202Successful Response
  • 422Validation Error
GET/databases/{database_id}/rows

Get Database Rows

One page of a relation's rows.

Scopesdb:data

Parameters

NameInTypeRequired
database_idpathstringyes
schemaquerystringyes
tablequerystringyes
limitqueryintegerno
offsetqueryintegerno

Responses

  • 200Successful Response
  • 422Validation Error
GET/databases/{database_id}/schema

Get Database Schema

The database's structure, from the catalog.

Scopesdb:read

Parameters

NameInTypeRequired
database_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/databases/{database_id}/url

Get Database Url

Re-issue the connection string for a database the caller can already see.

Scopesdb:credentials

Parameters

NameInTypeRequired
database_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error

Health

GET/health

Health

Scopesany valid key

Parameters

NameInTypeRequired
domainquerystring | nullno
workerquerystring | nullno

Responses

  • 200Successful Response
  • 422Validation Error

Jobs

GET/jobs

List Jobs

List all jobs visible to the authenticated user (theirs + their org's).

Scopesjobs:read

Parameters

NameInTypeRequired
sortquerystringno
orderquerystringno
statusquerystring | nullno
typequerystring | nullno

Responses

  • 200Successful Response
  • 422Validation Error
POST/jobs

Submit Job

Submit a job for distributed execution.

Scopesjobs:write

Request body application/json · JobSubmission

NameTypeRequired
chunksintegeryes
configobjectyes
created_atstringyes
job_idstringyes
job_type"shell" | "python" | "transform"yes
payloadobjectyes

Responses

  • 201Successful Response
  • 422Validation Error
POST/jobs/upload

Upload Job

Submit a job with file uploads (multipart/form-data).

Scopesjobs:write

Request body multipart/form-data · Body_upload_job_jobs_upload_post

NameTypeRequired
chunksintegerno
commandstringno
filesstring[]yes
job_typestringno
split_strategystringno
timeoutintegerno

Responses

  • 201Successful Response
  • 422Validation Error
GET/jobs/{job_id}

Get Job Status

Return current status of a job.

Scopesjobs:read

Parameters

NameInTypeRequired
job_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/jobs/{job_id}/results

Get Job Results

Return aggregated output for a completed job.

Scopesjobs:read

Parameters

NameInTypeRequired
job_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error

Metrics

GET/metrics

Get Metrics

Return system-wide performance metrics.

Scopesworkers:read

Responses

  • 200Successful Response

Workers

GET/workers

List Workers

Connected workers: every one for a superadmin, the caller's own otherwise.

Scopesworkers:read

Responses

  • 200Successful Response
GET/workers/{worker_id}/credits

Get Worker Credits

Return total compute credits earned by a worker (owner or superadmin).

Scopesworkers:read

Parameters

NameInTypeRequired
worker_idpathstringyes

Responses

  • 200Successful Response
  • 422Validation Error
GET/workers/{worker_id}/credits/history

Get Worker Credits History

Return daily credits earned over the last N days (owner or superadmin).

Scopesworkers:read

Parameters

NameInTypeRequired
worker_idpathstringyes
daysqueryintegerno

Responses

  • 200Successful Response
  • 422Validation Error