Railway é uma plataforma de aplicações em nuvem para fazer deploy, operar e escalar serviços, bancos de dados, jobs e ambientes de produção a partir de um único workspace de projeto. As equipes usam o Railway para conectar repositórios de código, gerenciar ambientes, configurar variáveis, disparar deploys e monitorar a entrega em staging e produção.
Com o Railway, você pode:
- Gerenciar projetos e ambientes: Organize serviços implantados e inspecione os ambientes anexados a cada projeto
- Automatizar deploys: Dispare novos deploys de serviço e inspecione o status recente de deploy a partir dos fluxos de trabalho
- Controlar a configuração de runtime: Leia e atualize variáveis de ambiente para serviços ou ambientes compartilhados do projeto
- Conectar fluxos de infraestrutura: Use IDs de projeto, serviço e ambiente de uma etapa para impulsionar a automação de release nas etapas seguintes
Na Zoen, a integração com o Railway permite que seus agentes trabalhem com a API GraphQL pública do Railway diretamente a partir dos fluxos de trabalho. Você pode listar projetos, buscar serviços e ambientes do projeto, inspecionar deploys, fazer deploy de um serviço e gerenciar variáveis de ambiente como parte de processos de CI/CD, operações e release.
Integrate Railway into workflows to list projects, manage services and environments, monitor deployments, trigger and roll back service deployments, and manage environment variables.
List Railway projects visible to the provided token
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
workspaceId | string | No | Workspace ID to list projects from |
first | number | No | Maximum number of projects to return |
after | string | No | Cursor for pagination |
| Parameter | Type | Description |
|---|
projects | array | Railway projects |
↳ id | string | Project ID |
↳ name | string | Project name |
↳ description | string | Project description |
↳ createdAt | string | Project creation timestamp |
↳ updatedAt | string | Project update timestamp |
pageInfo | object | Pagination information |
↳ hasNextPage | boolean | Whether more projects are available |
↳ endCursor | string | Cursor for the next page |
count | number | Number of projects returned |
Get a Railway project with its services and environments
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
| Parameter | Type | Description |
|---|
project | object | Project with services and environments |
↳ id | string | Project ID |
↳ name | string | Project name |
↳ description | string | Project description |
↳ createdAt | string | Project creation timestamp |
↳ updatedAt | string | Project update timestamp |
↳ services | array | Project services |
↳ id | string | Service ID |
↳ name | string | Service name |
↳ icon | string | Service icon |
↳ environments | array | Project environments |
↳ id | string | Environment ID |
↳ name | string | Environment name |
Create a Railway project
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
name | string | Yes | Project name |
description | string | No | Project description |
workspaceId | string | No | Workspace ID to create the project in |
isPublic | boolean | No | Whether the project should be publicly visible |
defaultEnvironmentName | string | No | Name for the default environment |
prDeploys | boolean | No | Whether to enable pull request deploys |
| Parameter | Type | Description |
|---|
project | object | Created project |
↳ id | string | Project ID |
↳ name | string | Project name |
Update a Railway project name or description
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
name | string | No | Updated project name |
description | string | No | Updated project description |
isPublic | boolean | No | Whether the project should be publicly visible |
prDeploys | boolean | No | Whether to enable pull request deploy environments |
| Parameter | Type | Description |
|---|
project | object | Updated project |
↳ id | string | Project ID |
↳ name | string | Project name |
↳ description | string | Project description |
Delete a Railway project
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
| Parameter | Type | Description |
|---|
success | boolean | Whether the project was deleted |
Transfer a Railway project to another workspace
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
workspaceId | string | Yes | Destination workspace ID |
| Parameter | Type | Description |
|---|
success | boolean | Whether the project was transferred |
List members for a Railway project
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
| Parameter | Type | Description |
|---|
members | array | Project members |
↳ id | string | Member user ID |
↳ role | string | Project role |
↳ name | string | Member name |
↳ email | string | Member email |
↳ avatar | string | Member avatar URL |
count | number | Number of members returned |
Create a Railway project environment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
name | string | Yes | Environment name |
sourceEnvironmentId | string | No | Environment ID to clone from |
ephemeral | boolean | No | Whether the environment is ephemeral |
skipInitialDeploys | boolean | No | Whether to skip initial deploys for the environment |
stageInitialChanges | boolean | No | Whether to stage initial changes instead of applying them immediately |
| Parameter | Type | Description |
|---|
environment | object | Created environment |
↳ id | string | Environment ID |
↳ name | string | Environment name |
Delete a Railway project environment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
environmentId | string | Yes | Railway environment ID |
| Parameter | Type | Description |
|---|
success | boolean | Whether the environment was deleted |
Create a Railway service from a GitHub repo or Docker image
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
name | string | Yes | Service name |
repo | string | No | GitHub repository in owner/name format to deploy from |
image | string | No | Docker image to deploy, for example redis:7-alpine |
branch | string | No | Git branch to deploy when using a repository source |
| Parameter | Type | Description |
|---|
service | object | Created service |
↳ id | string | Service ID |
↳ name | string | Service name |
Delete a Railway service and all of its deployments
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
serviceId | string | Yes | Railway service ID |
| Parameter | Type | Description |
|---|
success | boolean | Whether the service was deleted |
List deployments for a Railway service in an environment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
serviceId | string | Yes | Railway service ID |
environmentId | string | Yes | Railway environment ID |
first | number | No | Maximum number of deployments to return |
after | string | No | Cursor for pagination |
| Parameter | Type | Description |
|---|
deployments | array | Service deployments |
↳ id | string | Deployment ID |
↳ status | string | Deployment status |
↳ createdAt | string | Deployment creation timestamp |
↳ url | string | Deployment URL |
↳ staticUrl | string | Static deployment URL |
↳ canRollback | boolean | Whether this deployment can be rolled back to |
↳ canRedeploy | boolean | Whether this deployment can be redeployed |
count | number | Number of deployments returned |
pageInfo | object | Pagination information |
↳ hasNextPage | boolean | Whether more deployments are available |
↳ endCursor | string | Cursor for the next page |
Get details for a single Railway deployment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | Yes | Railway deployment ID |
| Parameter | Type | Description |
|---|
deployment | object | Deployment details |
↳ id | string | Deployment ID |
↳ status | string | Deployment status |
↳ createdAt | string | Deployment creation timestamp |
↳ url | string | Deployment URL |
↳ staticUrl | string | Static deployment URL |
↳ canRollback | boolean | Whether the deployment can be rolled back to |
↳ canRedeploy | boolean | Whether the deployment can be redeployed |
Trigger a deployment for a Railway service in an environment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
serviceId | string | Yes | Railway service ID |
environmentId | string | Yes | Railway environment ID |
commitSha | string | No | Specific Git commit SHA to deploy |
| Parameter | Type | Description |
|---|
deploymentId | string | Created deployment ID |
Restart a running Railway deployment without rebuilding
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | Yes | Railway deployment ID |
| Parameter | Type | Description |
|---|
success | boolean | Whether the deployment was restarted |
Roll a Railway service back to a previous deployment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | Yes | Railway deployment ID to roll back to (must have canRollback) |
| Parameter | Type | Description |
|---|
success | boolean | Whether the rollback was triggered |
Retrieve runtime logs for a Railway deployment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | Yes | Railway deployment ID |
limit | number | No | Maximum number of log lines to return |
| Parameter | Type | Description |
|---|
logs | array | Deployment log entries |
↳ timestamp | string | Log timestamp |
↳ message | string | Log message |
↳ severity | string | Log severity |
count | number | Number of log entries returned |
List Railway environment variables for a service or shared environment
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
environmentId | string | Yes | Railway environment ID |
serviceId | string | No | Railway service ID. Omit for shared environment variables. |
| Parameter | Type | Description |
|---|
variables | object | Variable names and values |
count | number | Number of variables returned |
Create or update a Railway environment variable
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
environmentId | string | Yes | Railway environment ID |
serviceId | string | No | Railway service ID. Omit to create or update a shared variable. |
name | string | Yes | Variable name |
value | string | Yes | Variable value |
skipDeploys | boolean | No | Whether to skip automatic redeploys after changing the variable |
| Parameter | Type | Description |
|---|
success | boolean | Whether the variable was created or updated |
Delete a Railway environment variable
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Railway API token |
tokenType | string | No | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | Yes | Railway project ID |
environmentId | string | Yes | Railway environment ID |
name | string | Yes | Variable name to delete |
serviceId | string | No | Railway service ID. Omit to delete a shared variable. |
| Parameter | Type | Description |
|---|
success | boolean | Whether the variable was deleted |