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
/appsList Apps
List deployed apps visible to the authenticated user.
Responses
200Successful Response
/appsDeploy App
Deploy a hosted app to available workers.
Request body application/json · DeployRequest
| Name | Type | Required |
|---|---|---|
app_name | string | yes |
env | object | no |
image | string | yes |
port | integer | yes |
proxy_timeout_s | integer | null | no |
with_database | boolean | no |
Responses
202Successful Response422Validation Error
/apps/deploy-gitDeploy From Git
Deploy an app from a GitHub repo with auto-detected (or overridden) build settings.
Request body application/json · GitDeployRequest
| Name | Type | Required |
|---|---|---|
app_name | string | yes |
branch | string | no |
build_cmd | string | null | no |
enable_pr_previews | boolean | no |
env | object | no |
framework | string | null | no |
install_cmd | string | null | no |
output_dir | string | null | no |
port | integer | null | no |
proxy_timeout_s | integer | null | no |
repo_full_name | string | yes |
root_directory | string | no |
with_database | boolean | no |
Responses
201Successful Response422Validation Error
/apps/detectDetect App Framework
Detect the framework for a GitHub repo without deploying.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
repo_full_name | query | string | yes |
branch | query | string | no |
root_directory | query | string | no |
Responses
200Successful Response422Validation Error
/apps/uploadDeploy Static App
Deploy a static site from a zip upload.
Request body multipart/form-data · Body_deploy_static_app_apps_upload_post
| Name | Type | Required |
|---|---|---|
app_name | string | yes |
env | string | no |
file | string | yes |
proxy_timeout_s | integer | null | no |
with_database | boolean | no |
Responses
201Successful Response422Validation Error
/apps/{app_name}Get App
Get details for a single deployed app (owner or legacy only).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}Undeploy App
Stop and remove a deployed app (owner or legacy only).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
204Successful Response422Validation Error
/apps/{app_name}/branchChange Branch Endpoint
Switch branch; ``Prefer: respond-async`` answers before the build.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Request body application/json · ChangeBranchRequest
| Name | Type | Required |
|---|---|---|
branch | string | yes |
Responses
202Successful Response422Validation Error
/apps/{app_name}/databaseAttach Database
Inject a database's DATABASE_URL into an app's env and redeploy.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Request body application/json · AttachDatabaseRequest
| Name | Type | Required |
|---|---|---|
database_id | string | yes |
Responses
202Successful Response422Validation Error
/apps/{app_name}/databaseDetach Database
Remove DATABASE_URL from an app's env and redeploy. The database survives.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
202Successful Response422Validation Error
/apps/{app_name}/deploy-latestDeploy Latest Endpoint
Deploy the branch head; ``Prefer: respond-async`` answers before the build.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
202Successful Response422Validation Error
/apps/{app_name}/deploymentsList Deployment History
Return recent deployments — what shipped, what triggered it, how it went.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/deployments/driftDeployment Drift
How far the running commit is behind its branch head.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/deployments/{deployment_id}/build-logGet Deployment Build Log
The build output of one deployment, kept after later deploys replace the live log.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
deployment_id | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/domainsList Domains
List an app's custom domains plus the DNS setup targets.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/domainsAdd 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).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Request body application/json · DomainRequest
| Name | Type | Required |
|---|---|---|
domain | string | yes |
Responses
201Successful Response422Validation Error
/apps/{app_name}/domains/{domain}Remove Domain
Remove a custom domain from an app.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
domain | path | string | yes |
Responses
204Successful Response422Validation Error
/apps/{app_name}/domains/{domain}/verifyVerify Domain
Re-run the DNS check for a domain. Flips status both ways — a verified domain whose DNS moved away goes back to pending.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
domain | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/envGet App Env
Return env values in the clear, for someone who explicitly asked.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/envUpdate App Env
Replace an app's environment map and redeploy so the change takes effect.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Request body application/json · UpdateEnvRequest
| Name | Type | Required |
|---|---|---|
env | object | no |
Responses
202Successful Response422Validation Error
/apps/{app_name}/eventsList App Events
The app's timeline, newest first: every placement and status write.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
before | query | string | no |
limit | query | integer | no |
Responses
200Successful Response422Validation Error
/apps/{app_name}/logsTail Logs
Recent log lines over plain HTTP, for callers that cannot hold a WebSocket.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
lines | query | integer | no |
follow_seconds | query | number | no |
Responses
200Successful Response422Validation Error
/apps/{app_name}/logs/tokenMint Logs Token
Mint a short-lived token for the app's log-stream WebSocket.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/metricsGet App Metrics
Return per-deployment request metrics.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
hours | query | integer | no |
Responses
200Successful Response422Validation Error
/apps/{app_name}/redeployRedeploy App Endpoint
Re-run the app's current artifact; ``Prefer: respond-async`` answers before the build.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
202Successful Response422Validation Error
/apps/{app_name}/requestsList Requests
The app's recent requests, newest first.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
limit | query | integer | no |
status_class | query | integer | null | no |
method | query | string | null | no |
contains | query | string | null | no |
before | query | string | null | no |
Responses
200Successful Response422Validation Error
/apps/{app_name}/rollbackRollback App
Re-deploy from a previous successful deployment snapshot (no rebuild).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Request body application/json · RollbackRequest
| Name | Type | Required |
|---|---|---|
deployment_id | string | yes |
Responses
202Successful Response422Validation Error
/apps/{app_name}/trafficGet Traffic
Current blue/green state plus each variant's A/B results.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/trafficSet Traffic
Set the A/B weights across the app's variants.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Request body application/json · TrafficSplitRequest
| Name | Type | Required |
|---|---|---|
sticky | boolean | no |
weights | object | yes |
Responses
200Successful Response422Validation Error
/apps/{app_name}/traffic/promotePromote 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.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
color | query | string | yes |
Responses
202Successful Response422Validation Error
/apps/{app_name}/variantsCreate Variant
Boot a second version of the app into its idle slot at 0% traffic.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
Request body application/json · CreateVariantRequest
| Name | Type | Required |
|---|---|---|
branch | string | no |
deployment_id | string | no |
label | string | no |
Responses
202Successful Response422Validation Error
/apps/{app_name}/variants/{color}Delete Variant
Abort an experiment: all traffic back to the active variant, candidate torn down.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
app_name | path | string | yes |
color | path | string | yes |
Responses
202Successful Response422Validation Error
Crons
/cronsList Cron Jobs
Responses
200Successful Response
/cronsCreate Cron Job
Request body application/json · CreateCronRequest
| Name | Type | Required |
|---|---|---|
command | string | yes |
enabled | boolean | no |
job_type | "shell" | "python" | no |
name | string | yes |
schedule | "every_5_minutes" | "hourly" | "daily" | "weekly" | yes |
Responses
201Successful Response422Validation Error
/crons/{cron_id}Update Cron Job
Parameters
| Name | In | Type | Required |
|---|---|---|---|
cron_id | path | string | yes |
Request body application/json · CronUpdate
| Name | Type | Required |
|---|---|---|
command | string | null | no |
enabled | boolean | null | no |
name | string | null | no |
schedule | "every_5_minutes" | "hourly" | "daily" | "weekly" | null | no |
Responses
200Successful Response422Validation Error
/crons/{cron_id}Delete Cron Job
Parameters
| Name | In | Type | Required |
|---|---|---|---|
cron_id | path | string | yes |
Responses
204Successful Response422Validation Error
Databases
/databasesList Databases
This org's databases, each with ``stats``: size, connections, limit, as of when.
Responses
200Successful Response
/databasesCreate Database
Provision a database and return its connection string, once.
Request body application/json · CreateDatabaseRequest
| Name | Type | Required |
|---|---|---|
name | string | yes |
Responses
201Successful Response422Validation Error
/databases/{database_id}Get Database
One database, with ``stats``: size, connections, limit, as of when.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Responses
200Successful Response422Validation Error
/databases/{database_id}Update Database
Change the database role's connection limit, without recreating anything.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Request body application/json · UpdateDatabaseRequest
| Name | Type | Required |
|---|---|---|
connection_limit | integer | yes |
Responses
200Successful Response422Validation Error
/databases/{database_id}Delete Database
Drop a database and its role. Refuses while any app is attached.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Responses
204Successful Response422Validation Error
/databases/{database_id}/backupsList Database Backups
This database's backups, newest first, the one running, and recent restores.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Responses
200Successful Response422Validation Error
/databases/{database_id}/backupsCreate Database Backup
Back this database up now. 202: it runs in the background.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Responses
202Successful Response422Validation Error
/databases/{database_id}/historyGet Database History
Recent executions against this database, newest first.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
limit | query | integer | no |
Responses
200Successful Response422Validation Error
/databases/{database_id}/queryExecute Database Sql
Run a statement as the database's own role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Request body application/json · ExecuteSqlRequest
| Name | Type | Required |
|---|---|---|
sql | string | yes |
write | boolean | no |
Responses
200Successful Response422Validation Error
/databases/{database_id}/restoreRestore Database
Restore one of this database's backups into a **new** database named *name*.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Request body application/json · RestoreDatabaseRequest
| Name | Type | Required |
|---|---|---|
backup_id | string | yes |
name | string | yes |
Responses
202Successful Response422Validation Error
/databases/{database_id}/rowsGet Database Rows
One page of a relation's rows.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
schema | query | string | yes |
table | query | string | yes |
limit | query | integer | no |
offset | query | integer | no |
Responses
200Successful Response422Validation Error
/databases/{database_id}/schemaGet Database Schema
The database's structure, from the catalog.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Responses
200Successful Response422Validation Error
/databases/{database_id}/urlGet Database Url
Re-issue the connection string for a database the caller can already see.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
database_id | path | string | yes |
Responses
200Successful Response422Validation Error
Health
/healthHealth
Parameters
| Name | In | Type | Required |
|---|---|---|---|
domain | query | string | null | no |
worker | query | string | null | no |
Responses
200Successful Response422Validation Error
Jobs
/jobsList Jobs
List all jobs visible to the authenticated user (theirs + their org's).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
sort | query | string | no |
order | query | string | no |
status | query | string | null | no |
type | query | string | null | no |
Responses
200Successful Response422Validation Error
/jobsSubmit Job
Submit a job for distributed execution.
Request body application/json · JobSubmission
| Name | Type | Required |
|---|---|---|
chunks | integer | yes |
config | object | yes |
created_at | string | yes |
job_id | string | yes |
job_type | "shell" | "python" | "transform" | yes |
payload | object | yes |
Responses
201Successful Response422Validation Error
/jobs/uploadUpload Job
Submit a job with file uploads (multipart/form-data).
Request body multipart/form-data · Body_upload_job_jobs_upload_post
| Name | Type | Required |
|---|---|---|
chunks | integer | no |
command | string | no |
files | string[] | yes |
job_type | string | no |
split_strategy | string | no |
timeout | integer | no |
Responses
201Successful Response422Validation Error
/jobs/{job_id}Get Job Status
Return current status of a job.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | yes |
Responses
200Successful Response422Validation Error
/jobs/{job_id}/resultsGet Job Results
Return aggregated output for a completed job.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | yes |
Responses
200Successful Response422Validation Error
Metrics
/metricsGet Metrics
Return system-wide performance metrics.
Responses
200Successful Response
Workers
/workersList Workers
Connected workers: every one for a superadmin, the caller's own otherwise.
Responses
200Successful Response
/workers/{worker_id}/creditsGet Worker Credits
Return total compute credits earned by a worker (owner or superadmin).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
worker_id | path | string | yes |
Responses
200Successful Response422Validation Error
/workers/{worker_id}/credits/historyGet Worker Credits History
Return daily credits earned over the last N days (owner or superadmin).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
worker_id | path | string | yes |
days | query | integer | no |
Responses
200Successful Response422Validation Error