Skip to content

API Overview

Dploy exposes a small REST API for managing ephemeral environments. The API authenticates users, serves the catalog, and creates/claims/extends/deletes DployInstance resources.

https://dploy.your-domain.com

Protected endpoints require a JWT Bearer token:

Terminal window
curl -H "Authorization: Bearer $TOKEN" https://dploy.your-domain.com/api/environments

Obtain a token by sending users through /auth/login (the token is returned in the redirect URL hash), or directly from your OIDC provider.

Successful responses return JSON directly; errors include an error field:

{ "error": "environment \"webterm\" not found" }
CodeMeaning
200Success
204Success, no content (delete)
400Bad request (e.g. missing required parameter)
401Unauthorized — invalid or missing token
403Forbidden — quota exceeded
404Template or instance not found
409Conflict — maximum TTL extensions reached
503Pool exhausted — no warm instance to claim, retry shortly
MethodPathAuthDescription
GET/healthNoLiveness probe
GET/readyNoReadiness probe (checks Kubernetes connectivity)
MethodPathAuthDescription
GET/api/environments/availableNoList visible, enabled templates
GET/api/environmentsYesList the user’s instances
MethodPathAuthDescription
GET/run/:envYesCreate (or claim) an environment, or return the existing one
GET/run/:env/statusYesGet an environment’s status
POST/run/:env/extendYesExtend the TTL
DELETE/run/:envYesDelete the environment

The /run/* routes are also available under /api/run/*. :env is the template name.

MethodPathAuthDescription
GET/auth/loginNoStart the OIDC login flow
GET/auth/callbackNoOIDC callback handler
GET/auth/logoutNoClear client state
Terminal window
# Health
curl https://dploy.your-domain.com/health
# Catalog (no auth)
curl https://dploy.your-domain.com/api/environments/available
# Create / claim an environment
curl -H "Authorization: Bearer $TOKEN" https://dploy.your-domain.com/run/webterm
# With template parameters (passed via query string)
curl -H "Authorization: Bearer $TOKEN" \
"https://dploy.your-domain.com/run/vscode?size=large"
# Status, extend, delete
curl -H "Authorization: Bearer $TOKEN" https://dploy.your-domain.com/run/webterm/status
curl -X POST -H "Authorization: Bearer $TOKEN" https://dploy.your-domain.com/run/webterm/extend
curl -X DELETE -H "Authorization: Bearer $TOKEN" https://dploy.your-domain.com/run/webterm