RailwayDocs

Manage Deployments with the Public API

Here are examples to help you manage your deployments using the Public API.

List deployments

Get all deployments for a service in an environment:

Variables

Get a single deployment

Fetch a deployment by ID:

Variables

Get latest active deployment

Get the currently running deployment:

Variables

Get build logs

Fetch build logs for a deployment:

Variables

Get runtime logs

Fetch runtime logs for a deployment:

Variables

Get HTTP logs

Fetch HTTP request logs for a deployment:

Variables

Trigger a redeploy

Redeploy an existing deployment:

Variables

Restart a deployment

Restart a running deployment without rebuilding:

Variables

Rollback to a deployment

Rollback to a previous deployment:

Variables

Stop a deployment

Stop a running deployment:

Variables

Cancel a deployment

Cancel a deployment that is building or queued:

Variables

Remove a deployment

Remove a deployment from the history:

Variables

Deploy a specific service in an environment

Trigger a deployment for a specific service:

Variables

Deployment statuses

StatusDescription
BUILDINGDeployment is being built
DEPLOYINGDeployment is being deployed
SUCCESSDeployment is running successfully
FAILEDDeployment failed to build or deploy
CRASHEDDeployment crashed after starting
REMOVEDDeployment was removed
SLEEPINGDeployment is sleeping (inactive)
SKIPPEDDeployment was skipped
WAITINGDeployment is waiting for approval
QUEUEDDeployment is queued