AptlyStar

Railway

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.

工具

railway_list_projects

List Railway projects visible to the provided token

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
workspaceIdstring否Workspace ID to list projects from
firstnumber否Maximum number of projects to return
afterstring否Cursor for pagination

输出

参数类型描述
projectsarrayRailway projects
↳ idstringProject ID
↳ namestringProject name
↳ descriptionstringProject description
↳ createdAtstringProject creation timestamp
↳ updatedAtstringProject update timestamp
pageInfoobjectPagination information
↳ hasNextPagebooleanWhether more projects are available
↳ endCursorstringCursor for the next page
countnumberNumber of projects returned

railway_get_project

Get a Railway project with its services and environments

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID

输出

参数类型描述
projectobjectProject with services and environments
↳ idstringProject ID
↳ namestringProject name
↳ descriptionstringProject description
↳ createdAtstringProject creation timestamp
↳ updatedAtstringProject update timestamp
↳ servicesarrayProject services
↳ idstringService ID
↳ namestringService name
↳ iconstringService icon
↳ environmentsarrayProject environments
↳ idstringEnvironment ID
↳ namestringEnvironment name

railway_create_project

Create a Railway project

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
namestring是Project name
descriptionstring否Project description
workspaceIdstring否Workspace ID to create the project in
isPublicboolean否Whether the project should be publicly visible
defaultEnvironmentNamestring否Name for the default environment
prDeploysboolean否Whether to enable pull request deploys

输出

参数类型描述
projectobjectCreated project
↳ idstringProject ID
↳ namestringProject name

railway_update_project

Update a Railway project name or description

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
namestring否Updated project name
descriptionstring否Updated project description
isPublicboolean否Whether the project should be publicly visible
prDeploysboolean否Whether to enable pull request deploy environments

输出

参数类型描述
projectobjectUpdated project
↳ idstringProject ID
↳ namestringProject name
↳ descriptionstringProject description

railway_delete_project

Delete a Railway project

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID

输出

参数类型描述
successbooleanWhether the project was deleted

railway_transfer_project

Transfer a Railway project to another workspace

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
workspaceIdstring是Destination workspace ID

输出

参数类型描述
successbooleanWhether the project was transferred

railway_list_project_members

List members for a Railway project

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID

输出

参数类型描述
membersarrayProject members
↳ idstringMember user ID
↳ rolestringProject role
↳ namestringMember name
↳ emailstringMember email
↳ avatarstringMember avatar URL
countnumberNumber of members returned

railway_create_environment

Create a Railway project environment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
namestring是Environment name
sourceEnvironmentIdstring否Environment ID to clone from
ephemeralboolean否Whether the environment is ephemeral
skipInitialDeploysboolean否Whether to skip initial deploys for the environment
stageInitialChangesboolean否Whether to stage initial changes instead of applying them immediately

输出

参数类型描述
environmentobjectCreated environment
↳ idstringEnvironment ID
↳ namestringEnvironment name

railway_delete_environment

Delete a Railway project environment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
environmentIdstring是Railway environment ID

输出

参数类型描述
successbooleanWhether the environment was deleted

railway_create_service

Create a Railway service from a GitHub repo or Docker image

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
namestring是Service name
repostring否GitHub repository in owner/name format to deploy from
imagestring否Docker image to deploy, for example redis:7-alpine
branchstring否Git branch to deploy when using a repository source

输出

参数类型描述
serviceobjectCreated service
↳ idstringService ID
↳ namestringService name

railway_delete_service

Delete a Railway service and all of its deployments

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
serviceIdstring是Railway service ID

输出

参数类型描述
successbooleanWhether the service was deleted

railway_list_deployments

List deployments for a Railway service in an environment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
serviceIdstring是Railway service ID
environmentIdstring是Railway environment ID
firstnumber否Maximum number of deployments to return
afterstring否Cursor for pagination

输出

参数类型描述
deploymentsarrayService deployments
↳ idstringDeployment ID
↳ statusstringDeployment status
↳ createdAtstringDeployment creation timestamp
↳ urlstringDeployment URL
↳ staticUrlstringStatic deployment URL
↳ canRollbackbooleanWhether this deployment can be rolled back to
↳ canRedeploybooleanWhether this deployment can be redeployed
countnumberNumber of deployments returned
pageInfoobjectPagination information
↳ hasNextPagebooleanWhether more deployments are available
↳ endCursorstringCursor for the next page

railway_get_deployment

Get details for a single Railway deployment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
deploymentIdstring是Railway deployment ID

输出

参数类型描述
deploymentobjectDeployment details
↳ idstringDeployment ID
↳ statusstringDeployment status
↳ createdAtstringDeployment creation timestamp
↳ urlstringDeployment URL
↳ staticUrlstringStatic deployment URL
↳ canRollbackbooleanWhether the deployment can be rolled back to
↳ canRedeploybooleanWhether the deployment can be redeployed

railway_deploy_service

Trigger a deployment for a Railway service in an environment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
serviceIdstring是Railway service ID
environmentIdstring是Railway environment ID
commitShastring否Specific Git commit SHA to deploy

输出

参数类型描述
deploymentIdstringCreated deployment ID

railway_restart_deployment

Restart a running Railway deployment without rebuilding

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
deploymentIdstring是Railway deployment ID

输出

参数类型描述
successbooleanWhether the deployment was restarted

railway_rollback_deployment

Roll a Railway service back to a previous deployment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
deploymentIdstring是Railway deployment ID to roll back to (must have canRollback)

输出

参数类型描述
successbooleanWhether the rollback was triggered

railway_get_deployment_logs

Retrieve runtime logs for a Railway deployment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
deploymentIdstring是Railway deployment ID
limitnumber否Maximum number of log lines to return

输出

参数类型描述
logsarrayDeployment log entries
↳ timestampstringLog timestamp
↳ messagestringLog message
↳ severitystringLog severity
countnumberNumber of log entries returned

railway_list_variables

List Railway environment variables for a service or shared environment

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
environmentIdstring是Railway environment ID
serviceIdstring否Railway service ID. Omit for shared environment variables.

输出

参数类型描述
variablesobjectVariable names and values
countnumberNumber of variables returned

railway_upsert_variable

Create or update a Railway environment variable

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
environmentIdstring是Railway environment ID
serviceIdstring否Railway service ID. Omit to create or update a shared variable.
namestring是Variable name
valuestring是Variable value
skipDeploysboolean否Whether to skip automatic redeploys after changing the variable

输出

参数类型描述
successbooleanWhether the variable was created or updated

railway_delete_variable

Delete a Railway environment variable

输入

参数类型必填描述
apiKeystring是Railway API token
tokenTypestring否Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens.
projectIdstring是Railway project ID
environmentIdstring是Railway environment ID
namestring是Variable name to delete
serviceIdstring否Railway service ID. Omit to delete a shared variable.

输出

参数类型描述
successbooleanWhether the variable was deleted

On this page