
Railway Has a Free API You Should Know About
Railway deploys anything from a Git repo — and its GraphQL API lets you manage infrastructure programmatically. The GraphQL API # List projects query { me { projects { edges { node { id name environments { edges { node { name deployments ( first : 1 ) { edges { node { status createdAt } } } } } } } } } } } Deploy via API # Trigger a deployment curl -X POST https://backboard.railway.app/graphql/v2 \ -H "Authorization: Bearer $RAILWAY_TOKEN " \ -H "Content-Type: application/json" \ -d '{ "query": "mutation { serviceDeploymentRedeploy(input: { environmentId: "ENV_ID", serviceId: "SVC_ID" }) { id status } }" }' One-Click Services # Deploy PostgreSQL railway add --plugin postgresql # Deploy Redis railway add --plugin redis # Your app gets connection strings as env vars automatically Environment Variables API # Set variables curl -X POST https://backboard.railway.app/graphql/v2 \ -H "Authorization: Bearer $RAILWAY_TOKEN " \ -d '{ "query": "mutation { variableUpsert(input: { projectId: "...",
Continue reading on Dev.to DevOps
Opens in a new tab

