Manage Railway projects, services, deployments, and variables
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
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
workspaceId | string | いいえ | Workspace ID to list projects from |
first | number | いいえ | Maximum number of projects to return |
after | string | いいえ | Cursor for pagination |
| パラメータ | 型 | 説明 |
|---|
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
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
| パラメータ | 型 | 説明 |
|---|
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
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
name | string | はい | Project name |
description | string | いいえ | Project description |
workspaceId | string | いいえ | Workspace ID to create the project in |
isPublic | boolean | いいえ | Whether the project should be publicly visible |
defaultEnvironmentName | string | いいえ | Name for the default environment |
prDeploys | boolean | いいえ | Whether to enable pull request deploys |
| パラメータ | 型 | 説明 |
|---|
project | object | Created project |
↳ id | string | Project ID |
↳ name | string | Project name |
Update a Railway project name or description
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
name | string | いいえ | Updated project name |
description | string | いいえ | Updated project description |
isPublic | boolean | いいえ | Whether the project should be publicly visible |
prDeploys | boolean | いいえ | Whether to enable pull request deploy environments |
| パラメータ | 型 | 説明 |
|---|
project | object | Updated project |
↳ id | string | Project ID |
↳ name | string | Project name |
↳ description | string | Project description |
Delete a Railway project
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the project was deleted |
Transfer a Railway project to another workspace
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
workspaceId | string | はい | Destination workspace ID |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the project was transferred |
List members for a Railway project
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
| パラメータ | 型 | 説明 |
|---|
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
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
name | string | はい | Environment name |
sourceEnvironmentId | string | いいえ | Environment ID to clone from |
ephemeral | boolean | いいえ | Whether the environment is ephemeral |
skipInitialDeploys | boolean | いいえ | Whether to skip initial deploys for the environment |
stageInitialChanges | boolean | いいえ | Whether to stage initial changes instead of applying them immediately |
| パラメータ | 型 | 説明 |
|---|
environment | object | Created environment |
↳ id | string | Environment ID |
↳ name | string | Environment name |
Delete a Railway project environment
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
environmentId | string | はい | Railway environment ID |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the environment was deleted |
Create a Railway service from a GitHub repo or Docker image
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
name | string | はい | Service name |
repo | string | いいえ | GitHub repository in owner/name format to deploy from |
image | string | いいえ | Docker image to deploy, for example redis:7-alpine |
branch | string | いいえ | Git branch to deploy when using a repository source |
| パラメータ | 型 | 説明 |
|---|
service | object | Created service |
↳ id | string | Service ID |
↳ name | string | Service name |
Delete a Railway service and all of its deployments
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
serviceId | string | はい | Railway service ID |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the service was deleted |
List deployments for a Railway service in an environment
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
serviceId | string | はい | Railway service ID |
environmentId | string | はい | Railway environment ID |
first | number | いいえ | Maximum number of deployments to return |
after | string | いいえ | Cursor for pagination |
| パラメータ | 型 | 説明 |
|---|
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
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | はい | Railway deployment ID |
| パラメータ | 型 | 説明 |
|---|
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
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
serviceId | string | はい | Railway service ID |
environmentId | string | はい | Railway environment ID |
commitSha | string | いいえ | Specific Git commit SHA to deploy |
| パラメータ | 型 | 説明 |
|---|
deploymentId | string | Created deployment ID |
Restart a running Railway deployment without rebuilding
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | はい | Railway deployment ID |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the deployment was restarted |
Roll a Railway service back to a previous deployment
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | はい | Railway deployment ID to roll back to (must have canRollback) |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the rollback was triggered |
Retrieve runtime logs for a Railway deployment
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
deploymentId | string | はい | Railway deployment ID |
limit | number | いいえ | Maximum number of log lines to return |
| パラメータ | 型 | 説明 |
|---|
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
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
environmentId | string | はい | Railway environment ID |
serviceId | string | いいえ | Railway service ID. Omit for shared environment variables. |
| パラメータ | 型 | 説明 |
|---|
variables | object | Variable names and values |
count | number | Number of variables returned |
Create or update a Railway environment variable
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
environmentId | string | はい | Railway environment ID |
serviceId | string | いいえ | Railway service ID. Omit to create or update a shared variable. |
name | string | はい | Variable name |
value | string | はい | Variable value |
skipDeploys | boolean | いいえ | Whether to skip automatic redeploys after changing the variable |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the variable was created or updated |
Delete a Railway environment variable
| パラメータ | 型 | 必須 | 説明 |
|---|
apiKey | string | はい | Railway API token |
tokenType | string | いいえ | Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. |
projectId | string | はい | Railway project ID |
environmentId | string | はい | Railway environment ID |
name | string | はい | Variable name to delete |
serviceId | string | いいえ | Railway service ID. Omit to delete a shared variable. |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the variable was deleted |