Skip to content
Environment-scoped Project Token permissions for staging cleanup
dan001610
OP

3 hours ago

Can an existing environment-scoped Project Token use deploymentCancel(id) while a deployment is queued or building, and deploymentStop(id) or deploymentRemove(id) once it is running? Which action is supported during DEPLOYING, and which API status confirms teardown is complete?

Can the same token create and delete a Railway-provided service domain in its own environment using serviceDomainCreate and serviceDomainDelete? Please confirm scope enforcement for the deployment and domain mutations that take only an ID. We’re seeking the permission contract before starting a bounded staging test.

Awaiting User Response

1 Reply

Railway
BOT

3 hours ago

Aborting (deploymentCancel) applies to a deployment that is still initializing or building, and it marks that deployment REMOVED. Once a deployment is running, removing it stops it and marks it REMOVED. Old deployments pass through REMOVING before they reach REMOVED, so REMOVED is the status that confirms teardown is complete.

Project tokens are scoped to one environment and are meant for deployment-related actions such as deploying, redeploying, and viewing logs. We can't confirm per-mutation permissions for deploymentStop, deploymentRemove, serviceDomainCreate, or serviceDomainDelete with a project token. We also can't confirm which action applies during DEPLOYING, or exactly how scope is enforced on the ID-only mutations. Your bounded staging test is the right way to check each of these. Run it in an isolated environment and include a call that targets an ID from a different environment, so you can see the refusal before you rely on the token for cleanup.


Status changed to Awaiting User Response Railway • about 3 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...