13 minutes ago
Hi Railway Support,
We operate a private Railway background worker and want to run one time-bounded backup job. We accept that Railway may start more than one instance for the same authorized run. We need a supported way to identify every instance associated with that run and independently verify that all have stopped.
Questions 1, 2, 7, and 8 are our priorities. Links to official documentation or supported API fields would be helpful.
-
Which supported API or CLI operation lists all deployments and instances for a single service and environment, including queued, starting, running, draining, and replacement instances? What pagination is required?
-
Does
Deployment.instancesinclude every instance associated with a deployment, including platform replacements? Can the list be filtered, truncated, paginated, or delayed? What completeness and consistency guarantees apply? -
During a platform migration or replacement, can Railway create a new instance under the same deployment ID, a new deployment ID, or either? Is there a supported field linking a replacement to its predecessor?
-
Which immutable metadata fields identify the exact image or source artifact used by an instance and its replacements?
-
Does a replacement inherit the original deployment’s startup command and environment snapshot, or can it use the service’s current settings? Can we verify which configuration it used without retrieving environment variable values?
-
Can we associate a non-secret application run ID with every replacement through supported deployment metadata? If so, which fields should we use?
-
For
deploymentCancelanddeploymentRemove, which deployment states support each operation? Does a successful response acknowledge the request, or does it confirm that every instance has stopped? Which independently queried fields and states confirm that no instance is running or queued? Can Railway create a replacement after that response? -
Is there a supported operation scoped to this service that prevents further execution of the identified run without affecting other services or applying unrelated staged configuration? What does it guarantee for queued jobs and platform replacements?
-
Are there documented maximum delays for instance visibility or shutdown? If Railway provides no hard bounds, please confirm that explicitly.
Our authorization window is 600 seconds, and we start only if at least 400 seconds remain. Our internal target is to verify provider cleanup within 355 seconds of activation and finish local teardown within 360 seconds. If we cannot independently verify shutdown by our cutoff, we record the outcome as uncertain.
We’re requesting documentation and clarification only. Please leave our services unchanged.
Thank you.
1 Reply
11 minutes ago
The public GraphQL deployments(input: DeploymentListInput!, first: Int) query lists deployments for a service and environment when you pass projectId, serviceId and environmentId. It returns a Relay-style connection with edges, and statuses include QUEUED, WAITING, BUILDING, DEPLOYING, SUCCESS, SLEEPING, CRASHED, FAILED, REMOVED and SKIPPED. Use deployment(id) to read one deployment's status and meta. See Manage Deployments with the Public API.
For the operations you asked about, deploymentCancel is for a deployment that is still building or queued. deploymentRemove stops a running deployment and marks it REMOVED. deploymentStop accepts a SUCCESS deployment. For stops, a successful response means only that the stop has started, not that shutdown has finished. To confirm shutdown, poll deployment(id) until deploymentStopped is true, replicaStatus.running is zero and each instance you expected reports STOPPED. Then list the service's deployments again to check that no other deployment is queued, building, deploying or active.
We can't confirm completeness guarantees for instance lists, how replacements link to earlier instances, a supported field for attaching your own run ID, a service-scoped execution block, or maximum delays for visibility or shutdown. We publish no hard time bound for any of them. Before you rely on your 355-second cutoff, test the full stop-and-verify sequence in an isolated test environment.
Status changed to Awaiting User Response Railway • 11 minutes ago