API Reference
The Drift REST API provides full programmatic access to all platform features.
Base URL#
https://api.drift.velozengineering.ch/v1Authentication#
All authenticated endpoints require a JWT bearer token or an API key. Obtain a token via the login endpoint:
curl -X POST https://api.drift.velozengineering.ch/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "secret"}'
# Response:
# {"token": "eyJhbGciOi...", "user": {"id": "...", "email": "[email protected]"}}Use the token in subsequent requests:
curl -H "Authorization: Bearer eyJhbGciOi..." \
https://api.drift.velozengineering.ch/v1/orgsAPI Keys
drift create-api-key or POST /v1/api-keys.Error Format#
All errors return a JSON object with a status code, error code, and message:
{
"code": "NOT_FOUND",
"message": "app \"myapp\" not found"
}Rate Limiting#
The API enforces rate limiting per authenticated user. If you exceed the limit, you'll receive a429 Too Many Requests response.
Endpoints#
Authentication#
/v1/auth/loginLogin and receive a JWT token
/v1/auth/meGet current user info
Organizations#
/v1/orgsList organizations
/v1/orgsCreate an organization
/v1/orgs/{id}Get organization details
/v1/orgs/{id}Delete an organization
/v1/orgs/{id}/usersList org users with roles
/v1/orgs/{id}/users/{uid}/rolesSet org roles for a user
Spaces#
/v1/orgs/{orgId}/spacesList spaces in an org
/v1/orgs/{orgId}/spacesCreate a space
/v1/spaces/{id}Get space details
/v1/spaces/{id}Delete a space
/v1/spaces/{id}/usersList space users with roles
/v1/spaces/{id}/users/{uid}/rolesSet space roles for a user
Applications#
/v1/spaces/{spaceId}/appsList apps in a space
/v1/spaces/{spaceId}/appsPush (create/update) an app
/v1/apps/{id}Get app details
/v1/apps/{id}Delete an app
/v1/apps/{id}/startStart an app
/v1/apps/{id}/stopStop an app
/v1/apps/{id}/restartRolling restart an app
/v1/apps/{id}/scaleScale instances/memory
/v1/apps/{id}/envGet environment variables
/v1/apps/{id}/envSet environment variables (bulk)
/v1/apps/{id}/env/{key}Set a single environment variable
/v1/apps/{id}/healthSet health check configuration
/v1/apps/{id}/logsGet app logs (supports SSE streaming)
/v1/apps/{id}/statsGet app instance stats (CPU, memory)
/v1/apps/{id}/execWebSocket shell (SSH)
Services#
/v1/marketplaceList available services and plans
/v1/spaces/{spaceId}/servicesList service instances in a space
/v1/spaces/{spaceId}/servicesCreate a service instance
/v1/services/{id}Get service instance details
/v1/services/{id}Delete a service instance
Service Bindings#
/v1/apps/{appId}/bindingsBind a service to an app
/v1/apps/{appId}/bindingsList bindings for an app
/v1/bindings/{id}Delete a binding
Service Sharing#
/v1/services/{id}/sharesShare a service to another space
/v1/services/{id}/sharesList shares for a service
/v1/services/{id}/shares/{shareId}Remove a share
Service Keys#
/v1/services/{id}/keysCreate a service key
/v1/services/{id}/keysList service keys
/v1/service-keys/{keyId}Get service key credentials
/v1/service-keys/{keyId}Delete a service key
Routes & Domains#
/v1/domainsList available domains
/v1/domainsCreate a domain
/v1/domains/{id}Delete a domain
/v1/spaces/{spaceId}/routesList routes in a space
/v1/apps/{appId}/routesList routes for an app
/v1/apps/{appId}/routesMap a route to an app
/v1/routes/{routeId}/mappings/{appId}Unmap a route from an app
Events#
/v1/spaces/{spaceId}/eventsList events in a space
/v1/orgs/{orgId}/eventsList events in an org
Billing#
/v1/plansList available billing plans
/v1/orgs/{orgId}/subscriptionGet current subscription
/v1/orgs/{orgId}/subscriptionCreate or change subscription
/v1/orgs/{orgId}/subscriptionCancel subscription
/v1/orgs/{orgId}/usageGet current resource usage
/v1/orgs/{orgId}/invoicesList invoices
API Keys#
/v1/api-keysCreate an API key
/v1/api-keysList API keys
/v1/api-keys/{id}Delete an API key
Webhooks#
/v1/orgs/{orgId}/webhooksCreate a webhook
/v1/orgs/{orgId}/webhooksList webhooks
/v1/webhooks/{id}Update a webhook
/v1/webhooks/{id}Delete a webhook
/v1/webhooks/{id}/deliveriesList webhook deliveries
Admin (requires admin role)#
/v1/service-brokersList service brokers
/v1/service-brokersRegister a service broker
/v1/service-brokers/{name}Delete a service broker
/v1/admin/usersCreate a user
/v1/admin/usersList all users
/v1/quotasList quotas
/v1/quotas/{name}Get quota details
/v1/admin/quotasCreate a quota
/v1/admin/orgs/{id}/quotaSet quota for an org
Health & Metrics#
/healthzSimple health check (returns 'ok')
/healthDetailed health check
/metricsPrometheus metrics endpoint