From 9297d01a1daf0747e040012f1f2d439196c7adcd Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Tue, 29 Sep 2026 08:42:17 +1000 Subject: [PATCH] railway provider --- .../src/railway/v00.00.00000/provider.yaml | 143 + .../v00.00.00000/services/account.yaml | 2176 +++++++++ .../railway/v00.00.00000/services/agents.yaml | 2478 +++++++++++ .../v00.00.00000/services/billing.yaml | 1151 +++++ .../v00.00.00000/services/deployments.yaml | 1523 +++++++ .../v00.00.00000/services/environments.yaml | 1906 ++++++++ .../v00.00.00000/services/integrations.yaml | 1395 ++++++ .../v00.00.00000/services/networking.yaml | 3523 +++++++++++++++ .../v00.00.00000/services/observability.yaml | 2774 ++++++++++++ .../v00.00.00000/services/platform.yaml | 1133 +++++ .../v00.00.00000/services/projects.yaml | 3213 ++++++++++++++ .../v00.00.00000/services/services.yaml | 3277 ++++++++++++++ .../v00.00.00000/services/storage.yaml | 2476 +++++++++++ .../v00.00.00000/services/templates.yaml | 1360 ++++++ .../v00.00.00000/services/variables.yaml | 568 +++ .../v00.00.00000/services/workspaces.yaml | 3935 +++++++++++++++++ 16 files changed, 33031 insertions(+) create mode 100644 providers/src/railway/v00.00.00000/provider.yaml create mode 100644 providers/src/railway/v00.00.00000/services/account.yaml create mode 100644 providers/src/railway/v00.00.00000/services/agents.yaml create mode 100644 providers/src/railway/v00.00.00000/services/billing.yaml create mode 100644 providers/src/railway/v00.00.00000/services/deployments.yaml create mode 100644 providers/src/railway/v00.00.00000/services/environments.yaml create mode 100644 providers/src/railway/v00.00.00000/services/integrations.yaml create mode 100644 providers/src/railway/v00.00.00000/services/networking.yaml create mode 100644 providers/src/railway/v00.00.00000/services/observability.yaml create mode 100644 providers/src/railway/v00.00.00000/services/platform.yaml create mode 100644 providers/src/railway/v00.00.00000/services/projects.yaml create mode 100644 providers/src/railway/v00.00.00000/services/services.yaml create mode 100644 providers/src/railway/v00.00.00000/services/storage.yaml create mode 100644 providers/src/railway/v00.00.00000/services/templates.yaml create mode 100644 providers/src/railway/v00.00.00000/services/variables.yaml create mode 100644 providers/src/railway/v00.00.00000/services/workspaces.yaml diff --git a/providers/src/railway/v00.00.00000/provider.yaml b/providers/src/railway/v00.00.00000/provider.yaml new file mode 100644 index 00000000..e20c5d43 --- /dev/null +++ b/providers/src/railway/v00.00.00000/provider.yaml @@ -0,0 +1,143 @@ +id: railway +name: railway +version: v00.00.00000 +providerServices: + account: + id: account:v00.00.00000 + name: account + preferred: true + service: + $ref: railway/v00.00.00000/services/account.yaml + title: Account API + version: v00.00.00000 + description: 'The authenticated user: profile, API tokens and the workspaces a token can reach, sessions, passkeys, SSH keys, linked provider accounts and preferences.' + agents: + id: agents:v00.00.00000 + name: agents + preferred: true + service: + $ref: railway/v00.00.00000/services/agents.yaml + title: Agents and Sandboxes API + version: v00.00.00000 + description: Cloud agents, their tasks and checkpoints, and sandboxes with their sessions, checkpoints and template builds. + billing: + id: billing:v00.00.00000 + name: billing + preferred: true + service: + $ref: railway/v00.00.00000/services/billing.yaml + title: Billing and Usage API + version: v00.00.00000 + description: 'Usage and cost: aggregated and estimated usage by measurement, per-project and per-service usage, workspace totals, and the billing customer with its credits and usage limits.' + deployments: + id: deployments:v00.00.00000 + name: deployments + preferred: true + service: + $ref: railway/v00.00.00000/services/deployments.yaml + title: Deployments API + version: v00.00.00000 + description: Deployments and their lifecycle (redeploy, restart, rollback, stop, cancel, remove), deployment events, instances, snapshots and deployment triggers. + environments: + id: environments:v00.00.00000 + name: environments + preferred: true + service: + $ref: railway/v00.00.00000/services/environments.yaml + title: Environments API + version: v00.00.00000 + description: Environments, staged changes and patches, change sets, environment history and pending work. + integrations: + id: integrations:v00.00.00000 + name: integrations + preferred: true + service: + $ref: railway/v00.00.00000/services/integrations.yaml + title: Integrations API + version: v00.00.00000 + description: 'Project integrations and linked accounts: GitHub repositories, branches and access, Heroku and Vercel imports.' + networking: + id: networking:v00.00.00000 + name: networking + preferred: true + service: + $ref: railway/v00.00.00000/services/networking.yaml + title: Networking API + version: v00.00.00000 + description: Service domains, custom domains, TCP proxies, private networks, egress gateways, and Railway-registered domains with their DNS records and email forwarding rules. + observability: + id: observability:v00.00.00000 + name: observability + preferred: true + service: + $ref: railway/v00.00.00000/services/observability.yaml + title: Observability API + version: v00.00.00000 + description: Build, deployment, environment, HTTP, DNS query and network flow logs; resource and HTTP metrics; traces; observability dashboards; project events; notification rules and deliveries. + platform: + id: platform:v00.00.00000 + name: platform + preferred: true + service: + $ref: railway/v00.00.00000/services/platform.yaml + title: Platform API + version: v00.00.00000 + description: 'Platform reference data: regions, platform status, public statistics, function runtimes, platform feature flags and signals.' + projects: + id: projects:v00.00.00000 + name: projects + preferred: true + service: + $ref: railway/v00.00.00000/services/projects.yaml + title: Projects API + version: v00.00.00000 + description: Projects and their lifecycle, members, invitations, invite codes, project tokens, permissions, canvas groups and compliance. + services: + id: services:v00.00.00000 + name: services + preferred: true + service: + $ref: railway/v00.00.00000/services/services.yaml + title: Services API + version: v00.00.00000 + description: Services, per-environment service instances (build and deploy configuration, redeploy), resource limits, auto deploy status and edge configuration. + storage: + id: storage:v00.00.00000 + name: storage + preferred: true + service: + $ref: railway/v00.00.00000/services/storage.yaml + title: Storage API + version: v00.00.00000 + description: Volumes, volume instances, backups and backup schedules, point-in-time recovery, and object storage buckets with their credentials. + templates: + id: templates:v00.00.00000 + name: templates + preferred: true + service: + $ref: railway/v00.00.00000/services/templates.yaml + title: Templates API + version: v00.00.00000 + description: 'Templates: search, details, services, metrics, deployment, publishing and workspace templates.' + variables: + id: variables:v00.00.00000 + name: variables + preferred: true + service: + $ref: railway/v00.00.00000/services/variables.yaml + title: Variables API + version: v00.00.00000 + description: 'Service and shared environment variables: rendered values, variable metadata, upsert and delete.' + workspaces: + id: workspaces:v00.00.00000 + name: workspaces + preferred: true + service: + $ref: railway/v00.00.00000/services/workspaces.yaml + title: Workspaces API + version: v00.00.00000 + description: Workspaces, members, access groups, identity providers, trusted domains, policies, audit logs and compliance agreements. +config: + auth: + credentialsenvvar: RAILWAY_TOKEN + type: bearer diff --git a/providers/src/railway/v00.00.00000/services/account.yaml b/providers/src/railway/v00.00.00000/services/account.yaml new file mode 100644 index 00000000..ece4db36 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/account.yaml @@ -0,0 +1,2176 @@ +openapi: 3.0.3 +info: + title: Account API + description: 'The authenticated user: profile, API tokens and the workspaces a token can reach, sessions, passkeys, SSH keys, linked provider accounts and preferences.' + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=api_token_workspaces&__method=list: + post: + operationId: api_token_workspaces_list + summary: Introspect the current API token and its accessible workspaces + description: Introspect the current API token and its accessible workspaces. Backed by the Railway GraphQL query apiToken. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.api_token_workspaces.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.apiToken.workspaces[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: query { apiToken { workspaces { id name } } } + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per ApiTokenWorkspace. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + apiToken: + type: object + properties: + workspaces: + type: array + items: + $ref: '#/components/schemas/ApiTokenWorkspace' + /graphql/v2?__resource=api_tokens&__method=create: + post: + operationId: api_tokens_create + summary: Creates a new API token + description: Creates a new API token. Backed by the Railway GraphQL mutation apiTokenCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + properties: + name: + type: string + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + apiTokenCreate: + $ref: '#/components/schemas/ApiTokenCreateResult' + /graphql/v2?__resource=api_tokens&__method=delete: + post: + operationId: api_tokens_delete + summary: Deletes an API token + description: Deletes an API token. Backed by the Railway GraphQL mutation apiTokenDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + apiTokenDelete: + $ref: '#/components/schemas/ApiTokenDeleteResult' + /graphql/v2?__resource=api_tokens&__method=list: + post: + operationId: api_tokens_list + summary: Gets all API tokens for the authenticated user + description: Gets all API tokens for the authenticated user. Backed by the Railway GraphQL query apiTokens. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.api_tokens.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.apiTokens.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.apiTokens.pageInfo.endCursor + terminateOnJsonPath: $.data.apiTokens.pageInfo.hasNextPage + query: 'query { apiTokens(first: 100{{ .cursor }}) { edges { node { display_token: displayToken expires_at: expiresAt id name workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per ApiToken. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + apiTokens: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/ApiToken' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=bot_scope_bindings&__method=list: + post: + operationId: bot_scope_bindings_list + summary: Railway agent chat bindings (Slack/Discord scope → workspace) across the caller's workspaces + description: Railway agent chat bindings (Slack/Discord scope → workspace) across the caller's workspaces. Backed by the Railway GraphQL query botScopeBindings. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.bot_scope_bindings.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.botScopeBindings[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { botScopeBindings { can_remove: canRemove id platform scope_id: scopeId scope_name: scopeName scope_type: scopeType workspace_id: workspaceId workspace_name: workspaceName } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per BotScopeBindingInfo. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + botScopeBindings: + type: array + items: + $ref: '#/components/schemas/BotScopeBindingInfo' + /graphql/v2?__resource=bot_scope_bindings&__method=remove: + post: + operationId: bot_scope_bindings_remove + summary: Remove a Railway agent chat binding + description: Remove a Railway agent chat binding. Requires admin on the binding's workspace. Backed by the Railway GraphQL mutation botScopeBindingRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + botScopeBindingRemove: + $ref: '#/components/schemas/BotScopeBindingRemoveResult' + /graphql/v2?__resource=current_user&__method=add_feature_flag: + post: + operationId: current_user_add_feature_flag + summary: Add a feature flag for a user + description: Add a feature flag for a user. Backed by the Railway GraphQL mutation featureFlagAdd. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flag + properties: + flag: + type: string + enum: + - ACTIVITY_FEED_HISTORY + - AGENT_BOOTSTRAPS + - AGENT_BYOK + - AGENT_BYOK_ANTHROPIC + - AGENT_BYOK_CHATGPT + - AGENT_BYOK_FIREWORKS + - AGENT_BYOK_OPENAI + - AGENT_BYOK_OPENROUTER + - AGENT_CONNECTORS + - AGENT_TASKS + - BOT_CLOUD_AGENTS + - CHAT_SANDBOX + - CLOUD_AGENTS + - CLOUD_AGENT_BUILDER + - CLOUD_AGENT_CHAT + - CS_MCP_EXPRESS + - EMAIL_FORWARDING + - HA_FOR_MONGO + - IN_DASHBOARD_SUPPORT + - MAGIC_CONFIG + - MYSQL_PITR + - PRIORITY_BOARDING + - RAILWAY_AGENT_DASHBOARD + - RAILWAY_AGENT_FEED + - TRACING + - USAGE_INSIGHTS + - VM_STORAGE_TRACES + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + featureFlagAdd: + $ref: '#/components/schemas/FeatureFlagAddResult' + /graphql/v2?__resource=current_user&__method=delete: + post: + operationId: current_user_delete + summary: Delete the currently authenticated user + description: Delete the currently authenticated user. Backed by the Railway GraphQL mutation userDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + userDelete: + $ref: '#/components/schemas/UserDeleteResult' + /graphql/v2?__resource=current_user&__method=disconnect_discord: + post: + operationId: current_user_disconnect_discord + summary: Disconnect your Railway account from Discord + description: Disconnect your Railway account from Discord. Backed by the Railway GraphQL mutation userDiscordDisconnect. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + userDiscordDisconnect: + $ref: '#/components/schemas/UserDiscordDisconnectResult' + /graphql/v2?__resource=current_user&__method=get: + post: + operationId: current_user_get + summary: Gets the authenticated user + description: Gets the authenticated user. Backed by the Railway GraphQL query me. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.current_user.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { me { agreed_fair_use: agreedFairUse api_token_rate_limit: apiTokenRateLimit { remaining_points: remainingPoints resets_at: resetsAt } avatar created_at: createdAt email feature_flags: featureFlags flags github_provider_id: githubProviderId github_username: githubUsername has2fa: has2FA has_passkeys: hasPasskeys id is_admin: isAdmin is_conductor: isConductor is_verified: isVerified last_login: lastLogin name profile { bio is_public: isPublic website } registration_status: registrationStatus risk_level: riskLevel terms_agreed_on: termsAgreedOn username workspaces { adoption_level: adoptionLevel avatar created_at: createdAt discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id name plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One User row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + me: + $ref: '#/components/schemas/User' + /graphql/v2?__resource=current_user&__method=leave_beta: + post: + operationId: current_user_leave_beta + summary: Unsubscribe from the Beta program + description: Unsubscribe from the Beta program. Backed by the Railway GraphQL mutation userBetaLeave. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + userBetaLeave: + $ref: '#/components/schemas/UserBetaLeaveResult' + /graphql/v2?__resource=current_user&__method=remove_feature_flag: + post: + operationId: current_user_remove_feature_flag + summary: Remove a feature flag for a user + description: Remove a feature flag for a user. Backed by the Railway GraphQL mutation featureFlagRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flag + properties: + flag: + type: string + enum: + - ACTIVITY_FEED_HISTORY + - AGENT_BOOTSTRAPS + - AGENT_BYOK + - AGENT_BYOK_ANTHROPIC + - AGENT_BYOK_CHATGPT + - AGENT_BYOK_FIREWORKS + - AGENT_BYOK_OPENAI + - AGENT_BYOK_OPENROUTER + - AGENT_CONNECTORS + - AGENT_TASKS + - BOT_CLOUD_AGENTS + - CHAT_SANDBOX + - CLOUD_AGENTS + - CLOUD_AGENT_BUILDER + - CLOUD_AGENT_CHAT + - CS_MCP_EXPRESS + - EMAIL_FORWARDING + - HA_FOR_MONGO + - IN_DASHBOARD_SUPPORT + - MAGIC_CONFIG + - MYSQL_PITR + - PRIORITY_BOARDING + - RAILWAY_AGENT_DASHBOARD + - RAILWAY_AGENT_FEED + - TRACING + - USAGE_INSIGHTS + - VM_STORAGE_TRACES + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + featureFlagRemove: + $ref: '#/components/schemas/FeatureFlagRemoveResult' + /graphql/v2?__resource=current_user&__method=remove_flags: + post: + operationId: current_user_remove_flags + summary: Remove a flag on the user + description: Remove a flag on the user. Backed by the Railway GraphQL mutation userFlagsRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flags + properties: + flags: + type: array + items: + type: string + enum: + - BETA + user_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + userFlagsRemove: + $ref: '#/components/schemas/UserFlagsRemoveResult' + /graphql/v2?__resource=current_user&__method=set_flags: + post: + operationId: current_user_set_flags + summary: Set flags on the authenticated user + description: Set flags on the authenticated user. Backed by the Railway GraphQL mutation userFlagsSet. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flags + properties: + flags: + type: array + items: + type: string + enum: + - BETA + user_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + userFlagsSet: + $ref: '#/components/schemas/UserFlagsSetResult' + /graphql/v2?__resource=passkeys&__method=delete: + post: + operationId: passkeys_delete + summary: Deletes a Passkey + description: Deletes a Passkey. Backed by the Railway GraphQL mutation passkeyDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + passkeyDelete: + $ref: '#/components/schemas/PasskeyDeleteResult' + /graphql/v2?__resource=passkeys&__method=list: + post: + operationId: passkeys_list + summary: Gets all passkeys for the authenticated user + description: Gets all passkeys for the authenticated user. Backed by the Railway GraphQL query passkeys. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.passkeys.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.passkeys.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.passkeys.pageInfo.endCursor + terminateOnJsonPath: $.data.passkeys.pageInfo.hasNextPage + query: 'query { passkeys(first: 100{{ .cursor }}) { edges { node { aaguid backed_up: backedUp created_at: createdAt credential_id: credentialId device_name: deviceName device_type: deviceType display_name: displayName id last_used_at: lastUsedAt last_used_device: lastUsedDevice transports updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per Passkey. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + passkeys: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Passkey' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=preferences&__method=get: + post: + operationId: preferences_get + summary: Get the email preferences for a user + description: Get the email preferences for a user. Backed by the Railway GraphQL query preferences. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.preferences.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { preferences{{ if or .token }}({{ if .token }}token: "{{ .token }}" {{ end }}){{ end }} { build_failed_email: buildFailedEmail changelog_email: changelogEmail community_email: communityEmail deploy_crashed_email: deployCrashedEmail ephemeral_environment_email: ephemeralEnvironmentEmail id marketing_email: marketingEmail subprocessor_updates_email: subprocessorUpdatesEmail template_queue_email: templateQueueEmail usage_email: usageEmail } }' + x-stackql-protocol: graphql + parameters: + - name: token + in: query + required: false + schema: + type: string + responses: + '200': + description: One Preferences row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + preferences: + $ref: '#/components/schemas/Preferences' + /graphql/v2?__resource=preferences&__method=update: + post: + operationId: preferences_update + summary: Update the email preferences for a user + description: Update the email preferences for a user. Backed by the Railway GraphQL mutation preferencesUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + build_failed_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + changelog_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + community_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + deploy_crashed_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + ephemeral_environment_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + marketing_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + subprocessor_updates_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + template_queue_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + token: + type: string + usage_email: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + responses: + '200': + description: The Preferences the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + preferencesUpdate: + $ref: '#/components/schemas/Preferences' + /graphql/v2?__resource=provider_auths&__method=list: + post: + operationId: provider_auths_list + summary: Lists ProviderAuth objects of a User + description: Lists ProviderAuth objects of a User. Backed by the Railway GraphQL query me.providerAuths. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.provider_auths.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.me.providerAuths.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.me.providerAuths.pageInfo.endCursor + terminateOnJsonPath: $.data.me.providerAuths.pageInfo.hasNextPage + query: 'query { me { providerAuths(first: 100{{ .cursor }}) { edges { node { email id is_auth_enabled: isAuthEnabled metadata provider user_id: userId } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per ProviderAuth. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + me: + type: object + properties: + providerAuths: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/ProviderAuth' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=provider_auths&__method=remove: + post: + operationId: provider_auths_remove + summary: Deletes a ProviderAuth + description: Deletes a ProviderAuth. Backed by the Railway GraphQL mutation providerAuthRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + providerAuthRemove: + $ref: '#/components/schemas/ProviderAuthRemoveResult' + /graphql/v2?__resource=sessions&__method=delete: + post: + operationId: sessions_delete + summary: Deletes a session + description: Deletes a session. Backed by the Railway GraphQL mutation sessionDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sessionDelete: + $ref: '#/components/schemas/SessionDeleteResult' + /graphql/v2?__resource=sessions&__method=list: + post: + operationId: sessions_list + summary: Gets all sessions for authenticated user + description: Gets all sessions for authenticated user. Backed by the Railway GraphQL query sessions. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.sessions.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.sessions.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.sessions.pageInfo.endCursor + terminateOnJsonPath: $.data.sessions.pageInfo.hasNextPage + query: 'query { sessions(first: 100{{ .cursor }}) { edges { node { created_at: createdAt expired_at: expiredAt id is_current: isCurrent name type updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per Session. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sessions: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Session' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=ssh_public_keys&__method=create: + post: + operationId: ssh_public_keys_create + summary: Creates a new SSH public key + description: Creates a new SSH public key. When workspaceId is provided (or omitted under a workspace-scoped API token, in which case it defaults to the token's workspace), the key is owned by the workspace and can be used by anyone authenticating as that workspace via native SSH; requires workspace ADMIN access. Otherwise the key is owned by the authenticated user. Backed by the Railway GraphQL mutation sshPublicKeyCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - public_key + properties: + name: + type: string + public_key: + type: string + workspace_id: + type: string + responses: + '200': + description: The SshPublicKey the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sshPublicKeyCreate: + $ref: '#/components/schemas/SshPublicKey' + /graphql/v2?__resource=ssh_public_keys&__method=delete: + post: + operationId: ssh_public_keys_delete + summary: Deletes an SSH public key + description: Deletes an SSH public key. Backed by the Railway GraphQL mutation sshPublicKeyDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sshPublicKeyDelete: + $ref: '#/components/schemas/SshPublicKeyDeleteResult' + /graphql/v2?__resource=ssh_public_keys&__method=list: + post: + operationId: ssh_public_keys_list + summary: Gets SSH public keys + description: Gets SSH public keys. If workspaceId is provided, returns the keys owned by that workspace (requires workspace MEMBER access). Under a workspace-scoped API token, workspaceId defaults to the token's workspace when omitted; otherwise returns the authenticated user's personal keys. Backed by the Railway GraphQL query sshPublicKeys. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.ssh_public_keys.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.sshPublicKeys.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.sshPublicKeys.pageInfo.endCursor + terminateOnJsonPath: $.data.sshPublicKeys.pageInfo.hasNextPage + query: 'query { sshPublicKeys(first: 100{{ .cursor }} {{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}) { edges { node { created_at: createdAt fingerprint id name public_key: publicKey updated_at: updatedAt user_id: userId workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per SshPublicKey. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sshPublicKeys: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/SshPublicKey' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=two_factor_info&__method=get: + post: + operationId: two_factor_info_get + summary: Gets the TwoFactorInfo for the authenticated user + description: Gets the TwoFactorInfo for the authenticated user. Backed by the Railway GraphQL query twoFactorInfo. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.two_factor_info.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { twoFactorInfo { has_recovery_codes: hasRecoveryCodes is_verified: isVerified } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One TwoFactorInfo row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + twoFactorInfo: + $ref: '#/components/schemas/TwoFactorInfo' + /graphql/v2?__resource=user_profiles&__method=get: + post: + operationId: user_profiles_get + summary: Get the public profile for a user + description: Get the public profile for a user. Backed by the Railway GraphQL query userProfile. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.account.user_profiles.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { userProfile(username: "{{ .username }}") { avatar created_at: createdAt id name profile { bio is_public: isPublic website } total_deploys: totalDeploys username } }' + x-stackql-protocol: graphql + parameters: + - name: username + in: query + required: true + schema: + type: string + responses: + '200': + description: One UserProfileResponse row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + userProfile: + $ref: '#/components/schemas/UserProfileResponse' + /graphql/v2?__resource=user_profiles&__method=update: + post: + operationId: user_profiles_update + summary: Updates the profile for the authenticated user + description: Updates the profile for the authenticated user. Backed by the Railway GraphQL mutation userProfileUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - is_public + properties: + bio: + type: string + is_public: + type: boolean + website: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + userProfileUpdate: + $ref: '#/components/schemas/UserProfileUpdateResult' +components: + schemas: + ApiToken: + type: object + properties: + display_token: + type: string + expires_at: + type: string + format: date-time + id: + type: string + name: + type: string + workspace_id: + type: string + ApiTokenCreateResult: + type: object + properties: + result: + type: string + description: Value returned by the apiTokenCreate mutation (String!) + ApiTokenDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the apiTokenDelete mutation (Boolean!) + ApiTokenWorkspace: + type: object + properties: + id: + type: string + name: + type: string + BotScopeBindingInfo: + type: object + properties: + can_remove: + type: boolean + id: + type: string + platform: + type: string + scope_id: + type: string + scope_name: + type: string + scope_type: + type: string + workspace_id: + type: string + workspace_name: + type: string + BotScopeBindingRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the botScopeBindingRemove mutation (Boolean!) + FeatureFlagAddResult: + type: object + properties: + result: + type: boolean + description: Value returned by the featureFlagAdd mutation (Boolean!) + FeatureFlagRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the featureFlagRemove mutation (Boolean!) + Passkey: + type: object + properties: + aaguid: + type: string + backed_up: + type: boolean + created_at: + type: string + format: date-time + credential_id: + type: string + device_name: + type: string + device_type: + type: string + display_name: + type: string + id: + type: string + last_used_at: + type: string + format: date-time + last_used_device: + type: string + transports: + type: array + items: + type: string + updated_at: + type: string + format: date-time + PasskeyDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the passkeyDelete mutation (Boolean!) + Preferences: + type: object + properties: + build_failed_email: + type: boolean + changelog_email: + type: boolean + community_email: + type: boolean + deploy_crashed_email: + type: boolean + ephemeral_environment_email: + type: boolean + id: + type: string + marketing_email: + type: boolean + subprocessor_updates_email: + type: boolean + template_queue_email: + type: boolean + usage_email: + type: boolean + ProviderAuth: + type: object + properties: + email: + type: string + id: + type: string + is_auth_enabled: + type: boolean + metadata: + type: object + provider: + type: string + user_id: + type: string + ProviderAuthRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the providerAuthRemove mutation (Boolean!) + Session: + type: object + properties: + created_at: + type: string + format: date-time + expired_at: + type: string + format: date-time + id: + type: string + is_current: + type: boolean + name: + type: string + type: + type: string + enum: + - BROWSER + - CLI + - FORUMS + updated_at: + type: string + format: date-time + SessionDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the sessionDelete mutation (Boolean!) + SshPublicKey: + type: object + properties: + created_at: + type: string + format: date-time + fingerprint: + type: string + id: + type: string + name: + type: string + public_key: + type: string + updated_at: + type: string + format: date-time + user_id: + type: string + workspace_id: + type: string + SshPublicKeyDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the sshPublicKeyDelete mutation (Boolean!) + TwoFactorInfo: + type: object + properties: + has_recovery_codes: + type: boolean + is_verified: + type: boolean + User: + type: object + properties: + agreed_fair_use: + type: boolean + api_token_rate_limit: + type: object + properties: + remaining_points: + type: integer + resets_at: + type: string + description: ApiTokenRateLimit object + avatar: + type: string + created_at: + type: string + format: date-time + email: + type: string + feature_flags: + type: array + items: + type: string + enum: + - ACTIVITY_FEED_HISTORY + - AGENT_BOOTSTRAPS + - AGENT_BYOK + - AGENT_BYOK_ANTHROPIC + - AGENT_BYOK_CHATGPT + - AGENT_BYOK_FIREWORKS + - AGENT_BYOK_OPENAI + - AGENT_BYOK_OPENROUTER + - AGENT_CONNECTORS + - AGENT_TASKS + - BOT_CLOUD_AGENTS + - CHAT_SANDBOX + - CLOUD_AGENTS + - CLOUD_AGENT_BUILDER + - CLOUD_AGENT_CHAT + - CS_MCP_EXPRESS + - EMAIL_FORWARDING + - HA_FOR_MONGO + - IN_DASHBOARD_SUPPORT + - MAGIC_CONFIG + - MYSQL_PITR + - PRIORITY_BOARDING + - RAILWAY_AGENT_DASHBOARD + - RAILWAY_AGENT_FEED + - TRACING + - USAGE_INSIGHTS + - VM_STORAGE_TRACES + flags: + type: array + items: + type: string + enum: + - BETA + github_provider_id: + type: string + github_username: + type: string + has2fa: + type: boolean + has_passkeys: + type: boolean + id: + type: string + is_admin: + type: boolean + is_conductor: + type: boolean + is_verified: + type: boolean + last_login: + type: string + format: date-time + name: + type: string + profile: + type: object + properties: + bio: + type: string + is_public: + type: boolean + website: + type: string + description: UserProfile object + registration_status: + type: string + enum: + - ONBOARDED + - REGISTERED + - WAITLISTED + risk_level: + type: number + terms_agreed_on: + type: string + format: date-time + username: + type: string + workspaces: + type: array + items: + type: object + properties: + adoption_level: + type: number + avatar: + type: string + created_at: + type: string + format: date-time + discord_role: + type: string + has2fa_enforcement: + type: boolean + description: Whether 2FA enforcement is enabled for this workspace. + has_automatic_diagnosis: + type: boolean + description: Whether automatic deployment diagnosis is enabled for this workspace. + has_guardrails_access: + type: boolean + description: Whether this workspace has access to guardrails policies. + has_hipaa_baa: + type: boolean + description: Whether this workspace has a signed HIPAA Business Associate Agreement, from either the legacy hasBAA flag or the HIPAA_BAA spend commitment feature. + has_saml: + type: boolean + id: + type: string + name: + type: string + plan: + type: string + enum: + - FREE + - HOBBY + - PRO + preferred_region: + type: string + project_count: + type: integer + description: Total number of projects in this workspace. Used by the dashboard to show an exact count without paginating through every project. + redacted_due_to2fa_pending: + type: boolean + description: Whether the current user's access is redacted due to pending 2FA requirement. Returns true if the user is a workspace member, workspace has 2FA enforcement enabled, and the current user needs to enable 2FA. + restrict_project_visibility_to_groups: + type: boolean + slack_channel_id: + type: string + subscription_plan_limit: + type: object + updated_at: + type: string + format: date-time + users_without2fa: + type: array + items: + type: string + description: Get a list of user emails in the workspace who do not have verified 2FA enabled. Returns an empty array if all users have 2FA enabled. + description: Workspaces user is member of + UserBetaLeaveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the userBetaLeave mutation (Boolean!) + UserDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the userDelete mutation (Boolean!) + UserDiscordDisconnectResult: + type: object + properties: + result: + type: boolean + description: Value returned by the userDiscordDisconnect mutation (Boolean!) + UserFlagsRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the userFlagsRemove mutation (Boolean!) + UserFlagsSetResult: + type: object + properties: + result: + type: boolean + description: Value returned by the userFlagsSet mutation (Boolean!) + UserProfileResponse: + type: object + properties: + avatar: + type: string + created_at: + type: string + format: date-time + id: + type: string + name: + type: string + profile: + type: object + properties: + bio: + type: string + is_public: + type: boolean + website: + type: string + description: UserProfile object + total_deploys: + type: integer + username: + type: string + UserProfileUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the userProfileUpdate mutation (Boolean!) + x-stackQL-resources: + api_token_workspaces: + id: railway.account.api_token_workspaces + name: api_token_workspaces + title: Api Token Workspaces + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=api_token_workspaces&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.apiToken.workspaces + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/api_token_workspaces/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + api_tokens: + id: railway.account.api_tokens + name: api_tokens + title: Api Tokens + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=api_tokens&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String!, $workspace_id: String) { apiTokenCreate(input: { name: $name, workspaceId: $workspace_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.apiTokenCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"apiTokenCreate":{"result":{{ toJson (index (index . "data") "apiTokenCreate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=api_tokens&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { apiTokenDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.apiTokenDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"apiTokenDelete":{"result":{{ toJson (index (index . "data") "apiTokenDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=api_tokens&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.apiTokens.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "apiTokens" -}}{"data":{"apiTokens":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/api_tokens/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/api_tokens/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/api_tokens/methods/delete' + replace: [] + bot_scope_bindings: + id: railway.account.bot_scope_bindings + name: bot_scope_bindings + title: Bot Scope Bindings + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=bot_scope_bindings&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.botScopeBindings + x-stackql-protocol: graphql + remove: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=bot_scope_bindings&__method=remove/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { botScopeBindingRemove(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.botScopeBindingRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"botScopeBindingRemove":{"result":{{ toJson (index (index . "data") "botScopeBindingRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/bot_scope_bindings/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/bot_scope_bindings/methods/remove' + replace: [] + current_user: + id: railway.account.current_user + name: current_user + title: Current User + methods: + add_feature_flag: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=add_feature_flag/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flag: ActiveFeatureFlag!) { featureFlagAdd(input: { flag: $flag }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.featureFlagAdd + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"featureFlagAdd":{"result":{{ toJson (index (index . "data") "featureFlagAdd") }}}}}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation { userDelete }","variables":{ }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.userDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"userDelete":{"result":{{ toJson (index (index . "data") "userDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + disconnect_discord: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=disconnect_discord/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation { userDiscordDisconnect }","variables":{ }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.userDiscordDisconnect + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"userDiscordDisconnect":{"result":{{ toJson (index (index . "data") "userDiscordDisconnect") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.me + x-stackql-protocol: graphql + leave_beta: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=leave_beta/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation { userBetaLeave }","variables":{ }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.userBetaLeave + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"userBetaLeave":{"result":{{ toJson (index (index . "data") "userBetaLeave") }}}}}{{- end -}}' + x-stackql-protocol: graphql + remove_feature_flag: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=remove_feature_flag/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flag: ActiveFeatureFlag!) { featureFlagRemove(input: { flag: $flag }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.featureFlagRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"featureFlagRemove":{"result":{{ toJson (index (index . "data") "featureFlagRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + remove_flags: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=remove_flags/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flags: [UserFlag!]!, $user_id: String) { userFlagsRemove(input: { flags: $flags, userId: $user_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flags" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flags":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.userFlagsRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"userFlagsRemove":{"result":{{ toJson (index (index . "data") "userFlagsRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + set_flags: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=current_user&__method=set_flags/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flags: [UserFlag!]!, $user_id: String) { userFlagsSet(input: { flags: $flags, userId: $user_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flags" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flags":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.userFlagsSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"userFlagsSet":{"result":{{ toJson (index (index . "data") "userFlagsSet") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/current_user/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + passkeys: + id: railway.account.passkeys + name: passkeys + title: Passkeys + methods: + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=passkeys&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { passkeyDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.passkeyDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"passkeyDelete":{"result":{{ toJson (index (index . "data") "passkeyDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=passkeys&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.passkeys.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "passkeys" -}}{"data":{"passkeys":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/passkeys/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/passkeys/methods/delete' + replace: [] + preferences: + id: railway.account.preferences + name: preferences + title: Preferences + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=preferences&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.preferences + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=preferences&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($build_failed_email: Boolean, $changelog_email: Boolean, $community_email: Boolean, $deploy_crashed_email: Boolean, $ephemeral_environment_email: Boolean, $marketing_email: Boolean, $subprocessor_updates_email: Boolean, $template_queue_email: Boolean, $token: String, $usage_email: Boolean) { preferencesUpdate(input: { buildFailedEmail: $build_failed_email, changelogEmail: $changelog_email, communityEmail: $community_email, deployCrashedEmail: $deploy_crashed_email, ephemeralEnvironmentEmail: $ephemeral_environment_email, marketingEmail: $marketing_email, subprocessorUpdatesEmail: $subprocessor_updates_email, templateQueueEmail: $template_queue_email, token: $token, usageEmail: $usage_email }) { build_failed_email: buildFailedEmail changelog_email: changelogEmail community_email: communityEmail deploy_crashed_email: deployCrashedEmail ephemeral_environment_email: ephemeralEnvironmentEmail id marketing_email: marketingEmail subprocessor_updates_email: subprocessorUpdatesEmail template_queue_email: templateQueueEmail usage_email: usageEmail } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "build_failed_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"build_failed_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "changelog_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"changelog_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "community_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"community_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "deploy_crashed_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"deploy_crashed_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "ephemeral_environment_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ephemeral_environment_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "marketing_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"marketing_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "subprocessor_updates_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"subprocessor_updates_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "template_queue_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"template_queue_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "token" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"token":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "usage_email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"usage_email":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.preferencesUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/preferences/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + provider_auths: + id: railway.account.provider_auths + name: provider_auths + title: Provider Auths + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=provider_auths&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.me.providerAuths.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "me" "providerAuths" -}}{"data":{"me":{"providerAuths":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + remove: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=provider_auths&__method=remove/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { providerAuthRemove(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.providerAuthRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"providerAuthRemove":{"result":{{ toJson (index (index . "data") "providerAuthRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/provider_auths/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/provider_auths/methods/remove' + replace: [] + sessions: + id: railway.account.sessions + name: sessions + title: Sessions + methods: + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sessions&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { sessionDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sessionDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"sessionDelete":{"result":{{ toJson (index (index . "data") "sessionDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sessions&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.sessions.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "sessions" -}}{"data":{"sessions":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sessions/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/sessions/methods/delete' + replace: [] + ssh_public_keys: + id: railway.account.ssh_public_keys + name: ssh_public_keys + title: Ssh Public Keys + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=ssh_public_keys&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String!, $public_key: String!, $workspace_id: String) { sshPublicKeyCreate(input: { name: $name, publicKey: $public_key, workspaceId: $workspace_id }) { created_at: createdAt fingerprint id name public_key: publicKey updated_at: updatedAt user_id: userId workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "public_key" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"public_key":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sshPublicKeyCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=ssh_public_keys&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { sshPublicKeyDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sshPublicKeyDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"sshPublicKeyDelete":{"result":{{ toJson (index (index . "data") "sshPublicKeyDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=ssh_public_keys&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.sshPublicKeys.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "sshPublicKeys" -}}{"data":{"sshPublicKeys":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/ssh_public_keys/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/ssh_public_keys/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/ssh_public_keys/methods/delete' + replace: [] + two_factor_info: + id: railway.account.two_factor_info + name: two_factor_info + title: Two Factor Info + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=two_factor_info&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.twoFactorInfo + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/two_factor_info/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + user_profiles: + id: railway.account.user_profiles + name: user_profiles + title: User Profiles + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=user_profiles&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.userProfile + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=user_profiles&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($bio: String, $is_public: Boolean!, $website: String) { userProfileUpdate(input: { bio: $bio, isPublic: $is_public, website: $website }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "bio" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"bio":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "is_public" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"is_public":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "website" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"website":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.userProfileUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"userProfileUpdate":{"result":{{ toJson (index (index . "data") "userProfileUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/user_profiles/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/user_profiles/methods/update' + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/agents.yaml b/providers/src/railway/v00.00.00000/services/agents.yaml new file mode 100644 index 00000000..b6746be3 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/agents.yaml @@ -0,0 +1,2478 @@ +openapi: 3.0.3 +info: + title: Agents and Sandboxes API + description: Cloud agents, their tasks and checkpoints, and sandboxes with their sessions, checkpoints and template builds. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=cloud_agent_checkpoints&__method=create: + post: + operationId: cloud_agent_checkpoints_create + summary: Checkpoint the agent's disk + description: Checkpoint the agent's disk. Poll cloudAgentCheckpoint until SUCCEEDED. Backed by the Railway GraphQL mutation cloudAgentCheckpointCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + name: + type: string + responses: + '200': + description: The CloudAgentCheckpoint the mutation returns. A checkpoint of a cloud agent's disk. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentCheckpointCreate: + $ref: '#/components/schemas/CloudAgentCheckpoint' + /graphql/v2?__resource=cloud_agent_checkpoints&__method=delete: + post: + operationId: cloud_agent_checkpoints_delete + summary: Delete a checkpoint + description: Delete a checkpoint. Backed by the Railway GraphQL mutation cloudAgentCheckpointDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentCheckpointDelete: + $ref: '#/components/schemas/CloudAgentCheckpointDeleteResult' + /graphql/v2?__resource=cloud_agent_checkpoints&__method=get: + post: + operationId: cloud_agent_checkpoints_get + summary: A cloud agent checkpoint by ID + description: A cloud agent checkpoint by ID. Backed by the Railway GraphQL query cloudAgentCheckpoint. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agent_checkpoints.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { cloudAgentCheckpoint(id: "{{ .id }}") { created_at: createdAt environment_id: environmentId failure_reason: failureReason id name region status } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One CloudAgentCheckpoint row. A checkpoint of a cloud agent's disk. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentCheckpoint: + $ref: '#/components/schemas/CloudAgentCheckpoint' + /graphql/v2?__resource=cloud_agent_checkpoints&__method=list: + post: + operationId: cloud_agent_checkpoints_list + summary: Cloud agent checkpoints in an environment, newest first + description: Cloud agent checkpoints in an environment, newest first. Backed by the Railway GraphQL query cloudAgentCheckpoints. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agent_checkpoints.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.cloudAgentCheckpoints.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.cloudAgentCheckpoints.pageInfo.endCursor + terminateOnJsonPath: $.data.cloudAgentCheckpoints.pageInfo.hasNextPage + query: 'query { cloudAgentCheckpoints(first: 100{{ .cursor }} environmentId: "{{ .environment_id }}") { edges { node { created_at: createdAt environment_id: environmentId failure_reason: failureReason id name region status } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per CloudAgentCheckpoint. A checkpoint of a cloud agent's disk. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentCheckpoints: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/CloudAgentCheckpoint' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=cloud_agent_console_sessions&__method=list: + post: + operationId: cloud_agent_console_sessions_list + summary: Shell and exec sessions running on a cloud agent's VM that you can reconnect to + description: Shell and exec sessions running on a cloud agent's VM that you can reconnect to. Null if the agent has no running machine. Backed by the Railway GraphQL query cloudAgentConsoleSessions. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agent_console_sessions.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.cloudAgentConsoleSessions.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.cloudAgentConsoleSessions.pageInfo.endCursor + terminateOnJsonPath: $.data.cloudAgentConsoleSessions.pageInfo.hasNextPage + query: 'query { cloudAgentConsoleSessions(first: 100{{ .cursor }} cloudAgentId: "{{ .cloud_agent_id }}") { edges { node { attached command created_at: createdAt foreground_active: foregroundActive kind name run_state: runState { exit_code: exitCode exited_at: exitedAt running } } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: cloud_agent_id + in: query + required: true + schema: + type: string + responses: + '200': + description: 'One row per SandboxSession. A resumable session inside a sandbox: an interactive shell or a one-off exec command.' + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentConsoleSessions: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/SandboxSession' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=cloud_agent_task_results&__method=get: + post: + operationId: cloud_agent_task_results_get + summary: Read the latest task on an agent/session without waking the VM + description: Read the latest task on an agent/session without waking the VM. Backed by the Railway GraphQL query cloudAgentTask. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agent_task_results.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { cloudAgentTask(cloudAgentId: "{{ .cloud_agent_id }}" sessionId: "{{ .session_id }}") { cloud_agent_id: cloudAgentId completed_at: completedAt error external_ref: externalRef metadata session_id: sessionId session_state: sessionState status structured_output: structuredOutput task_id: taskId text } }' + x-stackql-protocol: graphql + parameters: + - name: cloud_agent_id + in: query + required: true + schema: + type: string + - name: session_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One CloudAgentTaskResult row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentTask: + $ref: '#/components/schemas/CloudAgentTaskResult' + /graphql/v2?__resource=cloud_agent_task_results&__method=recover: + post: + operationId: cloud_agent_task_results_recover + summary: Recover the latest task response from the agent + description: Recover the latest task response from the agent. May wake the VM. Backed by the Railway GraphQL mutation cloudAgentTaskRecover. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - cloud_agent_id + - session_id + properties: + cloud_agent_id: + type: string + session_id: + type: string + responses: + '200': + description: The CloudAgentTaskResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentTaskRecover: + $ref: '#/components/schemas/CloudAgentTaskResult' + /graphql/v2?__resource=cloud_agent_tasks&__method=dispatch: + post: + operationId: cloud_agent_tasks_dispatch + summary: Start a task and return its handle + description: Start a task and return its handle. Creates a fresh agent by default; replyToTaskId continues the original conversation. Backed by the Railway GraphQL mutation cloudAgentTaskDispatch. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - prompt + properties: + agent_name: + type: string + cloud_agent_id: + type: string + description: Explicit agent reuse. Omit all targets to create a fresh agent. + environment_id: + type: string + external_ref: + type: string + idempotency_key: + type: string + metadata: + type: object + mode: + type: string + enum: + - FOLLOW_UP + - PROMPT + - STEER + output_schema: + type: object + description: JSON Schema object for structured output; requires PROMPT mode. + project_id: + type: string + prompt: + type: string + reply_to_task_id: + type: string + description: Continue this task's original agent/session. Mutually exclusive with cloudAgentId/sessionId. + session_id: + type: string + description: Existing session to continue; requires cloudAgentId. + source: + type: object + description: JSON object of GraphQL type CloudAgentSourceInput; keys keep the API's camelCase names. + webhook_secret: + type: string + webhook_url: + type: string + responses: + '200': + description: The CloudAgentTaskHandle the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentTaskDispatch: + $ref: '#/components/schemas/CloudAgentTaskHandle' + /graphql/v2?__resource=cloud_agent_tasks&__method=list: + post: + operationId: cloud_agent_tasks_list + summary: List task lifecycle records in an environment, newest first + description: List task lifecycle records in an environment, newest first. Backed by the Railway GraphQL query cloudAgentTasks. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agent_tasks.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.cloudAgentTasks.tasks[*] + cursor: + strategy: page_info + jsonPath: $.data.cloudAgentTasks.nextCursor + terminateOnJsonPath: $.data.cloudAgentTasks.nextCursor + format: 'cursor: "{{ .value }}" ' + query: 'query { cloudAgentTasks({{ .cursor }} environmentId: "{{ .environment_id }}" {{ if .status }}status: {{ .status }} {{ end }}) { tasks { cloud_agent_id: cloudAgentId completed_at: completedAt created_at: createdAt created_via: createdVia error external_ref: externalRef id metadata prompt_preview: promptPreview requested_by_user_id: requestedByUserId session_id: sessionId started_at: startedAt status } nextCursor } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: status + in: query + required: false + schema: + type: string + enum: + - AWAITING_INPUT + - COMPLETED + - FAILED + - PENDING + - RUNNING + responses: + '200': + description: One row per CloudAgentTask. Task lifecycle and correlation. Read cloudAgentTask for the latest session response. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentTasks: + type: object + properties: + tasks: + type: array + items: + $ref: '#/components/schemas/CloudAgentTask' + nextCursor: + type: string + /graphql/v2?__resource=cloud_agents&__method=create: + post: + operationId: cloud_agents_create + summary: Create a cloud agent + description: Create a cloud agent. Backed by the Railway GraphQL mutation cloudAgentCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + properties: + cloud_agent_checkpoint_id: + type: string + description: Create the cloud agent from an existing checkpoint. + code_endpoint: + type: object + description: Provision a code-* domain. Omit to disable, including when restoring a checkpoint or bootstrap. JSON object of GraphQL type CloudAgentCodeEndpointInput; keys keep the API's camelCase names. + environment_id: + type: string + name: + type: string + region: + type: string + description: Region to run the agent in, e.g. us-west2. Defaults to the checkpoint's region when booting from one, else the workspace's preferred region. + source: + type: object + description: JSON object of GraphQL type CloudAgentSourceInput; keys keep the API's camelCase names. + variables: + type: object + responses: + '200': + description: The CloudAgent the mutation returns. A persistent cloud agent for running coding harnesses. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentCreate: + $ref: '#/components/schemas/CloudAgent' + /graphql/v2?__resource=cloud_agents&__method=delete: + post: + operationId: cloud_agents_delete + summary: Delete a cloud agent + description: Delete a cloud agent. Backed by the Railway GraphQL mutation cloudAgentDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentDelete: + $ref: '#/components/schemas/CloudAgentDeleteResult' + /graphql/v2?__resource=cloud_agents&__method=deploy: + post: + operationId: cloud_agents_deploy + summary: Build the agent's code inside its own VM and deploy it + description: 'Build the agent''s code inside its own VM and deploy it. Creates the named service (default: the agent''s name) or reuses it. Needs an agent booted with the builder. Backed by the Railway GraphQL mutation cloudAgentDeploy.' + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + path: + type: string + regions: + type: object + description: 'Replicas per region, e.g. { "us-west2": 3 }. Saved on the service; omit to keep its current regions.' + service_name: + type: string + responses: + '200': + description: The CloudAgentDeployResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentDeploy: + $ref: '#/components/schemas/CloudAgentDeployResult' + /graphql/v2?__resource=cloud_agents&__method=fork: + post: + operationId: cloud_agents_fork + summary: Duplicate a running cloud agent + description: Duplicate a running cloud agent. Backed by the Railway GraphQL mutation cloudAgentFork. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + name: + type: string + variables: + type: object + responses: + '200': + description: The CloudAgent the mutation returns. A persistent cloud agent for running coding harnesses. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentFork: + $ref: '#/components/schemas/CloudAgent' + /graphql/v2?__resource=cloud_agents&__method=get: + post: + operationId: cloud_agents_get + summary: A cloud agent by ID, within an environment + description: A cloud agent by ID, within an environment. Null when the agent belongs to another one, so a caller cannot render an agent it has switched away from. Backed by the Railway GraphQL query cloudAgent. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agents.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { cloudAgent(environmentId: "{{ .environment_id }}" id: "{{ .id }}") { agent_ws_url: agentWsUrl console_target_id: consoleTargetId created_at: createdAt domain domains { domain port prefix } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId region sessions { harness last_event_kind: lastEventKind latest_prompt: latestPrompt prompt session_id: sessionId session_name: sessionName state task_id: taskId terminal title updated_at: updatedAt } source { branch dir repo service_id: serviceId status } status } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One CloudAgent row. A persistent cloud agent for running coding harnesses. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgent: + $ref: '#/components/schemas/CloudAgent' + /graphql/v2?__resource=cloud_agents&__method=harness_token: + post: + operationId: cloud_agents_harness_token + summary: Mint a short-lived (5m) JWT for the agent's harness WebSocket (see agentWsUrl) + description: Mint a short-lived (5m) JWT for the agent's harness WebSocket (see agentWsUrl). The in-VM gate verifies signature/exp/aud and pins it to this agent. Mint one per dial; the token only has to survive the upgrade. Backed by the Railway GraphQL mutation cloudAgentHarnessToken. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - id + properties: + environment_id: + type: string + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentHarnessToken: + $ref: '#/components/schemas/CloudAgentHarnessTokenResult' + /graphql/v2?__resource=cloud_agents&__method=list: + post: + operationId: cloud_agents_list + summary: Cloud agents in an environment + description: Cloud agents in an environment. Backed by the Railway GraphQL query cloudAgents. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agents.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.cloudAgents[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { cloudAgents(environmentId: "{{ .environment_id }}" {{ if .mine }}mine: {{ .mine }} {{ end }}) { agent_ws_url: agentWsUrl console_target_id: consoleTargetId created_at: createdAt domain domains { domain port prefix } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId region sessions { harness last_event_kind: lastEventKind latest_prompt: latestPrompt prompt session_id: sessionId session_name: sessionName state task_id: taskId terminal title updated_at: updatedAt } source { branch dir repo service_id: serviceId status } status } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: mine + in: query + required: false + description: Return only the agents that belong to you. By default every agent in the environment is returned, including your teammates'. + schema: + type: boolean + responses: + '200': + description: One row per CloudAgent. A persistent cloud agent for running coding harnesses. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgents: + type: array + items: + $ref: '#/components/schemas/CloudAgent' + /graphql/v2?__resource=cloud_agents&__method=list_mine: + post: + operationId: cloud_agents_list_mine + summary: Cloud agents you own, across every project and environment you can reach + description: Cloud agents you own, across every project and environment you can reach. Answers "where are my agents" in one request; `cloudAgents` needs one call per environment. Machine fields (`status`, `domain`, `domains`) read the last observed state in batched queries, so selecting them across many environments is fine. Backed by the Railway GraphQL query myCloudAgents. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.cloud_agents.list_mine + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.myCloudAgents[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { myCloudAgents { agent_ws_url: agentWsUrl console_target_id: consoleTargetId created_at: createdAt domain domains { domain port prefix } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId region sessions { harness last_event_kind: lastEventKind latest_prompt: latestPrompt prompt session_id: sessionId session_name: sessionName state task_id: taskId terminal title updated_at: updatedAt } source { branch dir repo service_id: serviceId status } status } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per CloudAgent. A persistent cloud agent for running coding harnesses. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + myCloudAgents: + type: array + items: + $ref: '#/components/schemas/CloudAgent' + /graphql/v2?__resource=cloud_agents&__method=sleep: + post: + operationId: cloud_agents_sleep + summary: Sleep a running cloud agent, keeping its volume + description: Sleep a running cloud agent, keeping its volume. Processes on the machine are terminated; waking re-runs its entrypoint. Backed by the Railway GraphQL mutation cloudAgentSleep. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The CloudAgent the mutation returns. A persistent cloud agent for running coding harnesses. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentSleep: + $ref: '#/components/schemas/CloudAgent' + /graphql/v2?__resource=cloud_agents&__method=wake: + post: + operationId: cloud_agents_wake + summary: Wake a sleeping cloud agent + description: Wake a sleeping cloud agent. Backed by the Railway GraphQL mutation cloudAgentWake. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The CloudAgent the mutation returns. A persistent cloud agent for running coding harnesses. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cloudAgentWake: + $ref: '#/components/schemas/CloudAgent' + /graphql/v2?__resource=sandbox_checkpoints&__method=create: + post: + operationId: sandbox_checkpoints_create + summary: Capture a running sandbox's current disk into a reusable, named checkpoint + description: 'Capture a running sandbox''s current disk into a reusable, named checkpoint. Synchronous: the checkpoint is ready when this returns. Backed by the Railway GraphQL mutation sandboxCheckpointCreate.' + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - name + - sandbox_id + properties: + environment_id: + type: string + name: + type: string + sandbox_id: + type: string + responses: + '200': + description: The SandboxCheckpoint the mutation returns. A bootable snapshot of a sandbox's disk, scoped to an environment. Built from a template recipe or captured from a running sandbox. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxCheckpointCreate: + $ref: '#/components/schemas/SandboxCheckpoint' + /graphql/v2?__resource=sandbox_checkpoints&__method=delete: + post: + operationId: sandbox_checkpoints_delete + summary: Delete a sandbox checkpoint + description: Delete a sandbox checkpoint. Backed by the Railway GraphQL mutation sandboxCheckpointDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - id + properties: + environment_id: + type: string + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxCheckpointDelete: + $ref: '#/components/schemas/SandboxCheckpointDeleteResult' + /graphql/v2?__resource=sandbox_checkpoints&__method=list: + post: + operationId: sandbox_checkpoints_list + summary: List named sandbox checkpoints in an environment + description: List named sandbox checkpoints in an environment. Backed by the Railway GraphQL query sandboxCheckpoints. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.sandbox_checkpoints.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.sandboxCheckpoints[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { sandboxCheckpoints(environmentId: "{{ .environment_id }}") { created_at: createdAt environment_id: environmentId id key } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per SandboxCheckpoint. A bootable snapshot of a sandbox's disk, scoped to an environment. Built from a template recipe or captured from a running sandbox. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxCheckpoints: + type: array + items: + $ref: '#/components/schemas/SandboxCheckpoint' + /graphql/v2?__resource=sandbox_checkpoints&__method=rename: + post: + operationId: sandbox_checkpoints_rename + summary: Rename a sandbox checkpoint + description: Rename a sandbox checkpoint. Backed by the Railway GraphQL mutation sandboxCheckpointRename. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - id + - name + properties: + environment_id: + type: string + id: + type: string + name: + type: string + responses: + '200': + description: The SandboxCheckpoint the mutation returns. A bootable snapshot of a sandbox's disk, scoped to an environment. Built from a template recipe or captured from a running sandbox. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxCheckpointRename: + $ref: '#/components/schemas/SandboxCheckpoint' + /graphql/v2?__resource=sandbox_sessions&__method=list: + post: + operationId: sandbox_sessions_list + summary: Resumable sessions inside a sandbox — interactive shells and one-off exec commands, live or recently exited + description: Resumable sessions inside a sandbox — interactive shells and one-off exec commands, live or recently exited. Null when the sandbox can't report them (e.g. its vm-init predates session listing). Backed by the Railway GraphQL query sandboxSessions. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.sandbox_sessions.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.sandboxSessions.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.sandboxSessions.pageInfo.endCursor + terminateOnJsonPath: $.data.sandboxSessions.pageInfo.hasNextPage + query: 'query { sandboxSessions(first: 100{{ .cursor }} environmentId: "{{ .environment_id }}" id: "{{ .id }}") { edges { node { attached command created_at: createdAt foreground_active: foregroundActive kind name run_state: runState { exit_code: exitCode exited_at: exitedAt running } } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: 'One row per SandboxSession. A resumable session inside a sandbox: an interactive shell or a one-off exec command.' + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxSessions: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/SandboxSession' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=sandbox_template_builds&__method=create: + post: + operationId: sandbox_template_builds_create + summary: Build a sandbox template into a bootable checkpoint + description: Build a sandbox template into a bootable checkpoint. Backed by the Railway GraphQL mutation sandboxTemplateBuild. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + properties: + environment_id: + type: string + instructions: + type: array + items: + type: string + description: Build a template by running these shell instructions on the base image. Mutually exclusive with name. + name: + type: string + description: Boot from a saved checkpoint with this name (one captured from a sandbox). Mutually exclusive with instructions. + region: + type: string + description: Placement region for the build sandbox. The resulting checkpoint lives in this region, and sandboxes created from the template boot there. Defaults to the platform default; only the cold build consults it (a built template's own region wins). + variables: + type: object + description: Environment variables available to the template's build instructions. Values may contain Railway variable references (e.g. ${{shared.FOO}}, ${{ServiceName.BAR}}), resolved at build time. + responses: + '200': + description: The SandboxTemplateBuild the mutation returns. The state of a template build, derived from its workflow and the existence of its checkpoint. READY means the checkpoint exists and can be booted. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxTemplateBuild: + $ref: '#/components/schemas/SandboxTemplateBuild' + /graphql/v2?__resource=sandbox_template_builds&__method=get: + post: + operationId: sandbox_template_builds_get + summary: Get a template's build state by id (the recipe content hash) + description: Get a template's build state by id (the recipe content hash). READY once its checkpoint exists; BUILDING/FAILED reflect the build workflow. Backed by the Railway GraphQL query sandboxTemplateBuild. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.sandbox_template_builds.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { sandboxTemplateBuild(environmentId: "{{ .environment_id }}" id: "{{ .id }}") { environment_id: environmentId id status } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One SandboxTemplateBuild row. The state of a template build, derived from its workflow and the existence of its checkpoint. READY means the checkpoint exists and can be booted. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxTemplateBuild: + $ref: '#/components/schemas/SandboxTemplateBuild' + /graphql/v2?__resource=sandboxes&__method=create: + post: + operationId: sandboxes_create + summary: Create a sandbox in an environment + description: Create a sandbox in an environment. Backed by the Railway GraphQL mutation sandboxCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + properties: + environment_id: + type: string + idle_timeout_minutes: + type: integer + description: Minutes of inactivity before the sandbox is destroyed. Any value <= 0 means never idle out (plan-gated). Defaults to the plan's default idle timeout. + network_isolation: + type: string + enum: + - ISOLATED + - PRIVATE + description: Network access for the sandbox. Defaults to ISOLATED (no private network access). Public domains require PRIVATE to be selected explicitly. + public_domains: + type: array + items: + type: object + description: Railway-provided HTTP domains to publish, one per unique prefix and port. Supports up to 10 and requires explicitly selecting PRIVATE networking. Domain prefixes are generated when omitted. JSON array of objects of GraphQL type SandboxDomainInput; keys keep the API's camelCase names. + region: + type: string + description: Region to place the sandbox in (e.g. us-west2, us-east4-eqdc4a). Defaults to the platform default region when omitted. + resources: + type: object + description: Creation-time CPU and memory, including for forks and checkpoint restores. Each omitted or null field uses the workspace's sandbox default; explicit values must not exceed its independent VM maximum. JSON object of GraphQL type SandboxResourcesInput; keys keep the API's camelCase names. + source_sandbox_id: + type: string + description: Fork an existing running sandbox in this environment. Mutually exclusive with template. + template: + type: object + description: JSON object of GraphQL type SandboxTemplateInput; keys keep the API's camelCase names. + variables: + type: object + description: Environment variables baked into the sandbox, available to every command. Values may contain Railway variable references (e.g. ${{shared.FOO}}, ${{ServiceName.BAR}}), resolved at create time. + responses: + '200': + description: The Sandbox the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxCreate: + $ref: '#/components/schemas/Sandbox' + /graphql/v2?__resource=sandboxes&__method=destroy: + post: + operationId: sandboxes_destroy + summary: Destroy a sandbox + description: Destroy a sandbox. Backed by the Railway GraphQL mutation sandboxDestroy. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - id + properties: + environment_id: + type: string + id: + type: string + responses: + '200': + description: The Sandbox the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxDestroy: + $ref: '#/components/schemas/Sandbox' + /graphql/v2?__resource=sandboxes&__method=exec: + post: + operationId: sandboxes_exec + summary: Execute a command inside a running sandbox + description: Execute a command inside a running sandbox. Backed by the Railway GraphQL mutation sandboxExec. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - command + - environment_id + - id + properties: + command: + type: string + environment_id: + type: string + id: + type: string + timeout_sec: + type: string + description: Integer passed as a string, for example '1'. + responses: + '200': + description: The SandboxExecResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxExec: + $ref: '#/components/schemas/SandboxExecResult' + /graphql/v2?__resource=sandboxes&__method=get: + post: + operationId: sandboxes_get + summary: Get a sandbox by id + description: Get a sandbox by id. Backed by the Railway GraphQL query sandbox. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.sandboxes.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { sandbox(environmentId: "{{ .environment_id }}" id: "{{ .id }}") { created_at: createdAt domains { domain port prefix } environment_id: environmentId id idle_timeout_minutes: idleTimeoutMinutes network_isolation: networkIsolation region status } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One Sandbox row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandbox: + $ref: '#/components/schemas/Sandbox' + /graphql/v2?__resource=sandboxes&__method=heartbeat: + post: + operationId: sandboxes_heartbeat + summary: Extend a sandbox's lifetime + description: Extend a sandbox's lifetime. Backed by the Railway GraphQL mutation sandboxHeartbeat. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - id + properties: + environment_id: + type: string + id: + type: string + responses: + '200': + description: The Sandbox the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxHeartbeat: + $ref: '#/components/schemas/Sandbox' + /graphql/v2?__resource=sandboxes&__method=list: + post: + operationId: sandboxes_list + summary: List sandboxes in an environment, newest first + description: List sandboxes in an environment, newest first. Passing first/after paginates; omitting them returns the full list. Backed by the Railway GraphQL query sandboxes. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.agents.sandboxes.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.sandboxes.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.sandboxes.pageInfo.endCursor + terminateOnJsonPath: $.data.sandboxes.pageInfo.hasNextPage + query: 'query { sandboxes(first: 100{{ .cursor }} {{ if .active }}active: {{ .active }} {{ end }}environmentId: "{{ .environment_id }}") { edges { node { created_at: createdAt domains { domain port prefix } environment_id: environmentId id idle_timeout_minutes: idleTimeoutMinutes network_isolation: networkIsolation region status } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: active + in: query + required: false + description: true = live sandboxes only (excludes destroyed; FAILED and transitional states are still included), false = destroyed only, omitted = all. + schema: + type: boolean + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Sandbox. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sandboxes: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Sandbox' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string +components: + schemas: + CloudAgent: + type: object + properties: + agent_ws_url: + type: string + description: 'WebSocket endpoint of the in-VM harness gate, for the dashboard chat. Survives sleep: the domain is stable across sleep and wake. Prefers the machine observation; when that carries no gate domain it falls back to the domain network-cp actively serves, so an agent whose observation lagged still offers chat. Null on agents created before the gate existed, or asleep/absent machines.' + console_target_id: + type: string + description: Target ID for console or command execution. Null while unavailable. + created_at: + type: string + format: date-time + domain: + type: string + description: The agent machine's public HTTP domain (port 8080) — the live preview. Prefers the observation (falling back to the first declared domain when 8080 was never requested); when the observation carries no domains it falls back to the domain network-cp actively serves on 8080, so a preview shows even when the observation lagged. Returns null while the machine sleeps. + domains: + type: array + items: + type: object + properties: + domain: + type: string + description: Resolved FQDN. + port: + type: integer + description: Target port on the workload this domain routes to. + prefix: + type: string + description: Label prefix the machine declared, e.g. app. + description: Every public domain on the agent's machine, one per port, in the order the machine declared them. + environment_id: + type: string + id: + type: string + name: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + region: + type: string + description: Region the agent's machine runs in. Null briefly after creation, before the machine has been placed. + sessions: + type: array + items: + type: object + properties: + harness: + type: string + last_event_kind: + type: string + latest_prompt: + type: string + description: Truncated most recent prompt of the session, display-only. Null when the harness never reported one. + prompt: + type: string + description: Truncated first prompt of the session, display-only. Null when the harness never reported one. + session_id: + type: string + session_name: + type: string + description: Durable console session name the harness ran inside. Null on older VMs that don't report it. + state: + type: string + description: 'One of: unknown, working, waiting, idle, failed, done.' + task_id: + type: string + terminal: + type: boolean + title: + type: string + description: Generated display title for the session, display-only. Null until generated; fall back to latestPrompt, then prompt. + updated_at: + type: string + description: Live coding-agent sessions, one entry per session. Retained for 24h after the last report, so a sleeping agent still shows what it was last doing. + source: + type: object + properties: + branch: + type: string + description: Requested ref; null = the repo's default branch. + dir: + type: string + description: Selected checkout directory; null means /app. + repo: + type: string + description: owner/repo. + service_id: + type: string + description: Service the repo was resolved from, when given. + status: + type: string + enum: + - CLONING + - FAILED + - READY + description: Clone progress. Failed never blocks the agent; only CLONING should hold a launch. + description: Repo this agent's workspace was created from. Null for agents created without a source. + status: + type: string + enum: + - CRASHED + - DELETING + - FAILED + - RUNNING + - SLEEPING + - STARTING + CloudAgentCheckpoint: + type: object + properties: + created_at: + type: string + format: date-time + environment_id: + type: string + failure_reason: + type: string + description: Why the capture failed. + id: + type: string + name: + type: string + region: + type: string + description: Region the checkpoint was captured in. + status: + type: string + enum: + - FAILED + - IN_PROGRESS + - SUCCEEDED + CloudAgentCheckpointDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the cloudAgentCheckpointDelete mutation (Boolean!) + CloudAgentDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the cloudAgentDelete mutation (Boolean!) + CloudAgentDeployResult: + type: object + properties: + deployment_id: + type: string + service_id: + type: string + CloudAgentHarnessTokenResult: + type: object + properties: + result: + type: string + description: Value returned by the cloudAgentHarnessToken mutation (String!) + CloudAgentTask: + type: object + properties: + cloud_agent_id: + type: string + completed_at: + type: string + format: date-time + created_at: + type: string + format: date-time + created_via: + type: string + enum: + - API + - MCP + error: + type: string + external_ref: + type: string + id: + type: string + metadata: + type: object + prompt_preview: + type: string + requested_by_user_id: + type: string + session_id: + type: string + started_at: + type: string + format: date-time + status: + type: string + enum: + - AWAITING_INPUT + - COMPLETED + - FAILED + - PENDING + - RUNNING + CloudAgentTaskHandle: + type: object + properties: + cloud_agent_id: + type: string + replayed: + type: boolean + session_id: + type: string + status: + type: string + enum: + - AWAITING_INPUT + - COMPLETED + - FAILED + - PENDING + - RUNNING + task_id: + type: string + CloudAgentTaskResult: + type: object + properties: + cloud_agent_id: + type: string + completed_at: + type: string + error: + type: string + external_ref: + type: string + metadata: + type: object + session_id: + type: string + session_state: + type: string + status: + type: string + enum: + - AWAITING_INPUT + - COMPLETED + - FAILED + - PENDING + - RUNNING + structured_output: + type: object + task_id: + type: string + text: + type: string + Sandbox: + type: object + properties: + created_at: + type: string + format: date-time + domains: + type: array + items: + type: object + properties: + domain: + type: string + description: Resolved FQDN. + port: + type: integer + description: Target port on the sandbox this domain routes to. + prefix: + type: string + description: Label prefix requested when the sandbox was created. + description: Railway-provided public HTTP domains whose routes have been published. + environment_id: + type: string + id: + type: string + idle_timeout_minutes: + type: integer + description: Minutes of inactivity before the sandbox is destroyed. 0 means it never idles out; null means unknown, including for a destroyed sandbox. + network_isolation: + type: string + enum: + - ISOLATED + - PRIVATE + region: + type: string + status: + type: string + enum: + - CREATING + - DESTROYED + - DESTROYING + - FAILED + - RUNNING + SandboxCheckpoint: + type: object + properties: + created_at: + type: string + format: date-time + environment_id: + type: string + id: + type: string + key: + type: string + description: 'The checkpoint''s identity within the environment (same as id): a recipe content hash for a built template, or the user-given name for one captured from a sandbox.' + SandboxCheckpointDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the sandboxCheckpointDelete mutation (Boolean!) + SandboxExecResult: + type: object + properties: + exit_code: + type: integer + stderr: + type: string + stdout: + type: string + timed_out: + type: boolean + truncated: + type: boolean + SandboxSession: + type: object + properties: + attached: + type: boolean + description: Whether a client is currently connected. + command: + type: string + description: The command being run; empty for an interactive shell. + created_at: + type: string + format: date-time + foreground_active: + type: boolean + description: For an interactive shell, whether a foreground program currently holds the terminal. Null otherwise, or when the runtime can't report it. + kind: + type: string + enum: + - EXEC + - SHELL + name: + type: string + description: Stable session name; reconnect/attach by this. + run_state: + type: object + properties: + exit_code: + type: integer + description: Process exit code; only meaningful once running is false. + exited_at: + type: string + format: date-time + description: When the process exited; null while running. + running: + type: boolean + description: Whether the process is still alive. + description: SandboxSessionRunState object + SandboxTemplateBuild: + type: object + properties: + environment_id: + type: string + id: + type: string + description: The template's resolved-content hash. + status: + type: string + enum: + - BUILDING + - FAILED + - PENDING + - READY + x-stackQL-resources: + cloud_agent_checkpoints: + id: railway.agents.cloud_agent_checkpoints + name: cloud_agent_checkpoints + title: Cloud Agent Checkpoints + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_checkpoints&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: ID!, $name: String) { cloudAgentCheckpointCreate(id: $id, name: $name) { created_at: createdAt environment_id: environmentId failure_reason: failureReason id name region status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentCheckpointCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_checkpoints&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: ID!) { cloudAgentCheckpointDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentCheckpointDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"cloudAgentCheckpointDelete":{"result":{{ toJson (index (index . "data") "cloudAgentCheckpointDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_checkpoints&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.cloudAgentCheckpoint + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_checkpoints&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.cloudAgentCheckpoints.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "cloudAgentCheckpoints" -}}{"data":{"cloudAgentCheckpoints":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cloud_agent_checkpoints/methods/get' + - $ref: '#/components/x-stackQL-resources/cloud_agent_checkpoints/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/cloud_agent_checkpoints/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/cloud_agent_checkpoints/methods/delete' + replace: [] + cloud_agent_console_sessions: + id: railway.agents.cloud_agent_console_sessions + name: cloud_agent_console_sessions + title: Cloud Agent Console Sessions + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_console_sessions&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.cloudAgentConsoleSessions.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "cloudAgentConsoleSessions" -}}{"data":{"cloudAgentConsoleSessions":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cloud_agent_console_sessions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + cloud_agent_task_results: + id: railway.agents.cloud_agent_task_results + name: cloud_agent_task_results + title: Cloud Agent Task Results + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_task_results&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.cloudAgentTask + x-stackql-protocol: graphql + recover: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_task_results&__method=recover/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($cloud_agent_id: String!, $session_id: String!) { cloudAgentTaskRecover(cloudAgentId: $cloud_agent_id, sessionId: $session_id) { cloud_agent_id: cloudAgentId completed_at: completedAt error external_ref: externalRef metadata session_id: sessionId session_state: sessionState status structured_output: structuredOutput task_id: taskId text } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "cloud_agent_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"cloud_agent_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "session_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"session_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentTaskRecover + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cloud_agent_task_results/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + cloud_agent_tasks: + id: railway.agents.cloud_agent_tasks + name: cloud_agent_tasks + title: Cloud Agent Tasks + methods: + dispatch: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_tasks&__method=dispatch/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($agent_name: String, $cloud_agent_id: String, $environment_id: String!, $external_ref: String, $idempotency_key: String, $metadata: JSON, $mode: CloudAgentTaskMode, $output_schema: JSON, $project_id: String!, $prompt: String!, $reply_to_task_id: String, $session_id: String, $source: CloudAgentSourceInput, $webhook_secret: String, $webhook_url: String) { cloudAgentTaskDispatch(input: { agentName: $agent_name, cloudAgentId: $cloud_agent_id, environmentId: $environment_id, externalRef: $external_ref, idempotencyKey: $idempotency_key, metadata: $metadata, mode: $mode, outputSchema: $output_schema, projectId: $project_id, prompt: $prompt, replyToTaskId: $reply_to_task_id, sessionId: $session_id, source: $source, webhookSecret: $webhook_secret, webhookUrl: $webhook_url }) { cloud_agent_id: cloudAgentId replayed session_id: sessionId status task_id: taskId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "agent_name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"agent_name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "cloud_agent_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"cloud_agent_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "external_ref" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"external_ref":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "idempotency_key" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"idempotency_key":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "metadata" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"metadata":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "mode" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"mode":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "output_schema" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"output_schema":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "prompt" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"prompt":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "reply_to_task_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"reply_to_task_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "session_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"session_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "source" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "webhook_secret" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"webhook_secret":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "webhook_url" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"webhook_url":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentTaskDispatch + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agent_tasks&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.cloudAgentTasks.tasks + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cloud_agent_tasks/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + cloud_agents: + id: railway.agents.cloud_agents + name: cloud_agents + title: Cloud Agents + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($cloud_agent_checkpoint_id: String, $code_endpoint: CloudAgentCodeEndpointInput, $environment_id: String!, $name: String, $region: String, $source: CloudAgentSourceInput, $variables: JSON) { cloudAgentCreate(input: { cloudAgentCheckpointId: $cloud_agent_checkpoint_id, codeEndpoint: $code_endpoint, environmentId: $environment_id, name: $name, region: $region, source: $source, variables: $variables }) { agent_ws_url: agentWsUrl console_target_id: consoleTargetId created_at: createdAt domain domains { domain port prefix } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId region sessions { harness last_event_kind: lastEventKind latest_prompt: latestPrompt prompt session_id: sessionId session_name: sessionName state task_id: taskId terminal title updated_at: updatedAt } source { branch dir repo service_id: serviceId status } status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "cloud_agent_checkpoint_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"cloud_agent_checkpoint_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "code_endpoint" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"code_endpoint":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "region" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"region":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "source" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "variables" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"variables":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: ID!) { cloudAgentDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"cloudAgentDelete":{"result":{{ toJson (index (index . "data") "cloudAgentDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + deploy: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=deploy/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: ID!, $path: String, $regions: JSON, $service_name: String) { cloudAgentDeploy(id: $id, path: $path, regions: $regions, serviceName: $service_name) { deployment_id: deploymentId service_id: serviceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "path" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"path":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "regions" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"regions":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "service_name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentDeploy + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + fork: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=fork/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: ID!, $name: String, $variables: JSON) { cloudAgentFork(id: $id, name: $name, variables: $variables) { agent_ws_url: agentWsUrl console_target_id: consoleTargetId created_at: createdAt domain domains { domain port prefix } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId region sessions { harness last_event_kind: lastEventKind latest_prompt: latestPrompt prompt session_id: sessionId session_name: sessionName state task_id: taskId terminal title updated_at: updatedAt } source { branch dir repo service_id: serviceId status } status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "variables" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"variables":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentFork + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.cloudAgent + x-stackql-protocol: graphql + harness_token: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=harness_token/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $id: ID!) { cloudAgentHarnessToken(environmentId: $environment_id, id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentHarnessToken + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"cloudAgentHarnessToken":{"result":{{ toJson (index (index . "data") "cloudAgentHarnessToken") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.cloudAgents + x-stackql-protocol: graphql + list_mine: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=list_mine/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.myCloudAgents + x-stackql-protocol: graphql + sleep: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=sleep/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: ID!) { cloudAgentSleep(id: $id) { agent_ws_url: agentWsUrl console_target_id: consoleTargetId created_at: createdAt domain domains { domain port prefix } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId region sessions { harness last_event_kind: lastEventKind latest_prompt: latestPrompt prompt session_id: sessionId session_name: sessionName state task_id: taskId terminal title updated_at: updatedAt } source { branch dir repo service_id: serviceId status } status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentSleep + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + wake: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=cloud_agents&__method=wake/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: ID!) { cloudAgentWake(id: $id) { agent_ws_url: agentWsUrl console_target_id: consoleTargetId created_at: createdAt domain domains { domain port prefix } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId region sessions { harness last_event_kind: lastEventKind latest_prompt: latestPrompt prompt session_id: sessionId session_name: sessionName state task_id: taskId terminal title updated_at: updatedAt } source { branch dir repo service_id: serviceId status } status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cloudAgentWake + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cloud_agents/methods/get' + - $ref: '#/components/x-stackQL-resources/cloud_agents/methods/list' + - $ref: '#/components/x-stackQL-resources/cloud_agents/methods/list_mine' + insert: + - $ref: '#/components/x-stackQL-resources/cloud_agents/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/cloud_agents/methods/delete' + replace: [] + sandbox_checkpoints: + id: railway.agents.sandbox_checkpoints + name: sandbox_checkpoints + title: Sandbox Checkpoints + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandbox_checkpoints&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $name: String!, $sandbox_id: String!) { sandboxCheckpointCreate(environmentId: $environment_id, name: $name, sandboxId: $sandbox_id) { created_at: createdAt environment_id: environmentId id key } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "sandbox_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"sandbox_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxCheckpointCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandbox_checkpoints&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $id: ID!) { sandboxCheckpointDelete(environmentId: $environment_id, id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxCheckpointDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"sandboxCheckpointDelete":{"result":{{ toJson (index (index . "data") "sandboxCheckpointDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandbox_checkpoints&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.sandboxCheckpoints + x-stackql-protocol: graphql + rename: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandbox_checkpoints&__method=rename/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $id: ID!, $name: String!) { sandboxCheckpointRename(environmentId: $environment_id, id: $id, name: $name) { created_at: createdAt environment_id: environmentId id key } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxCheckpointRename + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sandbox_checkpoints/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sandbox_checkpoints/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/sandbox_checkpoints/methods/rename' + delete: + - $ref: '#/components/x-stackQL-resources/sandbox_checkpoints/methods/delete' + replace: [] + sandbox_sessions: + id: railway.agents.sandbox_sessions + name: sandbox_sessions + title: Sandbox Sessions + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandbox_sessions&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.sandboxSessions.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "sandboxSessions" -}}{"data":{"sandboxSessions":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sandbox_sessions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + sandbox_template_builds: + id: railway.agents.sandbox_template_builds + name: sandbox_template_builds + title: Sandbox Template Builds + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandbox_template_builds&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $instructions: [String!], $name: String, $region: String, $variables: EnvironmentVariables) { sandboxTemplateBuild(environmentId: $environment_id, input: { instructions: $instructions, name: $name, region: $region, variables: $variables }) { environment_id: environmentId id status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "instructions" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"instructions":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "region" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"region":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "variables" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"variables":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxTemplateBuild + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandbox_template_builds&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.sandboxTemplateBuild + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sandbox_template_builds/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/sandbox_template_builds/methods/create' + update: [] + delete: [] + replace: [] + sandboxes: + id: railway.agents.sandboxes + name: sandboxes + title: Sandboxes + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandboxes&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $idle_timeout_minutes: Int, $network_isolation: SandboxNetworkIsolation, $public_domains: [SandboxDomainInput!], $region: String, $resources: SandboxResourcesInput, $source_sandbox_id: String, $template: SandboxTemplateInput, $variables: EnvironmentVariables) { sandboxCreate(input: { environmentId: $environment_id, idleTimeoutMinutes: $idle_timeout_minutes, networkIsolation: $network_isolation, publicDomains: $public_domains, region: $region, resources: $resources, sourceSandboxId: $source_sandbox_id, template: $template, variables: $variables }) { created_at: createdAt domains { domain port prefix } environment_id: environmentId id idle_timeout_minutes: idleTimeoutMinutes network_isolation: networkIsolation region status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "idle_timeout_minutes" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"idle_timeout_minutes":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "network_isolation" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"network_isolation":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "public_domains" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"public_domains":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "region" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"region":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "resources" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"resources":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "source_sandbox_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source_sandbox_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "template" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"template":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "variables" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"variables":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + destroy: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandboxes&__method=destroy/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $id: String!) { sandboxDestroy(environmentId: $environment_id, id: $id) { created_at: createdAt domains { domain port prefix } environment_id: environmentId id idle_timeout_minutes: idleTimeoutMinutes network_isolation: networkIsolation region status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxDestroy + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + exec: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandboxes&__method=exec/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($command: String!, $environment_id: String!, $id: String!, $timeout_sec: Int) { sandboxExec(command: $command, environmentId: $environment_id, id: $id, timeoutSec: $timeout_sec) { exit_code: exitCode stderr stdout timed_out: timedOut truncated } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "command" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"command":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "timeout_sec" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"timeout_sec":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxExec + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandboxes&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.sandbox + x-stackql-protocol: graphql + heartbeat: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandboxes&__method=heartbeat/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $id: String!) { sandboxHeartbeat(environmentId: $environment_id, id: $id) { created_at: createdAt domains { domain port prefix } environment_id: environmentId id idle_timeout_minutes: idleTimeoutMinutes network_isolation: networkIsolation region status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sandboxHeartbeat + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=sandboxes&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.sandboxes.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "sandboxes" -}}{"data":{"sandboxes":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sandboxes/methods/get' + - $ref: '#/components/x-stackQL-resources/sandboxes/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sandboxes/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/sandboxes/methods/destroy' + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/billing.yaml b/providers/src/railway/v00.00.00000/services/billing.yaml new file mode 100644 index 00000000..095380ce --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/billing.yaml @@ -0,0 +1,1151 @@ +openapi: 3.0.3 +info: + title: Billing and Usage API + description: 'Usage and cost: aggregated and estimated usage by measurement, per-project and per-service usage, workspace totals, and the billing customer with its credits and usage limits.' + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=agent_usage&__method=get: + post: + operationId: agent_usage_get + summary: Get unified AI usage for a workspace + description: Get unified AI usage for a workspace. Backed by the Railway GraphQL query agentUsage. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.billing.agent_usage.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { agentUsage(workspaceId: "{{ .workspace_id }}") { billing_period_end: billingPeriodEnd hard_limit_cents: hardLimitCents has_custom_hard_limit: hasCustomHardLimit soft_limit_cents: softLimitCents total_used_cents: totalUsedCents usage_remaining: usageRemaining } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One AgentUsageSummary row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + agentUsage: + $ref: '#/components/schemas/AgentUsageSummary' + /graphql/v2?__resource=agent_usage&__method=set_limit: + post: + operationId: agent_usage_set_limit + summary: Set agent usage limit for a workspace + description: Set agent usage limit for a workspace. Backed by the Railway GraphQL mutation agentUsageLimitSet. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - hard_limit_cents + - workspace_id + properties: + hard_limit_cents: + type: string + description: Integer passed as a string, for example '1'. + soft_limit_cents: + type: string + description: Integer passed as a string, for example '1'. + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + agentUsageLimitSet: + $ref: '#/components/schemas/AgentUsageLimitSetResult' + /graphql/v2?__resource=customers&__method=create_free_plan_subscription: + post: + operationId: customers_create_free_plan_subscription + summary: Create a free plan subscription for a customer + description: Create a free plan subscription for a customer. Backed by the Railway GraphQL mutation customerCreateFreePlanSubscription. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customerCreateFreePlanSubscription: + $ref: '#/components/schemas/CustomerCreateFreePlanSubscriptionResult' + /graphql/v2?__resource=customers&__method=get: + post: + operationId: customers_get + summary: Gets a Customer of a Workspace + description: Gets a Customer of a Workspace. Backed by the Railway GraphQL query workspace.customer. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.billing.customers.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspace.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workspace(workspaceId: "{{ .workspace_id }}") { customer { applied_credits: appliedCredits billing_address: billingAddress { city country line1 line2 name postal_code: postalCode state } billing_email: billingEmail billing_period: billingPeriod { end start } credit_balance: creditBalance current_usage: currentUsage default_payment_method: defaultPaymentMethod { id } default_payment_method_id: defaultPaymentMethodId has_exhausted_free_plan: hasExhaustedFreePlan id invoices { amount_due: amountDue amount_paid: amountPaid hosted_url: hostedURL invoice_id: invoiceId last_payment_error: lastPaymentError payment_intent_status: paymentIntentStatus pdf_url: pdfURL period_end: periodEnd period_start: periodStart reissued_invoice_from: reissuedInvoiceFrom reissued_invoice_of: reissuedInvoiceOf spend_commitment_prepayment: spendCommitmentPrepayment status subscription_id: subscriptionId subscription_status: subscriptionStatus total } is_prepaying: isPrepaying is_trialing: isTrialing is_usage_subscriber: isUsageSubscriber is_withdrawing_to_credits: isWithdrawingToCredits plan_limit_override: planLimitOverride { config id } remaining_usage_credit_balance: remainingUsageCreditBalance spend_commitment: spendCommitment { features id min_spend_amount_cents: minSpendAmountCents } state stripe_customer_id: stripeCustomerId subscriptions { billing_cycle_anchor: billingCycleAnchor cancel_at: cancelAt cancel_at_period_end: cancelAtPeriodEnd coupon_id: couponId id latest_invoice_id: latestInvoiceId next_invoice_current_total: nextInvoiceCurrentTotal next_invoice_date: nextInvoiceDate status } supported_withdrawal_platforms: supportedWithdrawalPlatforms tax_ids: taxIds { id type value } trial_days_remaining: trialDaysRemaining usage_limit: usageLimit { agent_hard_limit_cents: agentHardLimitCents agent_soft_limit_cents: agentSoftLimitCents customer_id: customerId hard_limit: hardLimit id is_over_limit: isOverLimit soft_limit: softLimit } workspace { adoption_level: adoptionLevel avatar created_at: createdAt discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id name plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One Customer row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspace: + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + /graphql/v2?__resource=customers&__method=remove_usage_limit: + post: + operationId: customers_remove_usage_limit + summary: Remove the usage limit for a customer + description: Remove the usage limit for a customer. Backed by the Railway GraphQL mutation usageLimitRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - customer_id + properties: + customer_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + usageLimitRemove: + $ref: '#/components/schemas/UsageLimitRemoveResult' + /graphql/v2?__resource=customers&__method=set_usage_limit: + post: + operationId: customers_set_usage_limit + summary: Set the usage limit for a customer + description: Set the usage limit for a customer. Backed by the Railway GraphQL mutation usageLimitSet. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - customer_id + - soft_limit_dollars + properties: + customer_id: + type: string + hard_limit_dollars: + type: string + description: Integer passed as a string, for example '1'. + soft_limit_dollars: + type: string + description: Integer passed as a string, for example '1'. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + usageLimitSet: + $ref: '#/components/schemas/UsageLimitSetResult' + /graphql/v2?__resource=customers&__method=toggle_payouts_to_credits: + post: + operationId: customers_toggle_payouts_to_credits + summary: Toggle whether a customer is automatically withdrawing to credits + description: Toggle whether a customer is automatically withdrawing to credits. Backed by the Railway GraphQL mutation customerTogglePayoutsToCredits. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - customer_id + - is_withdrawing_to_credits + properties: + customer_id: + type: string + is_withdrawing_to_credits: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customerTogglePayoutsToCredits: + $ref: '#/components/schemas/CustomerTogglePayoutsToCreditsResult' + /graphql/v2?__resource=estimated_usage&__method=list: + post: + operationId: estimated_usage_list + summary: Get the estimated total cost of the project at the end of the current billing cycle + description: Get the estimated total cost of the project at the end of the current billing cycle. If no `startDate` is provided, the usage for the current billing period of the project owner is returned. Backed by the Railway GraphQL query estimatedUsage. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.billing.estimated_usage.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.estimatedUsage[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { estimatedUsage({{ if .include_deleted }}includeDeleted: {{ .include_deleted }} {{ end }}measurements: {{ .measurements }} {{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}{{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}) { estimated_value: estimatedValue measurement project_id: projectId } }' + x-stackql-protocol: graphql + parameters: + - name: include_deleted + in: query + required: false + description: Whether to include deleted projects in estimations. + schema: + type: boolean + - name: measurements + in: query + required: true + description: GraphQL list literal of MetricMeasurement values, for example [AGENT_CACHE_READ_TOKENS, AGENT_CACHE_WRITE_TOKENS]. + schema: + type: string + - name: project_id + in: query + required: false + schema: + type: string + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per EstimatedUsage. The estimated usage of a single measurement. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + estimatedUsage: + type: array + items: + $ref: '#/components/schemas/EstimatedUsage' + /graphql/v2?__resource=project_service_usage&__method=list: + post: + operationId: project_service_usage_list + summary: Get paginated usage grouped by project and service for a workspace + description: Get paginated usage grouped by project and service for a workspace. Backed by the Railway GraphQL query projectServiceUsage. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.billing.project_service_usage.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projectServiceUsage.usage[*] + cursor: + strategy: page_info + jsonPath: $.data.projectServiceUsage.pageInfo.endCursor + terminateOnJsonPath: $.data.projectServiceUsage.pageInfo.hasNextPage + query: 'query { projectServiceUsage(first: 50{{ .cursor }} endDate: "{{ .end_date }}" {{ if .include_deleted }}includeDeleted: {{ .include_deleted }} {{ end }}measurements: {{ .measurements }} startDate: "{{ .start_date }}" workspaceId: "{{ .workspace_id }}") { usage { measurement tags { deployment_id: deploymentId deployment_instance_id: deploymentInstanceId environment_id: environmentId project_id: projectId region service_id: serviceId volume_id: volumeId volume_instance_id: volumeInstanceId } value } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: true + schema: + type: string + format: date-time + - name: include_deleted + in: query + required: false + description: Whether to include deleted projects in usage. + schema: + type: boolean + - name: measurements + in: query + required: true + description: GraphQL list literal of MetricMeasurement values, for example [AGENT_CACHE_READ_TOKENS, AGENT_CACHE_WRITE_TOKENS]. + schema: + type: string + - name: start_date + in: query + required: true + schema: + type: string + format: date-time + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per AggregatedUsage. The aggregated usage of a single measurement. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectServiceUsage: + type: object + properties: + usage: + type: array + items: + $ref: '#/components/schemas/AggregatedUsage' + pageInfo: + type: object + properties: + endCursor: + type: string + hasNextPage: + type: boolean + /graphql/v2?__resource=usage&__method=list: + post: + operationId: usage_list + summary: Get the usage for a single project or all projects for a user/workspace + description: Get the usage for a single project or all projects for a user/workspace. If no `projectId` or `workspaceId` is provided, the usage for the current user is returned. If no `startDate` is provided, the usage for the current billing period of the project owner is returned. Backed by the Railway GraphQL query usage. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.billing.usage.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.usage[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { usage({{ if .end_date }}endDate: "{{ .end_date }}" {{ end }}{{ if .group_by }}groupBy: {{ .group_by }} {{ end }}{{ if .include_deleted }}includeDeleted: {{ .include_deleted }} {{ end }}measurements: {{ .measurements }} {{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}{{ if .start_date }}startDate: "{{ .start_date }}" {{ end }}{{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}) { measurement tags { deployment_id: deploymentId deployment_instance_id: deploymentInstanceId environment_id: environmentId project_id: projectId region service_id: serviceId volume_id: volumeId volume_instance_id: volumeInstanceId } value } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: false + schema: + type: string + format: date-time + - name: group_by + in: query + required: false + description: What to group the aggregated usage by. By default, it is grouped over the entire project. GraphQL list literal of MetricTag values, for example [BILLABLE, DEPLOYMENT_ID]. + schema: + type: string + - name: include_deleted + in: query + required: false + description: Whether to include deleted projects in the usage. + schema: + type: boolean + - name: measurements + in: query + required: true + description: GraphQL list literal of MetricMeasurement values, for example [AGENT_CACHE_READ_TOKENS, AGENT_CACHE_WRITE_TOKENS]. + schema: + type: string + - name: project_id + in: query + required: false + schema: + type: string + - name: start_date + in: query + required: false + schema: + type: string + format: date-time + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per AggregatedUsage. The aggregated usage of a single measurement. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + usage: + type: array + items: + $ref: '#/components/schemas/AggregatedUsage' + /graphql/v2?__resource=workspace_usage_totals&__method=list: + post: + operationId: workspace_usage_totals_list + summary: Workspace-wide SUM of the same UI usage rollup as `usage` grouped by project + description: Workspace-wide SUM of the same UI usage rollup as `usage` grouped by project. Use this for the usage-page header so it does not wait on per-project rows. Deleted projects that still bill are included when `includeDeleted` is true. Backed by the Railway GraphQL query workspaceUsageTotals. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.billing.workspace_usage_totals.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspaceUsageTotals[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workspaceUsageTotals({{ if .end_date }}endDate: "{{ .end_date }}" {{ end }}{{ if .include_deleted }}includeDeleted: {{ .include_deleted }} {{ end }}measurements: {{ .measurements }} {{ if .start_date }}startDate: "{{ .start_date }}" {{ end }}{{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}) { measurement tags { deployment_id: deploymentId deployment_instance_id: deploymentInstanceId environment_id: environmentId project_id: projectId region service_id: serviceId volume_id: volumeId volume_instance_id: volumeInstanceId } value } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: false + schema: + type: string + format: date-time + - name: include_deleted + in: query + required: false + description: Whether to include deleted projects in the usage. + schema: + type: boolean + - name: measurements + in: query + required: true + description: GraphQL list literal of MetricMeasurement values, for example [AGENT_CACHE_READ_TOKENS, AGENT_CACHE_WRITE_TOKENS]. + schema: + type: string + - name: start_date + in: query + required: false + schema: + type: string + format: date-time + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per AggregatedUsage. The aggregated usage of a single measurement. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceUsageTotals: + type: array + items: + $ref: '#/components/schemas/AggregatedUsage' +components: + schemas: + AgentUsageLimitSetResult: + type: object + properties: + result: + type: boolean + description: Value returned by the agentUsageLimitSet mutation (Boolean!) + AgentUsageSummary: + type: object + properties: + billing_period_end: + type: string + format: date-time + hard_limit_cents: + type: integer + has_custom_hard_limit: + type: boolean + soft_limit_cents: + type: integer + total_used_cents: + type: integer + usage_remaining: + type: number + AggregatedUsage: + type: object + properties: + measurement: + type: string + enum: + - AGENT_CACHE_READ_TOKENS + - AGENT_CACHE_WRITE_TOKENS + - AGENT_INPUT_TOKENS + - AGENT_OUTPUT_TOKENS + - AGENT_SPEND_USD + - BACKUP_USAGE_GB + - CPU_LIMIT + - CPU_USAGE + - CPU_USAGE_2 + - DISK_USAGE_GB + - EPHEMERAL_DISK_USAGE_GB + - MEASUREMENT_UNSPECIFIED + - MEMORY_LIMIT_GB + - MEMORY_USAGE_GB + - NETWORK_RX_GB + - NETWORK_TX_GB + - UNRECOGNIZED + description: The measurement that was aggregated. + tags: + type: object + properties: + deployment_id: + type: string + deployment_instance_id: + type: string + environment_id: + type: string + project_id: + type: string + region: + type: string + service_id: + type: string + volume_id: + type: string + volume_instance_id: + type: string + description: The tags that were used to group the metric. Only the tags that were used in the `groupBy` will be present. + value: + type: number + description: The aggregated value. + Customer: + type: object + properties: + applied_credits: + type: number + description: The total amount of credits that have been applied during the current billing period. + billing_address: + type: object + properties: + city: + type: string + country: + type: string + line1: + type: string + line2: + type: string + name: + type: string + postal_code: + type: string + state: + type: string + description: CustomerAddress object + billing_email: + type: string + billing_period: + type: object + properties: + end: + type: string + format: date-time + start: + type: string + format: date-time + description: BillingPeriod object + credit_balance: + type: number + description: The total amount of unused credits for the customer. + current_usage: + type: number + description: The current usage for the customer. This value is cached and may not be up to date. + default_payment_method: + type: object + properties: + id: + type: string + description: PaymentMethod object + default_payment_method_id: + type: string + has_exhausted_free_plan: + type: boolean + id: + type: string + invoices: + type: array + items: + type: object + properties: + amount_due: + type: number + amount_paid: + type: number + hosted_url: + type: string + invoice_id: + type: string + last_payment_error: + type: string + payment_intent_status: + type: string + pdf_url: + type: string + period_end: + type: string + period_start: + type: string + reissued_invoice_from: + type: string + reissued_invoice_of: + type: string + spend_commitment_prepayment: + type: boolean + status: + type: string + subscription_id: + type: string + subscription_status: + type: string + total: + type: integer + description: List of CustomerInvoice objects + is_prepaying: + type: boolean + is_trialing: + type: boolean + is_usage_subscriber: + type: boolean + is_withdrawing_to_credits: + type: boolean + plan_limit_override: + type: object + properties: + config: + type: object + id: + type: string + description: PlanLimitOverride object + remaining_usage_credit_balance: + type: number + spend_commitment: + type: object + properties: + features: + type: array + items: + type: string + id: + type: string + min_spend_amount_cents: + type: integer + description: SpendCommitment object + state: + type: string + enum: + - ACTIVE + - CANCELLED + - INACTIVE + - PAST_DUE + - UNPAID + stripe_customer_id: + type: string + subscriptions: + type: array + items: + type: object + properties: + billing_cycle_anchor: + type: string + format: date-time + cancel_at: + type: string + cancel_at_period_end: + type: boolean + coupon_id: + type: string + id: + type: string + latest_invoice_id: + type: string + next_invoice_current_total: + type: integer + next_invoice_date: + type: string + status: + type: string + description: List of CustomerSubscription objects + supported_withdrawal_platforms: + type: array + items: + type: string + enum: + - BMAC + - GITHUB + - PAYPAL + - STRIPE_CONNECT + tax_ids: + type: array + items: + type: object + properties: + id: + type: string + type: + type: string + value: + type: string + description: List of CustomerTaxId objects + trial_days_remaining: + type: integer + usage_limit: + type: object + properties: + agent_hard_limit_cents: + type: integer + agent_soft_limit_cents: + type: integer + customer_id: + type: string + hard_limit: + type: integer + id: + type: string + is_over_limit: + type: boolean + soft_limit: + type: integer + description: UsageLimit object + workspace: + type: object + properties: + adoption_level: + type: number + avatar: + type: string + created_at: + type: string + format: date-time + discord_role: + type: string + has2fa_enforcement: + type: boolean + description: Whether 2FA enforcement is enabled for this workspace. + has_automatic_diagnosis: + type: boolean + description: Whether automatic deployment diagnosis is enabled for this workspace. + has_guardrails_access: + type: boolean + description: Whether this workspace has access to guardrails policies. + has_hipaa_baa: + type: boolean + description: Whether this workspace has a signed HIPAA Business Associate Agreement, from either the legacy hasBAA flag or the HIPAA_BAA spend commitment feature. + has_saml: + type: boolean + id: + type: string + name: + type: string + plan: + type: string + enum: + - FREE + - HOBBY + - PRO + preferred_region: + type: string + project_count: + type: integer + description: Total number of projects in this workspace. Used by the dashboard to show an exact count without paginating through every project. + redacted_due_to2fa_pending: + type: boolean + description: Whether the current user's access is redacted due to pending 2FA requirement. Returns true if the user is a workspace member, workspace has 2FA enforcement enabled, and the current user needs to enable 2FA. + restrict_project_visibility_to_groups: + type: boolean + slack_channel_id: + type: string + subscription_plan_limit: + type: object + updated_at: + type: string + format: date-time + users_without2fa: + type: array + items: + type: string + description: Get a list of user emails in the workspace who do not have verified 2FA enabled. Returns an empty array if all users have 2FA enabled. + description: Workspace object + CustomerCreateFreePlanSubscriptionResult: + type: object + properties: + result: + type: boolean + description: Value returned by the customerCreateFreePlanSubscription mutation (Boolean!) + CustomerTogglePayoutsToCreditsResult: + type: object + properties: + result: + type: boolean + description: Value returned by the customerTogglePayoutsToCredits mutation (Boolean!) + EstimatedUsage: + type: object + properties: + estimated_value: + type: number + description: The estimated value. + measurement: + type: string + enum: + - AGENT_CACHE_READ_TOKENS + - AGENT_CACHE_WRITE_TOKENS + - AGENT_INPUT_TOKENS + - AGENT_OUTPUT_TOKENS + - AGENT_SPEND_USD + - BACKUP_USAGE_GB + - CPU_LIMIT + - CPU_USAGE + - CPU_USAGE_2 + - DISK_USAGE_GB + - EPHEMERAL_DISK_USAGE_GB + - MEASUREMENT_UNSPECIFIED + - MEMORY_LIMIT_GB + - MEMORY_USAGE_GB + - NETWORK_RX_GB + - NETWORK_TX_GB + - UNRECOGNIZED + description: The measurement that was estimated. + project_id: + type: string + UsageLimitRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the usageLimitRemove mutation (Boolean!) + UsageLimitSetResult: + type: object + properties: + result: + type: boolean + description: Value returned by the usageLimitSet mutation (Boolean!) + x-stackQL-resources: + agent_usage: + id: railway.billing.agent_usage + name: agent_usage + title: Agent Usage + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=agent_usage&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.agentUsage + x-stackql-protocol: graphql + set_limit: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=agent_usage&__method=set_limit/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($hard_limit_cents: Int!, $soft_limit_cents: Int, $workspace_id: String!) { agentUsageLimitSet(input: { hardLimitCents: $hard_limit_cents, softLimitCents: $soft_limit_cents, workspaceId: $workspace_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "hard_limit_cents" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"hard_limit_cents":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "soft_limit_cents" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"soft_limit_cents":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.agentUsageLimitSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"agentUsageLimitSet":{"result":{{ toJson (index (index . "data") "agentUsageLimitSet") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/agent_usage/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + customers: + id: railway.billing.customers + name: customers + title: Customers + methods: + create_free_plan_subscription: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=customers&__method=create_free_plan_subscription/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { customerCreateFreePlanSubscription(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.customerCreateFreePlanSubscription + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"customerCreateFreePlanSubscription":{"result":{{ toJson (index (index . "data") "customerCreateFreePlanSubscription") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=customers&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspace.customer + x-stackql-protocol: graphql + remove_usage_limit: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=customers&__method=remove_usage_limit/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($customer_id: String!) { usageLimitRemove(input: { customerId: $customer_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "customer_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"customer_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.usageLimitRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"usageLimitRemove":{"result":{{ toJson (index (index . "data") "usageLimitRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + set_usage_limit: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=customers&__method=set_usage_limit/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($customer_id: String!, $hard_limit_dollars: Int, $soft_limit_dollars: Int!) { usageLimitSet(input: { customerId: $customer_id, hardLimitDollars: $hard_limit_dollars, softLimitDollars: $soft_limit_dollars }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "customer_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"customer_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "hard_limit_dollars" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"hard_limit_dollars":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "soft_limit_dollars" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"soft_limit_dollars":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.usageLimitSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"usageLimitSet":{"result":{{ toJson (index (index . "data") "usageLimitSet") }}}}}{{- end -}}' + x-stackql-protocol: graphql + toggle_payouts_to_credits: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=customers&__method=toggle_payouts_to_credits/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($customer_id: String!, $is_withdrawing_to_credits: Boolean!) { customerTogglePayoutsToCredits(customerId: $customer_id, input: { isWithdrawingToCredits: $is_withdrawing_to_credits }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "customer_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"customer_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "is_withdrawing_to_credits" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"is_withdrawing_to_credits":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.customerTogglePayoutsToCredits + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"customerTogglePayoutsToCredits":{"result":{{ toJson (index (index . "data") "customerTogglePayoutsToCredits") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/customers/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + estimated_usage: + id: railway.billing.estimated_usage + name: estimated_usage + title: Estimated Usage + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=estimated_usage&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.estimatedUsage + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/estimated_usage/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + project_service_usage: + id: railway.billing.project_service_usage + name: project_service_usage + title: Project Service Usage + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_service_usage&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectServiceUsage.usage + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_service_usage/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + usage: + id: railway.billing.usage + name: usage + title: Usage + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=usage&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.usage + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/usage/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + workspace_usage_totals: + id: railway.billing.workspace_usage_totals + name: workspace_usage_totals + title: Workspace Usage Totals + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_usage_totals&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspaceUsageTotals + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspace_usage_totals/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/deployments.yaml b/providers/src/railway/v00.00.00000/services/deployments.yaml new file mode 100644 index 00000000..c651edbf --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/deployments.yaml @@ -0,0 +1,1523 @@ +openapi: 3.0.3 +info: + title: Deployments API + description: Deployments and their lifecycle (redeploy, restart, rollback, stop, cancel, remove), deployment events, instances, snapshots and deployment triggers. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=deployment_events&__method=list: + post: + operationId: deployment_events_list + summary: Get the deployment events for a deployment + description: Get the deployment events for a deployment. Backed by the Railway GraphQL query deploymentEvents. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.deployments.deployment_events.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.deploymentEvents.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.deploymentEvents.pageInfo.endCursor + terminateOnJsonPath: $.data.deploymentEvents.pageInfo.hasNextPage + query: 'query { deploymentEvents(first: 100{{ .cursor }} id: "{{ .id }}") { edges { node { completed_at: completedAt created_at: createdAt id payload { attempt detail duration_ms: durationMs error max_attempts: maxAttempts reason skipped } step } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per DeploymentEvent. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentEvents: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/DeploymentEvent' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=deployment_instance_executions&__method=create: + post: + operationId: deployment_instance_executions_create + summary: Invoke a deployment instance execution + description: Invoke a deployment instance execution. Backed by the Railway GraphQL mutation deploymentInstanceExecutionCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - service_instance_id + properties: + service_instance_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentInstanceExecutionCreate: + $ref: '#/components/schemas/DeploymentInstanceExecutionCreateResult' + /graphql/v2?__resource=deployment_instance_executions&__method=list: + post: + operationId: deployment_instance_executions_list + summary: Get the deployment instance executions for a deployment + description: Get the deployment instance executions for a deployment. Backed by the Railway GraphQL query deploymentInstanceExecutions. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.deployments.deployment_instance_executions.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.deploymentInstanceExecutions.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.deploymentInstanceExecutions.pageInfo.endCursor + terminateOnJsonPath: $.data.deploymentInstanceExecutions.pageInfo.hasNextPage + query: 'query { deploymentInstanceExecutions(first: 100{{ .cursor }} input: { environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}" }) { edges { node { completed_at: completedAt created_at: createdAt deployment_id: deploymentId deployment_meta: deploymentMeta id status updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per DeploymentInstanceExecution. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentInstanceExecutions: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/DeploymentInstanceExecution' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=deployment_instances&__method=list: + post: + operationId: deployment_instances_list + summary: Lists DeploymentDeploymentInstance objects of a Deployment + description: Lists DeploymentDeploymentInstance objects of a Deployment. Backed by the Railway GraphQL query deployment.instances. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.deployments.deployment_instances.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.deployment.instances[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { deployment(id: "{{ .deployment_id }}") { instances { id status } } }' + x-stackql-protocol: graphql + parameters: + - name: deployment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per DeploymentDeploymentInstance. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deployment: + type: object + properties: + instances: + type: array + items: + $ref: '#/components/schemas/DeploymentDeploymentInstance' + /graphql/v2?__resource=deployment_snapshots&__method=get: + post: + operationId: deployment_snapshots_get + summary: Find a single DeploymentSnapshot + description: Find a single DeploymentSnapshot. Backed by the Railway GraphQL query deploymentSnapshot. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.deployments.deployment_snapshots.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { deploymentSnapshot(deploymentId: "{{ .deployment_id }}") { created_at: createdAt id updated_at: updatedAt variables } }' + x-stackql-protocol: graphql + parameters: + - name: deployment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One DeploymentSnapshot row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentSnapshot: + $ref: '#/components/schemas/DeploymentSnapshot' + /graphql/v2?__resource=deployment_triggers&__method=create: + post: + operationId: deployment_triggers_create + summary: Creates a deployment trigger + description: Creates a deployment trigger. Backed by the Railway GraphQL mutation deploymentTriggerCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - branch + - environment_id + - project_id + - provider + - repository + - service_id + properties: + branch: + type: string + check_suites: + type: boolean + environment_id: + type: string + project_id: + type: string + provider: + type: string + repository: + type: string + root_directory: + type: string + service_id: + type: string + responses: + '200': + description: The DeploymentTrigger the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentTriggerCreate: + $ref: '#/components/schemas/DeploymentTrigger' + /graphql/v2?__resource=deployment_triggers&__method=delete: + post: + operationId: deployment_triggers_delete + summary: Deletes a deployment trigger + description: Deletes a deployment trigger. Backed by the Railway GraphQL mutation deploymentTriggerDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentTriggerDelete: + $ref: '#/components/schemas/DeploymentTriggerDeleteResult' + /graphql/v2?__resource=deployment_triggers&__method=deploy: + post: + operationId: deployment_triggers_deploy + summary: Deploys all connected triggers for an environment + description: Deploys all connected triggers for an environment. Backed by the Railway GraphQL mutation environmentTriggersDeploy. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - service_id + properties: + environment_id: + type: string + project_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentTriggersDeploy: + $ref: '#/components/schemas/EnvironmentTriggersDeployResult' + /graphql/v2?__resource=deployment_triggers&__method=list: + post: + operationId: deployment_triggers_list + summary: All deployment triggers + description: All deployment triggers. Backed by the Railway GraphQL query deploymentTriggers. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.deployments.deployment_triggers.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.deploymentTriggers.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.deploymentTriggers.pageInfo.endCursor + terminateOnJsonPath: $.data.deploymentTriggers.pageInfo.hasNextPage + query: 'query { deploymentTriggers(first: 100{{ .cursor }} environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}" serviceId: "{{ .service_id }}") { edges { node { base_environment_override_id: baseEnvironmentOverrideId branch check_suites: checkSuites environment_id: environmentId id project_id: projectId provider repository service_id: serviceId valid_check_suites: validCheckSuites } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per DeploymentTrigger. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentTriggers: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/DeploymentTrigger' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=deployment_triggers&__method=update: + post: + operationId: deployment_triggers_update + summary: Updates a deployment trigger + description: Updates a deployment trigger. Backed by the Railway GraphQL mutation deploymentTriggerUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + branch: + type: string + check_suites: + type: boolean + repository: + type: string + root_directory: + type: string + responses: + '200': + description: The DeploymentTrigger the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentTriggerUpdate: + $ref: '#/components/schemas/DeploymentTrigger' + /graphql/v2?__resource=deployments&__method=approve: + post: + operationId: deployments_approve + summary: Approves a deployment + description: Approves a deployment. Backed by the Railway GraphQL mutation deploymentApprove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentApprove: + $ref: '#/components/schemas/DeploymentApproveResult' + /graphql/v2?__resource=deployments&__method=cancel: + post: + operationId: deployments_cancel + summary: Cancels a deployment + description: Cancels a deployment. Backed by the Railway GraphQL mutation deploymentCancel. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentCancel: + $ref: '#/components/schemas/DeploymentCancelResult' + /graphql/v2?__resource=deployments&__method=get: + post: + operationId: deployments_get + summary: Find a single deployment + description: Find a single deployment. Backed by the Railway GraphQL query deployment. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.deployments.deployments.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { deployment(id: "{{ .id }}") { can_redeploy: canRedeploy can_rollback: canRollback created_at: createdAt creator { avatar email id name } deployment_stopped: deploymentStopped diagnosis environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId id instances { id status } meta project_id: projectId service_id: serviceId snapshot_id: snapshotId sockets { ipv6 port process_name: processName updated_at: updatedAt } static_url: staticUrl status status_updated_at: statusUpdatedAt suggest_add_service_domain: suggestAddServiceDomain updated_at: updatedAt url } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One Deployment row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deployment: + $ref: '#/components/schemas/Deployment' + /graphql/v2?__resource=deployments&__method=list: + post: + operationId: deployments_list + summary: Get all deployments + description: Get all deployments. Backed by the Railway GraphQL query deployments. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.deployments.deployments.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.deployments.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.deployments.pageInfo.endCursor + terminateOnJsonPath: $.data.deployments.pageInfo.hasNextPage + query: 'query { deployments(first: 100{{ .cursor }} input: { {{ if .environment_id }}environmentId: "{{ .environment_id }}" {{ end }}{{ if .include_deleted }}includeDeleted: {{ .include_deleted }} {{ end }}{{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}{{ if .service_id }}serviceId: "{{ .service_id }}" {{ end }}{{ if .status }}status: {{ .status }} {{ end }}}) { edges { node { can_redeploy: canRedeploy can_rollback: canRollback created_at: createdAt creator { avatar email id name } deployment_stopped: deploymentStopped diagnosis environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId id instances { id status } meta project_id: projectId service_id: serviceId snapshot_id: snapshotId sockets { ipv6 port process_name: processName updated_at: updatedAt } static_url: staticUrl status status_updated_at: statusUpdatedAt suggest_add_service_domain: suggestAddServiceDomain updated_at: updatedAt url } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: false + schema: + type: string + - name: include_deleted + in: query + required: false + schema: + type: boolean + - name: project_id + in: query + required: false + schema: + type: string + - name: service_id + in: query + required: false + schema: + type: string + - name: status + in: query + required: false + description: 'GraphQL input object literal of type DeploymentStatusInput, for example {field: "value"}.' + schema: + type: string + responses: + '200': + description: One row per Deployment. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deployments: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Deployment' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=deployments&__method=redeploy: + post: + operationId: deployments_redeploy + summary: Redeploys a deployment + description: Redeploys a deployment. Backed by the Railway GraphQL mutation deploymentRedeploy. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + use_previous_image_tag: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + responses: + '200': + description: The Deployment the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentRedeploy: + $ref: '#/components/schemas/Deployment' + /graphql/v2?__resource=deployments&__method=remove: + post: + operationId: deployments_remove + summary: Removes a deployment + description: Removes a deployment. Backed by the Railway GraphQL mutation deploymentRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentRemove: + $ref: '#/components/schemas/DeploymentRemoveResult' + /graphql/v2?__resource=deployments&__method=restart: + post: + operationId: deployments_restart + summary: Restarts a deployment + description: Restarts a deployment. Backed by the Railway GraphQL mutation deploymentRestart. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentRestart: + $ref: '#/components/schemas/DeploymentRestartResult' + /graphql/v2?__resource=deployments&__method=rollback: + post: + operationId: deployments_rollback + summary: Rolls back to a deployment + description: Rolls back to a deployment. Backed by the Railway GraphQL mutation deploymentRollback. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentRollback: + $ref: '#/components/schemas/DeploymentRollbackResult' + /graphql/v2?__resource=deployments&__method=stop: + post: + operationId: deployments_stop + summary: Stops a deployment + description: Stops a deployment. Backed by the Railway GraphQL mutation deploymentStop. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentStop: + $ref: '#/components/schemas/DeploymentStopResult' +components: + schemas: + Deployment: + type: object + properties: + can_redeploy: + type: boolean + can_rollback: + type: boolean + created_at: + type: string + format: date-time + creator: + type: object + properties: + avatar: + type: string + email: + type: string + id: + type: string + name: + type: string + description: DeploymentCreator object + deployment_stopped: + type: boolean + description: Check if a deployment's instances have all stopped + diagnosis: + type: object + environment: + type: object + properties: + can_access: + type: boolean + config_etag: + type: string + description: Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + id: + type: string + is_ephemeral: + type: boolean + name: + type: string + project_id: + type: string + unmerged_changes_count: + type: integer + updated_at: + type: string + format: date-time + description: Environment object + environment_id: + type: string + id: + type: string + instances: + type: array + items: + type: object + properties: + id: + type: string + status: + type: string + enum: + - CRASHED + - CREATED + - EXITED + - INITIALIZING + - REMOVED + - REMOVING + - RESTARTING + - RUNNING + - SKIPPED + - STOPPED + description: List of DeploymentDeploymentInstance objects + meta: + type: object + project_id: + type: string + service_id: + type: string + snapshot_id: + type: string + sockets: + type: array + items: + type: object + properties: + ipv6: + type: boolean + port: + type: integer + process_name: + type: string + updated_at: + type: integer + description: List of DeploymentSocket objects + static_url: + type: string + status: + type: string + enum: + - BUILDING + - CRASHED + - DEPLOYING + - FAILED + - INITIALIZING + - NEEDS_APPROVAL + - QUEUED + - REMOVED + - REMOVING + - SKIPPED + - SLEEPING + - SUCCESS + - WAITING + status_updated_at: + type: string + format: date-time + suggest_add_service_domain: + type: boolean + updated_at: + type: string + format: date-time + url: + type: string + DeploymentApproveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentApprove mutation (Boolean!) + DeploymentCancelResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentCancel mutation (Boolean!) + DeploymentDeploymentInstance: + type: object + properties: + id: + type: string + status: + type: string + enum: + - CRASHED + - CREATED + - EXITED + - INITIALIZING + - REMOVED + - REMOVING + - RESTARTING + - RUNNING + - SKIPPED + - STOPPED + DeploymentEvent: + type: object + properties: + completed_at: + type: string + format: date-time + created_at: + type: string + format: date-time + id: + type: string + payload: + type: object + properties: + attempt: + type: integer + detail: + type: string + duration_ms: + type: integer + error: + type: string + max_attempts: + type: integer + reason: + type: string + skipped: + type: boolean + description: DeploymentEventPayload object + step: + type: string + enum: + - BUILD_IMAGE + - CONFIGURE_NETWORK + - CREATE_CONTAINER + - DRAIN_INSTANCES + - HEALTHCHECK + - MIGRATE_VOLUMES + - PRE_DEPLOY_COMMAND + - PUBLISH_IMAGE + - SNAPSHOT_CODE + - WAIT_FOR_DEPENDENCIES + DeploymentInstanceExecution: + type: object + properties: + completed_at: + type: string + format: date-time + created_at: + type: string + format: date-time + deployment_id: + type: string + deployment_meta: + type: object + id: + type: string + status: + type: string + enum: + - CRASHED + - CREATED + - EXITED + - INITIALIZING + - REMOVED + - REMOVING + - RESTARTING + - RUNNING + - SKIPPED + - STOPPED + updated_at: + type: string + format: date-time + DeploymentInstanceExecutionCreateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentInstanceExecutionCreate mutation (Boolean!) + DeploymentRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentRemove mutation (Boolean!) + DeploymentRestartResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentRestart mutation (Boolean!) + DeploymentRollbackResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentRollback mutation (Boolean!) + DeploymentSnapshot: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + updated_at: + type: string + format: date-time + variables: + type: object + DeploymentStopResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentStop mutation (Boolean!) + DeploymentTrigger: + type: object + properties: + base_environment_override_id: + type: string + branch: + type: string + check_suites: + type: boolean + environment_id: + type: string + id: + type: string + project_id: + type: string + provider: + type: string + repository: + type: string + service_id: + type: string + valid_check_suites: + type: integer + DeploymentTriggerDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the deploymentTriggerDelete mutation (Boolean!) + EnvironmentTriggersDeployResult: + type: object + properties: + result: + type: boolean + description: Value returned by the environmentTriggersDeploy mutation (Boolean!) + x-stackQL-resources: + deployment_events: + id: railway.deployments.deployment_events + name: deployment_events + title: Deployment Events + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_events&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deploymentEvents.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "deploymentEvents" -}}{"data":{"deploymentEvents":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployment_events/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + deployment_instance_executions: + id: railway.deployments.deployment_instance_executions + name: deployment_instance_executions + title: Deployment Instance Executions + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_instance_executions&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($service_instance_id: String!) { deploymentInstanceExecutionCreate(input: { serviceInstanceId: $service_instance_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "service_instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentInstanceExecutionCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentInstanceExecutionCreate":{"result":{{ toJson (index (index . "data") "deploymentInstanceExecutionCreate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_instance_executions&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deploymentInstanceExecutions.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "deploymentInstanceExecutions" -}}{"data":{"deploymentInstanceExecutions":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployment_instance_executions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/deployment_instance_executions/methods/create' + update: [] + delete: [] + replace: [] + deployment_instances: + id: railway.deployments.deployment_instances + name: deployment_instances + title: Deployment Instances + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_instances&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deployment.instances + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployment_instances/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + deployment_snapshots: + id: railway.deployments.deployment_snapshots + name: deployment_snapshots + title: Deployment Snapshots + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_snapshots&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deploymentSnapshot + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployment_snapshots/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + deployment_triggers: + id: railway.deployments.deployment_triggers + name: deployment_triggers + title: Deployment Triggers + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_triggers&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($branch: String!, $check_suites: Boolean, $environment_id: String!, $project_id: String!, $provider: String!, $repository: String!, $root_directory: String, $service_id: String!) { deploymentTriggerCreate(input: { branch: $branch, checkSuites: $check_suites, environmentId: $environment_id, projectId: $project_id, provider: $provider, repository: $repository, rootDirectory: $root_directory, serviceId: $service_id }) { base_environment_override_id: baseEnvironmentOverrideId branch check_suites: checkSuites environment_id: environmentId id project_id: projectId provider repository service_id: serviceId valid_check_suites: validCheckSuites } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "branch" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"branch":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "check_suites" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"check_suites":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "provider" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"provider":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "repository" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"repository":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_directory" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_directory":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentTriggerCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_triggers&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { deploymentTriggerDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentTriggerDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentTriggerDelete":{"result":{{ toJson (index (index . "data") "deploymentTriggerDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + deploy: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_triggers&__method=deploy/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $project_id: String!, $service_id: String!) { environmentTriggersDeploy(input: { environmentId: $environment_id, projectId: $project_id, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentTriggersDeploy + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"environmentTriggersDeploy":{"result":{{ toJson (index (index . "data") "environmentTriggersDeploy") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_triggers&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deploymentTriggers.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "deploymentTriggers" -}}{"data":{"deploymentTriggers":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_triggers&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $branch: String, $check_suites: Boolean, $repository: String, $root_directory: String) { deploymentTriggerUpdate(id: $id, input: { branch: $branch, checkSuites: $check_suites, repository: $repository, rootDirectory: $root_directory }) { base_environment_override_id: baseEnvironmentOverrideId branch check_suites: checkSuites environment_id: environmentId id project_id: projectId provider repository service_id: serviceId valid_check_suites: validCheckSuites } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "branch" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"branch":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "check_suites" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"check_suites":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "repository" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"repository":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_directory" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_directory":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentTriggerUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployment_triggers/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/deployment_triggers/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/deployment_triggers/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/deployment_triggers/methods/delete' + replace: [] + deployments: + id: railway.deployments.deployments + name: deployments + title: Deployments + methods: + approve: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=approve/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { deploymentApprove(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentApprove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentApprove":{"result":{{ toJson (index (index . "data") "deploymentApprove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + cancel: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=cancel/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { deploymentCancel(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentCancel + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentCancel":{"result":{{ toJson (index (index . "data") "deploymentCancel") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deployment + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deployments.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "deployments" -}}{"data":{"deployments":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + redeploy: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=redeploy/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $use_previous_image_tag: Boolean) { deploymentRedeploy(id: $id, usePreviousImageTag: $use_previous_image_tag) { can_redeploy: canRedeploy can_rollback: canRollback created_at: createdAt creator { avatar email id name } deployment_stopped: deploymentStopped diagnosis environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId id instances { id status } meta project_id: projectId service_id: serviceId snapshot_id: snapshotId sockets { ipv6 port process_name: processName updated_at: updatedAt } static_url: staticUrl status status_updated_at: statusUpdatedAt suggest_add_service_domain: suggestAddServiceDomain updated_at: updatedAt url } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "use_previous_image_tag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"use_previous_image_tag":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentRedeploy + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + remove: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=remove/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { deploymentRemove(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentRemove":{"result":{{ toJson (index (index . "data") "deploymentRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + restart: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=restart/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { deploymentRestart(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentRestart + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentRestart":{"result":{{ toJson (index (index . "data") "deploymentRestart") }}}}}{{- end -}}' + x-stackql-protocol: graphql + rollback: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=rollback/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { deploymentRollback(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentRollback + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentRollback":{"result":{{ toJson (index (index . "data") "deploymentRollback") }}}}}{{- end -}}' + x-stackql-protocol: graphql + stop: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployments&__method=stop/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { deploymentStop(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.deploymentStop + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"deploymentStop":{"result":{{ toJson (index (index . "data") "deploymentStop") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployments/methods/get' + - $ref: '#/components/x-stackQL-resources/deployments/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/deployments/methods/remove' + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/environments.yaml b/providers/src/railway/v00.00.00000/services/environments.yaml new file mode 100644 index 00000000..18c0e1ca --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/environments.yaml @@ -0,0 +1,1906 @@ +openapi: 3.0.3 +info: + title: Environments API + description: Environments, staged changes and patches, change sets, environment history and pending work. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=canvas_view_merges&__method=get_preview: + post: + operationId: canvas_view_merges_get_preview + summary: Preview a canvas layout merge from one environment to another + description: Preview a canvas layout merge from one environment to another. Returns the merged state and the mutations needed to reach it. Backed by the Railway GraphQL query canvasViewMergePreview. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.canvas_view_merges.get_preview + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { canvasViewMergePreview(sourceEnvironmentId: "{{ .source_environment_id }}" targetEnvironmentId: "{{ .target_environment_id }}") { mutations state } }' + x-stackql-protocol: graphql + parameters: + - name: source_environment_id + in: query + required: true + schema: + type: string + - name: target_environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One CanvasViewMergePreview row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + canvasViewMergePreview: + $ref: '#/components/schemas/CanvasViewMergePreview' + /graphql/v2?__resource=canvas_view_merges&__method=merge: + post: + operationId: canvas_view_merges_merge + summary: Merge a canvas layout from one environment into another + description: Merge a canvas layout from one environment into another. Re-computes the merge from current state and applies mutations. Backed by the Railway GraphQL mutation canvasViewMerge. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - source_environment_id + - target_environment_id + properties: + source_environment_id: + type: string + target_environment_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + canvasViewMerge: + $ref: '#/components/schemas/CanvasViewMergeResult' + /graphql/v2?__resource=environment_change_sets&__method=apply: + post: + operationId: environment_change_sets_apply + summary: 'Experimental: applies an intent-level RailwayChangeSet and returns operation results' + description: 'Experimental: applies an intent-level RailwayChangeSet and returns operation results. Backed by the Railway GraphQL mutation environmentApplyChangeSet.' + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - input + properties: + base_config_etag: + type: string + description: Snapshot token from Environment.configEtag the plan was computed against. When set, the apply is rejected if the environment has changed since. + commit_message: + type: string + environment_id: + type: string + input: + type: object + wait_for_completion: + type: string + enum: + - 'true' + - 'false' + description: Defaults to true for compatibility. Async-capable clients set false and poll environmentChangeSetApply. Boolean passed as a string, for example 'true'. + responses: + '200': + description: The ChangeSetApplyResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentApplyChangeSet: + $ref: '#/components/schemas/ChangeSetApplyResult' + /graphql/v2?__resource=environment_change_sets&__method=get: + post: + operationId: environment_change_sets_get + summary: Returns the status or completed result of an asynchronous RailwayChangeSet apply + description: Returns the status or completed result of an asynchronous RailwayChangeSet apply. Backed by the Railway GraphQL query environmentChangeSetApply. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environment_change_sets.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { environmentChangeSetApply(environmentId: "{{ .environment_id }}" id: "{{ .id }}") { changes { kind path status summary } deployment_id: deploymentId diagnostics id operation_id: operationId staged_patch_id: stagedPatchId status } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One ChangeSetApplyResult row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentChangeSetApply: + $ref: '#/components/schemas/ChangeSetApplyResult' + /graphql/v2?__resource=environment_change_sets&__method=preview: + post: + operationId: environment_change_sets_preview + summary: 'Experimental: previews an intent-level RailwayChangeSet without side effects' + description: 'Experimental: previews an intent-level RailwayChangeSet without side effects. Backed by the Railway GraphQL mutation environmentPreviewChangeSet.' + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - input + properties: + environment_id: + type: string + input: + type: object + responses: + '200': + description: The ChangeSetPreview the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentPreviewChangeSet: + $ref: '#/components/schemas/ChangeSetPreview' + /graphql/v2?__resource=environment_history&__method=list: + post: + operationId: environment_history_list + summary: Settled history for an environment (system events + terminal operations), newest first + description: Settled history for an environment (system events + terminal operations), newest first. Cursor-paginated. Backed by the Railway GraphQL query environmentHistory. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environment_history.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environmentHistory.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.environmentHistory.pageInfo.endCursor + terminateOnJsonPath: $.data.environmentHistory.pageInfo.hasNextPage + query: 'query { environmentHistory(first: 100{{ .cursor }} environmentId: "{{ .environment_id }}" {{ if or .actions .objects .outcomes .service_ids }}filter: { {{ if .actions }}actions: {{ .actions }} {{ end }}{{ if .objects }}objects: {{ .objects }} {{ end }}{{ if .outcomes }}outcomes: {{ .outcomes }} {{ end }}{{ if .service_ids }}serviceIds: {{ .service_ids }} {{ end }}} {{ end }}) { edges { node { action activity_payload: activityPayload actor { on_behalf_of: onBehalfOf principal surface } changes created_at: createdAt id object operation_kind: operationKind outcome parent_ref: parentRef payload service_ids: serviceIds severity source workflow_id: workflowId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: actions + in: query + required: false + description: GraphQL list literal, for example ["a", "b"]. + schema: + type: string + - name: objects + in: query + required: false + description: GraphQL list literal, for example ["a", "b"]. + schema: + type: string + - name: outcomes + in: query + required: false + description: Any of '', 'applied', 'failed'. GraphQL list literal, for example ["a", "b"]. + schema: + type: string + - name: service_ids + in: query + required: false + description: GraphQL list literal, for example ["a", "b"]. + schema: + type: string + responses: + '200': + description: 'One row per ProjectHistoryEntry. One settled change in an environment: a system event or a terminal operation (patch, deploy, …).' + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentHistory: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/ProjectHistoryEntry' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=environment_legacy_static_egress&__method=get: + post: + operationId: environment_legacy_static_egress_get + summary: Whether any service in the environment is on legacy static egress (not HA) + description: Whether any service in the environment is on legacy static egress (not HA). Used to surface the HA migration banner. Backed by the Railway GraphQL query environmentHasLegacyStaticEgress. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environment_legacy_static_egress.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environmentHasLegacyStaticEgress[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { environmentHasLegacyStaticEgress(environmentId: "{{ .environment_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentHasLegacyStaticEgress: + type: array + items: + $ref: '#/components/schemas/EnvironmentHasLegacyStaticEgressResult' + /graphql/v2?__resource=environment_patches&__method=commit: + post: + operationId: environment_patches_commit + summary: Commit the provided patch to the environment + description: Commit the provided patch to the environment. Backed by the Railway GraphQL mutation environmentPatchCommit. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + properties: + commit_message: + type: string + environment_id: + type: string + patch: + type: object + skip_deploys: + type: string + enum: + - 'true' + - 'false' + description: Skip deploys for services affected by this patch. Boolean passed as a string, for example 'true'. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentPatchCommit: + $ref: '#/components/schemas/EnvironmentPatchCommitResult' + /graphql/v2?__resource=environment_patches&__method=get: + post: + operationId: environment_patches_get + summary: Get a single environment patch by ID + description: Get a single environment patch by ID. Backed by the Railway GraphQL query environmentPatch. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environment_patches.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { environmentPatch(id: "{{ .id }}") { applied_at: appliedAt applied_by: appliedBy { avatar email id name username } created_at: createdAt environment_id: environmentId id last_applied_error: lastAppliedError message patch status updated_at: updatedAt } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One EnvironmentPatch row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentPatch: + $ref: '#/components/schemas/EnvironmentPatch' + /graphql/v2?__resource=environment_patches&__method=list: + post: + operationId: environment_patches_list + summary: Get the patches for an environment + description: Get the patches for an environment. Backed by the Railway GraphQL query environmentPatches. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environment_patches.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environmentPatches.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.environmentPatches.pageInfo.endCursor + terminateOnJsonPath: $.data.environmentPatches.pageInfo.hasNextPage + query: 'query { environmentPatches(first: 100{{ .cursor }} environmentId: "{{ .environment_id }}") { edges { node { applied_at: appliedAt applied_by: appliedBy { avatar email id name username } created_at: createdAt environment_id: environmentId id last_applied_error: lastAppliedError message patch status updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per EnvironmentPatch. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentPatches: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/EnvironmentPatch' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=environment_patches&__method=restage: + post: + operationId: environment_patches_restage + summary: Copy a FAILED patch's changes into the environment's staged patch (creating one if needed) + description: Copy a FAILED patch's changes into the environment's staged patch (creating one if needed). The FAILED patch is left untouched. Backed by the Railway GraphQL mutation environmentPatchRestage. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - patch_id + properties: + patch_id: + type: string + responses: + '200': + description: The EnvironmentPatch the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentPatchRestage: + $ref: '#/components/schemas/EnvironmentPatch' + /graphql/v2?__resource=environment_pending_work&__method=list: + post: + operationId: environment_pending_work_list + summary: Pending project-mutating work for an environment + description: Pending project-mutating work for an environment. Unions registered OperationSources (patches, standalone deploys) and returns parent rows only — not a stored inbox. Backed by the Railway GraphQL query environmentPendingWork. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environment_pending_work.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environmentPendingWork[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { environmentPendingWork(environmentId: "{{ .environment_id }}") { actor { on_behalf_of: onBehalfOf principal surface } changes environment_id: environmentId finished_at: finishedAt id kind parent_ref: parentRef started_at: startedAt status workflow_id: workflowId } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ProjectOperation. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentPendingWork: + type: array + items: + $ref: '#/components/schemas/ProjectOperation' + /graphql/v2?__resource=environment_staged_changes&__method=commit: + post: + operationId: environment_staged_changes_commit + summary: Commits the staged changes for a single environment + description: Commits the staged changes for a single environment. Backed by the Railway GraphQL mutation environmentPatchCommitStaged. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + properties: + commit_message: + type: string + environment_id: + type: string + skip_deploys: + type: string + enum: + - 'true' + - 'false' + description: Skip deploys for services affected by this patch. Boolean passed as a string, for example 'true'. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentPatchCommitStaged: + $ref: '#/components/schemas/EnvironmentPatchCommitStagedResult' + /graphql/v2?__resource=environment_staged_changes&__method=get: + post: + operationId: environment_staged_changes_get + summary: Get the latest staged commit for a single environment + description: Get the latest staged commit for a single environment. Backed by the Railway GraphQL query environmentStagedChanges. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environment_staged_changes.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { environmentStagedChanges(environmentId: "{{ .environment_id }}") { applied_at: appliedAt applied_by: appliedBy { avatar email id name username } created_at: createdAt environment_id: environmentId id last_applied_error: lastAppliedError message patch status updated_at: updatedAt } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One EnvironmentPatch row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentStagedChanges: + $ref: '#/components/schemas/EnvironmentPatch' + /graphql/v2?__resource=environment_staged_changes&__method=stage: + post: + operationId: environment_staged_changes_stage + summary: Sets the staged patch for a single environment + description: Sets the staged patch for a single environment. Backed by the Railway GraphQL mutation environmentStageChanges. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - input + properties: + environment_id: + type: string + input: + type: object + merge: + type: string + enum: + - 'true' + - 'false' + description: Merge the input patch into the existing staged patch. Boolean passed as a string, for example 'true'. + responses: + '200': + description: The EnvironmentPatch the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentStageChanges: + $ref: '#/components/schemas/EnvironmentPatch' + /graphql/v2?__resource=environments&__method=create: + post: + operationId: environments_create + summary: Creates a new environment + description: Creates a new environment. Backed by the Railway GraphQL mutation environmentCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - project_id + properties: + apply_changes_in_background: + type: boolean + description: If true, the changes will be applied in the background and the mutation will return immediately. If false, the mutation will wait for the changes to be applied before returning. + ephemeral: + type: boolean + name: + type: string + project_id: + type: string + skip_initial_deploys: + type: boolean + description: When committing the changes immediately, skip any initial deployments. + source_environment_id: + type: string + description: Create the environment with all of the services, volumes, configuration, and variables from this source environment. + stage_initial_changes: + type: boolean + description: Stage the initial changes for the environment. If false (default), the changes will be committed immediately. + responses: + '200': + description: The Environment the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentCreate: + $ref: '#/components/schemas/Environment' + /graphql/v2?__resource=environments&__method=delete: + post: + operationId: environments_delete + summary: Deletes an environment + description: Deletes an environment. Backed by the Railway GraphQL mutation environmentDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentDelete: + $ref: '#/components/schemas/EnvironmentDeleteResult' + /graphql/v2?__resource=environments&__method=get: + post: + operationId: environments_get + summary: Find a single environment + description: Find a single environment. Backed by the Railway GraphQL query environment. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environments.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { environment(id: "{{ .id }}" {{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}) { can_access: canAccess canvas_group_refs: canvasGroupRefs config config_etag: configEtag created_at: createdAt deleted_at: deletedAt iac_partials: iacPartials id is_ephemeral: isEphemeral meta { base_branch: baseBranch branch latest_successful_git_hub_deployment_id: latestSuccessfulGitHubDeploymentId pr_comment_id: prCommentId pr_number: prNumber pr_repo: prRepo pr_title: prTitle skipped_resource_ids: skippedResourceIds } name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One Environment row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environment: + $ref: '#/components/schemas/Environment' + /graphql/v2?__resource=environments&__method=import_docker_compose: + post: + operationId: environments_import_docker_compose + summary: Create services and volumes from docker compose + description: Create services and volumes from docker compose. Backed by the Railway GraphQL mutation dockerComposeImport. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - yaml + properties: + environment_id: + type: string + project_id: + type: string + skip_staging_patch: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + yaml: + type: string + responses: + '200': + description: The DockerComposeImport the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + dockerComposeImport: + $ref: '#/components/schemas/DockerComposeImport' + /graphql/v2?__resource=environments&__method=list: + post: + operationId: environments_list + summary: Gets all environments for a project + description: Gets all environments for a project. Backed by the Railway GraphQL query environments. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.environments.environments.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environments.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.environments.pageInfo.endCursor + terminateOnJsonPath: $.data.environments.pageInfo.hasNextPage + query: 'query { environments(first: 100{{ .cursor }} {{ if .is_ephemeral }}isEphemeral: {{ .is_ephemeral }} {{ end }}projectId: "{{ .project_id }}") { edges { node { can_access: canAccess canvas_group_refs: canvasGroupRefs config config_etag: configEtag created_at: createdAt deleted_at: deletedAt iac_partials: iacPartials id is_ephemeral: isEphemeral meta { base_branch: baseBranch branch latest_successful_git_hub_deployment_id: latestSuccessfulGitHubDeploymentId pr_comment_id: prCommentId pr_number: prNumber pr_repo: prRepo pr_title: prTitle skipped_resource_ids: skippedResourceIds } name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: is_ephemeral + in: query + required: false + schema: + type: boolean + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Environment. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environments: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Environment' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=environments&__method=release_iac_partial: + post: + operationId: environments_release_iac_partial + summary: Release resources from a named IaC partial without deleting, redeploying, or changing them + description: Release resources from a named IaC partial without deleting, redeploying, or changing them. Omit resources to release the entire partial. Whole-project management is possible once no named partials remain. A later named-partial apply can claim released resources again. Backed by the Railway GraphQL mutation environmentIacPartialRelease. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - partial + properties: + base_config_etag: + type: string + description: Snapshot token from Environment.configEtag the ownership preview was computed against. When set, the release is rejected if the environment has changed since. + environment_id: + type: string + partial: + type: string + resources: + type: array + items: + type: string + description: Resource addresses to release (for example service.api). Every address must belong to the named partial. Omit to release all of its resources; an empty list is rejected. + responses: + '200': + description: The IacPartialOwnershipResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentIacPartialRelease: + $ref: '#/components/schemas/IacPartialOwnershipResult' + /graphql/v2?__resource=environments&__method=rename: + post: + operationId: environments_rename + summary: Renames an environment + description: Renames an environment. Backed by the Railway GraphQL mutation environmentRename. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - name + properties: + id: + type: string + name: + type: string + responses: + '200': + description: The Environment the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentRename: + $ref: '#/components/schemas/Environment' + /graphql/v2?__resource=environments&__method=transfer_iac_partial: + post: + operationId: environments_transfer_iac_partial + summary: Transfer resources between named IaC partials without deleting, redeploying, or changing them + description: Transfer resources between named IaC partials without deleting, redeploying, or changing them. Omit resources to transfer the entire source partial. The destination may be a new or existing partial. Backed by the Railway GraphQL mutation environmentIacPartialTransfer. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - from_partial + - to_partial + properties: + base_config_etag: + type: string + description: Snapshot token from Environment.configEtag the ownership preview was computed against. When set, the transfer is rejected if the environment has changed since. + environment_id: + type: string + from_partial: + type: string + resources: + type: array + items: + type: string + description: Resource addresses to transfer (for example service.api). Every address must belong to fromPartial. Omit to transfer all of its resources; an empty list is rejected. + to_partial: + type: string + responses: + '200': + description: The IacPartialOwnershipResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentIacPartialTransfer: + $ref: '#/components/schemas/IacPartialOwnershipResult' + /graphql/v2?__resource=environments&__method=unskip_service: + post: + operationId: environments_unskip_service + summary: Deploy a service that was skipped when its environment was created, along with its skipped transitive dependencies + description: Deploy a service that was skipped when its environment was created, along with its skipped transitive dependencies. Backed by the Railway GraphQL mutation environmentUnskipService. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentUnskipService: + $ref: '#/components/schemas/EnvironmentUnskipServiceResult' + /graphql/v2?__resource=environments&__method=upsert_config_plan_comment: + post: + operationId: environments_upsert_config_plan_comment + summary: Posts or updates a `railway config plan` comment on a GitHub pull request under the Railway app identity + description: Posts or updates a `railway config plan` comment on a GitHub pull request under the Railway app identity. The caller proves it runs in the target repo with a GitHub Actions OIDC token; the comment body is composed server-side from the structured plan. Backed by the Railway GraphQL mutation environmentConfigPlanCommentUpsert. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - github_oidc_token + - plan + - pr_number + properties: + environment_id: + type: string + github_oidc_token: + type: string + description: 'GitHub Actions OIDC token (id-token: write) with audience `railway`. Its `repository` claim proves the caller runs in the repo the comment is posted to.' + plan: + type: object + description: 'Structured plan summary: { changes: [{ kind?, summary }], destructive, sourceTree, configEtag, changeSetHash, cliVersion? }. The comment body is composed server-side.' + pr_number: + type: string + description: Integer passed as a string, for example '1'. + responses: + '200': + description: The EnvironmentConfigPlanCommentUpsertResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentConfigPlanCommentUpsert: + $ref: '#/components/schemas/EnvironmentConfigPlanCommentUpsertResult' +components: + schemas: + CanvasViewMergePreview: + type: object + properties: + mutations: + type: array + items: + type: object + state: + type: object + CanvasViewMergeResult: + type: object + properties: + result: + type: boolean + description: Value returned by the canvasViewMerge mutation (Boolean!) + ChangeSetApplyResult: + type: object + properties: + changes: + type: array + items: + type: object + properties: + kind: + type: string + path: + type: string + status: + type: string + summary: + type: string + description: List of ChangeOperationResult objects + deployment_id: + type: string + diagnostics: + type: object + id: + type: string + operation_id: + type: string + staged_patch_id: + type: string + status: + type: string + ChangeSetPreview: + type: object + properties: + change_set: + type: object + diagnostics: + type: object + effects: + type: object + DockerComposeImport: + type: object + properties: + errors: + type: array + items: + type: string + patch: + type: object + Environment: + type: object + properties: + can_access: + type: boolean + canvas_group_refs: + type: object + config: + type: object + config_etag: + type: string + description: Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + iac_partials: + type: object + description: IaC resource address → partial name for this environment. '*' is the whole-project owner. Used so omit=delete only applies to resources this file already owns. + id: + type: string + is_ephemeral: + type: boolean + meta: + type: object + properties: + base_branch: + type: string + branch: + type: string + latest_successful_git_hub_deployment_id: + type: integer + pr_comment_id: + type: integer + pr_number: + type: integer + pr_repo: + type: string + pr_title: + type: string + skipped_resource_ids: + type: object + description: EnvironmentMeta object + name: + type: string + project_id: + type: string + unmerged_changes_count: + type: integer + updated_at: + type: string + format: date-time + EnvironmentConfigPlanCommentUpsertResult: + type: object + properties: + comment_id: + type: string + url: + type: string + EnvironmentDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the environmentDelete mutation (Boolean!) + EnvironmentHasLegacyStaticEgressResult: + type: object + properties: + result: + type: boolean + description: environmentHasLegacyStaticEgress value + EnvironmentPatch: + type: object + properties: + applied_at: + type: string + format: date-time + applied_by: + type: object + properties: + avatar: + type: string + email: + type: string + id: + type: string + name: + type: string + username: + type: string + description: AppliedByMember object + created_at: + type: string + format: date-time + environment_id: + type: string + id: + type: string + last_applied_error: + type: string + message: + type: string + patch: + type: object + status: + type: string + enum: + - APPLYING + - COMMITTED + - FAILED + - STAGED + updated_at: + type: string + format: date-time + EnvironmentPatchCommitResult: + type: object + properties: + result: + type: string + description: Value returned by the environmentPatchCommit mutation (String!) + EnvironmentPatchCommitStagedResult: + type: object + properties: + result: + type: string + description: Value returned by the environmentPatchCommitStaged mutation (String!) + EnvironmentUnskipServiceResult: + type: object + properties: + result: + type: boolean + description: Value returned by the environmentUnskipService mutation (Boolean!) + IacPartialOwnershipResult: + type: object + properties: + affected_resources: + type: array + items: + type: string + description: Resource addresses whose ownership changed. + iac_partials: + type: object + description: The environment's complete ownership map after the change. + ProjectHistoryEntry: + type: object + properties: + action: + type: string + activity_payload: + type: object + description: Minimal payload for activity feed list rendering. Same trimming as Event.activityPayload. + actor: + type: object + properties: + on_behalf_of: + type: string + principal: + type: string + surface: + type: string + description: ProjectOperationActor object + changes: + type: object + created_at: + type: string + format: date-time + description: When the change settled. + id: + type: string + object: + type: string + operation_kind: + type: string + description: ''''' for a plain event; e.g. ''patch'', ''deploy'' for operations.' + outcome: + type: string + description: ''''' for a plain event; ''applied'' or ''failed'' for operations.' + parent_ref: + type: string + payload: + type: object + service_ids: + type: array + items: + type: string + severity: + type: string + enum: + - CRITICAL + - INFO + - NOTICE + - WARNING + source: + type: string + workflow_id: + type: string + ProjectOperation: + type: object + properties: + actor: + type: object + properties: + on_behalf_of: + type: string + principal: + type: string + surface: + type: string + description: ProjectOperationActor object + changes: + type: object + environment_id: + type: string + finished_at: + type: string + format: date-time + id: + type: string + kind: + type: string + parent_ref: + type: string + started_at: + type: string + format: date-time + status: + type: string + enum: + - applied + - applying + - failed + - staged + workflow_id: + type: string + x-stackQL-resources: + canvas_view_merges: + id: railway.environments.canvas_view_merges + name: canvas_view_merges + title: Canvas View Merges + methods: + get_preview: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=canvas_view_merges&__method=get_preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.canvasViewMergePreview + x-stackql-protocol: graphql + merge: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=canvas_view_merges&__method=merge/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($source_environment_id: String!, $target_environment_id: String!) { canvasViewMerge(sourceEnvironmentId: $source_environment_id, targetEnvironmentId: $target_environment_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "source_environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source_environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "target_environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"target_environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.canvasViewMerge + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"canvasViewMerge":{"result":{{ toJson (index (index . "data") "canvasViewMerge") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/canvas_view_merges/methods/get_preview' + insert: [] + update: [] + delete: [] + replace: [] + environment_change_sets: + id: railway.environments.environment_change_sets + name: environment_change_sets + title: Environment Change Sets + methods: + apply: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_change_sets&__method=apply/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($base_config_etag: String, $commit_message: String, $environment_id: String!, $input: JSON!, $wait_for_completion: Boolean) { environmentApplyChangeSet(baseConfigEtag: $base_config_etag, commitMessage: $commit_message, environmentId: $environment_id, input: $input, waitForCompletion: $wait_for_completion) { changes { kind path status summary } deployment_id: deploymentId diagnostics id operation_id: operationId staged_patch_id: stagedPatchId status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "base_config_etag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"base_config_etag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "commit_message" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"commit_message":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "input" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"input":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "wait_for_completion" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"wait_for_completion":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentApplyChangeSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_change_sets&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentChangeSetApply + x-stackql-protocol: graphql + preview: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_change_sets&__method=preview/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $input: JSON!) { environmentPreviewChangeSet(environmentId: $environment_id, input: $input) { change_set: changeSet diagnostics effects } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "input" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"input":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentPreviewChangeSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_change_sets/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + environment_history: + id: railway.environments.environment_history + name: environment_history + title: Environment History + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_history&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentHistory.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "environmentHistory" -}}{"data":{"environmentHistory":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_history/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + environment_legacy_static_egress: + id: railway.environments.environment_legacy_static_egress + name: environment_legacy_static_egress + title: Environment Legacy Static Egress + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_legacy_static_egress&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentHasLegacyStaticEgress + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"environmentHasLegacyStaticEgress":[{"result":{{ toJson (index (index . "data") "environmentHasLegacyStaticEgress") }}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_legacy_static_egress/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + environment_patches: + id: railway.environments.environment_patches + name: environment_patches + title: Environment Patches + methods: + commit: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_patches&__method=commit/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($commit_message: String, $environment_id: String!, $patch: EnvironmentConfig, $skip_deploys: Boolean) { environmentPatchCommit(commitMessage: $commit_message, environmentId: $environment_id, patch: $patch, skipDeploys: $skip_deploys) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "commit_message" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"commit_message":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "patch" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"patch":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "skip_deploys" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"skip_deploys":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentPatchCommit + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"environmentPatchCommit":{"result":{{ toJson (index (index . "data") "environmentPatchCommit") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_patches&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentPatch + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_patches&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentPatches.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "environmentPatches" -}}{"data":{"environmentPatches":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + restage: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_patches&__method=restage/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($patch_id: String!) { environmentPatchRestage(patchId: $patch_id) { applied_at: appliedAt applied_by: appliedBy { avatar email id name username } created_at: createdAt environment_id: environmentId id last_applied_error: lastAppliedError message patch status updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "patch_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"patch_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentPatchRestage + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_patches/methods/get' + - $ref: '#/components/x-stackQL-resources/environment_patches/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + environment_pending_work: + id: railway.environments.environment_pending_work + name: environment_pending_work + title: Environment Pending Work + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_pending_work&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentPendingWork + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_pending_work/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + environment_staged_changes: + id: railway.environments.environment_staged_changes + name: environment_staged_changes + title: Environment Staged Changes + methods: + commit: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_staged_changes&__method=commit/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($commit_message: String, $environment_id: String!, $skip_deploys: Boolean) { environmentPatchCommitStaged(commitMessage: $commit_message, environmentId: $environment_id, skipDeploys: $skip_deploys) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "commit_message" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"commit_message":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "skip_deploys" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"skip_deploys":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentPatchCommitStaged + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"environmentPatchCommitStaged":{"result":{{ toJson (index (index . "data") "environmentPatchCommitStaged") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_staged_changes&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentStagedChanges + x-stackql-protocol: graphql + stage: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_staged_changes&__method=stage/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $input: EnvironmentConfig!, $merge: Boolean) { environmentStageChanges(environmentId: $environment_id, input: $input, merge: $merge) { applied_at: appliedAt applied_by: appliedBy { avatar email id name username } created_at: createdAt environment_id: environmentId id last_applied_error: lastAppliedError message patch status updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "input" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"input":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "merge" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"merge":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentStageChanges + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_staged_changes/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + environments: + id: railway.environments.environments + name: environments + title: Environments + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($apply_changes_in_background: Boolean, $ephemeral: Boolean, $name: String!, $project_id: String!, $skip_initial_deploys: Boolean, $source_environment_id: String, $stage_initial_changes: Boolean) { environmentCreate(input: { applyChangesInBackground: $apply_changes_in_background, ephemeral: $ephemeral, name: $name, projectId: $project_id, skipInitialDeploys: $skip_initial_deploys, sourceEnvironmentId: $source_environment_id, stageInitialChanges: $stage_initial_changes }) { can_access: canAccess canvas_group_refs: canvasGroupRefs config config_etag: configEtag created_at: createdAt deleted_at: deletedAt iac_partials: iacPartials id is_ephemeral: isEphemeral meta { base_branch: baseBranch branch latest_successful_git_hub_deployment_id: latestSuccessfulGitHubDeploymentId pr_comment_id: prCommentId pr_number: prNumber pr_repo: prRepo pr_title: prTitle skipped_resource_ids: skippedResourceIds } name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "apply_changes_in_background" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"apply_changes_in_background":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "ephemeral" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ephemeral":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "skip_initial_deploys" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"skip_initial_deploys":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "source_environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source_environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "stage_initial_changes" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"stage_initial_changes":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { environmentDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"environmentDelete":{"result":{{ toJson (index (index . "data") "environmentDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environment + x-stackql-protocol: graphql + import_docker_compose: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=import_docker_compose/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $project_id: String!, $skip_staging_patch: Boolean, $yaml: String!) { dockerComposeImport(environmentId: $environment_id, projectId: $project_id, skipStagingPatch: $skip_staging_patch, yaml: $yaml) { errors patch } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "skip_staging_patch" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"skip_staging_patch":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "yaml" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"yaml":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.dockerComposeImport + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environments.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "environments" -}}{"data":{"environments":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + release_iac_partial: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=release_iac_partial/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($base_config_etag: String, $environment_id: String!, $partial: String!, $resources: [String!]) { environmentIacPartialRelease(baseConfigEtag: $base_config_etag, environmentId: $environment_id, partial: $partial, resources: $resources) { affected_resources: affectedResources iac_partials: iacPartials } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "base_config_etag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"base_config_etag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "partial" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"partial":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "resources" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"resources":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentIacPartialRelease + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + rename: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=rename/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $name: String!) { environmentRename(id: $id, input: { name: $name }) { can_access: canAccess canvas_group_refs: canvasGroupRefs config config_etag: configEtag created_at: createdAt deleted_at: deletedAt iac_partials: iacPartials id is_ephemeral: isEphemeral meta { base_branch: baseBranch branch latest_successful_git_hub_deployment_id: latestSuccessfulGitHubDeploymentId pr_comment_id: prCommentId pr_number: prNumber pr_repo: prRepo pr_title: prTitle skipped_resource_ids: skippedResourceIds } name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentRename + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + transfer_iac_partial: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=transfer_iac_partial/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($base_config_etag: String, $environment_id: String!, $from_partial: String!, $resources: [String!], $to_partial: String!) { environmentIacPartialTransfer(baseConfigEtag: $base_config_etag, environmentId: $environment_id, fromPartial: $from_partial, resources: $resources, toPartial: $to_partial) { affected_resources: affectedResources iac_partials: iacPartials } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "base_config_etag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"base_config_etag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "from_partial" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"from_partial":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "resources" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"resources":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "to_partial" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"to_partial":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentIacPartialTransfer + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + unskip_service: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=unskip_service/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!) { environmentUnskipService(environmentId: $environment_id, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentUnskipService + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"environmentUnskipService":{"result":{{ toJson (index (index . "data") "environmentUnskipService") }}}}}{{- end -}}' + x-stackql-protocol: graphql + upsert_config_plan_comment: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environments&__method=upsert_config_plan_comment/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $github_oidc_token: String!, $plan: JSON!, $pr_number: Int!) { environmentConfigPlanCommentUpsert(input: { environmentId: $environment_id, githubOidcToken: $github_oidc_token, plan: $plan, prNumber: $pr_number }) { comment_id: commentId url } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "github_oidc_token" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"github_oidc_token":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "plan" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"plan":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "pr_number" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"pr_number":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.environmentConfigPlanCommentUpsert + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environments/methods/get' + - $ref: '#/components/x-stackQL-resources/environments/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/environments/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/environments/methods/rename' + delete: + - $ref: '#/components/x-stackQL-resources/environments/methods/delete' + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/integrations.yaml b/providers/src/railway/v00.00.00000/services/integrations.yaml new file mode 100644 index 00000000..643d5e68 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/integrations.yaml @@ -0,0 +1,1395 @@ +openapi: 3.0.3 +info: + title: Integrations API + description: 'Project integrations and linked accounts: GitHub repositories, branches and access, Heroku and Vercel imports.' + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=github_pr_info_results&__method=get: + post: + operationId: github_pr_info_results_get + summary: Get info for a GitHub pull request, including fetch errors + description: Get info for a GitHub pull request, including fetch errors. Backed by the Railway GraphQL query githubPRInfoResult. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_pr_info_results.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { githubPRInfoResult(prNumber: {{ .pr_number }} serviceId: "{{ .service_id }}") { error pr_info: prInfo { additions author body changed_files: changedFiles deletions mergeable state title } } }' + x-stackql-protocol: graphql + parameters: + - name: pr_number + in: query + required: true + schema: + type: integer + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One GitHubPRInfoResult row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubPRInfoResult: + $ref: '#/components/schemas/GitHubPRInfoResult' + /graphql/v2?__resource=github_pr_info&__method=get: + post: + operationId: github_pr_info_get + summary: Get info for a GitHub pull request + description: Get info for a GitHub pull request. Backed by the Railway GraphQL query githubPRInfo. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_pr_info.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { githubPRInfo(prNumber: {{ .pr_number }} serviceId: "{{ .service_id }}") { additions author body changed_files: changedFiles checks { name status } deletions mergeable state title } }' + x-stackql-protocol: graphql + parameters: + - name: pr_number + in: query + required: true + schema: + type: integer + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One GitHubPRInfo row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubPRInfo: + $ref: '#/components/schemas/GitHubPRInfo' + /graphql/v2?__resource=github_repo_access&__method=get: + post: + operationId: github_repo_access_get + summary: Checks if user has access to GitHub repository + description: Checks if user has access to GitHub repository. Backed by the Railway GraphQL query gitHubRepoAccessAvailable. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_repo_access.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { gitHubRepoAccessAvailable(fullRepoName: "{{ .full_repo_name }}") { has_access: hasAccess is_public: isPublic } }' + x-stackql-protocol: graphql + parameters: + - name: full_repo_name + in: query + required: true + schema: + type: string + responses: + '200': + description: One GitHubAccess row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + gitHubRepoAccessAvailable: + $ref: '#/components/schemas/GitHubAccess' + /graphql/v2?__resource=github_repo_branches&__method=list: + post: + operationId: github_repo_branches_list + summary: Get branches for a GitHub repo that the authenticated user has access to + description: Get branches for a GitHub repo that the authenticated user has access to. Backed by the Railway GraphQL query githubRepoBranches. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_repo_branches.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.githubRepoBranches[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { githubRepoBranches(owner: "{{ .owner }}" repo: "{{ .repo }}") { name } }' + x-stackql-protocol: graphql + parameters: + - name: owner + in: query + required: true + schema: + type: string + - name: repo + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per GitHubBranch. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubRepoBranches: + type: array + items: + $ref: '#/components/schemas/GitHubBranch' + /graphql/v2?__resource=github_repo_name_availability&__method=get: + post: + operationId: github_repo_name_availability_get + summary: Check if a repo name is available + description: Check if a repo name is available. Backed by the Railway GraphQL query githubIsRepoNameAvailable. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_repo_name_availability.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.githubIsRepoNameAvailable[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { githubIsRepoNameAvailable(fullRepoName: "{{ .full_repo_name }}") }' + x-stackql-protocol: graphql + parameters: + - name: full_repo_name + in: query + required: true + schema: + type: string + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubIsRepoNameAvailable: + type: array + items: + $ref: '#/components/schemas/GithubIsRepoNameAvailableResult' + /graphql/v2?__resource=github_repos&__method=deploy: + post: + operationId: github_repos_deploy + summary: Deploys a GitHub repo + description: Deploys a GitHub repo. Backed by the Railway GraphQL mutation githubRepoDeploy. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + - repo + properties: + branch: + type: string + environment_id: + type: string + project_id: + type: string + repo: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubRepoDeploy: + $ref: '#/components/schemas/GithubRepoDeployResult' + /graphql/v2?__resource=github_repos&__method=get: + post: + operationId: github_repos_get + summary: Checks if user has access to GitHub repository + description: Checks if user has access to GitHub repository. Backed by the Railway GraphQL query githubRepo. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_repos.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { githubRepo(fullRepoName: "{{ .full_repo_name }}") { default_branch: defaultBranch description full_name: fullName id is_private: isPrivate name } }' + x-stackql-protocol: graphql + parameters: + - name: full_repo_name + in: query + required: true + schema: + type: string + responses: + '200': + description: One GitHubRepoWithoutInstallation row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubRepo: + $ref: '#/components/schemas/GitHubRepoWithoutInstallation' + /graphql/v2?__resource=github_repos&__method=list: + post: + operationId: github_repos_list + summary: Get a list of repos for a user that Railway has access to + description: Get a list of repos for a user that Railway has access to. Backed by the Railway GraphQL query githubRepos. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_repos.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.githubRepos[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { githubRepos { default_branch: defaultBranch description full_name: fullName id installation_id: installationId is_private: isPrivate name owner_avatar_url: ownerAvatarUrl } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per GitHubRepo. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubRepos: + type: array + items: + $ref: '#/components/schemas/GitHubRepo' + /graphql/v2?__resource=github_repos&__method=update: + post: + operationId: github_repos_update + summary: Updates a GitHub repo through the linked template + description: Updates a GitHub repo through the linked template. Backed by the Railway GraphQL mutation githubRepoUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - service_id + properties: + environment_id: + type: string + project_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubRepoUpdate: + $ref: '#/components/schemas/GithubRepoUpdateResult' + /graphql/v2?__resource=github_ssh_keys&__method=list: + post: + operationId: github_ssh_keys_list + summary: Gets SSH public keys from the authenticated user's GitHub account + description: Gets SSH public keys from the authenticated user's GitHub account. Backed by the Railway GraphQL query gitHubSshKeys. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_ssh_keys.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.gitHubSshKeys[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: query { gitHubSshKeys { id key title } } + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per GitHubSshKey. An SSH public key from GitHub. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + gitHubSshKeys: + type: array + items: + $ref: '#/components/schemas/GitHubSshKey' + /graphql/v2?__resource=github_writable_scopes&__method=list: + post: + operationId: github_writable_scopes_list + summary: Get a list of scopes the user has installed the installation to + description: Get a list of scopes the user has installed the installation to. Backed by the Railway GraphQL query githubWritableScopes. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.github_writable_scopes.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.githubWritableScopes[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: query { githubWritableScopes } + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per value, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + githubWritableScopes: + type: array + items: + $ref: '#/components/schemas/GithubWritableScopesResult' + /graphql/v2?__resource=heroku_apps&__method=import_variables: + post: + operationId: heroku_apps_import_variables + summary: Import variables from a Heroku app into a Railway service + description: Import variables from a Heroku app into a Railway service. Returns the number of variables imports. Backed by the Railway GraphQL mutation herokuImportVariables. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - heroku_app_id + - project_id + - service_id + properties: + environment_id: + type: string + heroku_app_id: + type: string + project_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + herokuImportVariables: + $ref: '#/components/schemas/HerokuImportVariablesResult' + /graphql/v2?__resource=heroku_apps&__method=list: + post: + operationId: heroku_apps_list + summary: Get the Herokus apps for the current user + description: Get the Herokus apps for the current user. Backed by the Railway GraphQL query herokuApps. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.heroku_apps.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.herokuApps[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: query { herokuApps { id name } } + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per HerokuApp. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + herokuApps: + type: array + items: + $ref: '#/components/schemas/HerokuApp' + /graphql/v2?__resource=integration_auths&__method=get: + post: + operationId: integration_auths_get + summary: Get an integration auth by provider providerId + description: Get an integration auth by provider providerId. Backed by the Railway GraphQL query integrationAuth. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.integration_auths.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { integrationAuth(provider: "{{ .provider }}" providerId: "{{ .provider_id }}") { id provider provider_id: providerId } }' + x-stackql-protocol: graphql + parameters: + - name: provider + in: query + required: true + schema: + type: string + - name: provider_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One IntegrationAuth row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + integrationAuth: + $ref: '#/components/schemas/IntegrationAuth' + /graphql/v2?__resource=integration_auths&__method=list: + post: + operationId: integration_auths_list + summary: Get all integration auths for a user + description: Get all integration auths for a user. Backed by the Railway GraphQL query integrationAuths. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.integration_auths.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.integrationAuths.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.integrationAuths.pageInfo.endCursor + terminateOnJsonPath: $.data.integrationAuths.pageInfo.hasNextPage + query: 'query { integrationAuths(first: 100{{ .cursor }}) { edges { node { id provider provider_id: providerId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per IntegrationAuth. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + integrationAuths: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/IntegrationAuth' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=integrations&__method=create: + post: + operationId: integrations_create + summary: Create an integration for a project + description: Create an integration for a project. Backed by the Railway GraphQL mutation integrationCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - config + - name + - project_id + properties: + config: + type: object + integration_auth_id: + type: string + name: + type: string + project_id: + type: string + responses: + '200': + description: The Integration the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + integrationCreate: + $ref: '#/components/schemas/Integration' + /graphql/v2?__resource=integrations&__method=delete: + post: + operationId: integrations_delete + summary: Delete an integration for a project + description: Delete an integration for a project. Backed by the Railway GraphQL mutation integrationDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + integrationDelete: + $ref: '#/components/schemas/IntegrationDeleteResult' + /graphql/v2?__resource=integrations&__method=list: + post: + operationId: integrations_list + summary: Get all integrations for a project + description: Get all integrations for a project. Backed by the Railway GraphQL query integrations. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.integrations.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.integrations.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.integrations.pageInfo.endCursor + terminateOnJsonPath: $.data.integrations.pageInfo.hasNextPage + query: 'query { integrations(first: 100{{ .cursor }} projectId: "{{ .project_id }}") { edges { node { config id name project_id: projectId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Integration. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + integrations: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Integration' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=integrations&__method=update: + post: + operationId: integrations_update + summary: Update an integration for a project + description: Update an integration for a project. Backed by the Railway GraphQL mutation integrationUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - config + - name + - project_id + properties: + id: + type: string + config: + type: object + integration_auth_id: + type: string + name: + type: string + project_id: + type: string + responses: + '200': + description: The Integration the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + integrationUpdate: + $ref: '#/components/schemas/Integration' + /graphql/v2?__resource=vercel_info&__method=get: + post: + operationId: vercel_info_get + summary: Get information about the user's Vercel accounts + description: Get information about the user's Vercel accounts. Backed by the Railway GraphQL query vercelInfo. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.integrations.vercel_info.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { vercelInfo { accounts { id integration_auth_id: integrationAuthId is_user: isUser name slug } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One VercelInfo row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + vercelInfo: + $ref: '#/components/schemas/VercelInfo' +components: + schemas: + GitHubAccess: + type: object + properties: + has_access: + type: boolean + is_public: + type: boolean + GitHubBranch: + type: object + properties: + name: + type: string + GithubIsRepoNameAvailableResult: + type: object + properties: + result: + type: boolean + description: githubIsRepoNameAvailable value + GitHubPRInfo: + type: object + properties: + additions: + type: integer + author: + type: string + body: + type: string + changed_files: + type: integer + checks: + type: array + items: + type: object + properties: + name: + type: string + status: + type: string + description: List of GitHubCheck objects + deletions: + type: integer + mergeable: + type: boolean + state: + type: string + title: + type: string + GitHubPRInfoResult: + type: object + properties: + error: + type: string + pr_info: + type: object + properties: + additions: + type: integer + author: + type: string + body: + type: string + changed_files: + type: integer + deletions: + type: integer + mergeable: + type: boolean + state: + type: string + title: + type: string + description: GitHubPRInfo object + GitHubRepo: + type: object + properties: + default_branch: + type: string + description: + type: string + full_name: + type: string + id: + type: integer + installation_id: + type: string + is_private: + type: boolean + name: + type: string + owner_avatar_url: + type: string + GithubRepoDeployResult: + type: object + properties: + result: + type: string + description: Value returned by the githubRepoDeploy mutation (String!) + GithubRepoUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the githubRepoUpdate mutation (Boolean!) + GitHubRepoWithoutInstallation: + type: object + properties: + default_branch: + type: string + description: + type: string + full_name: + type: string + id: + type: integer + is_private: + type: boolean + name: + type: string + GitHubSshKey: + type: object + properties: + id: + type: integer + key: + type: string + title: + type: string + GithubWritableScopesResult: + type: object + properties: + result: + type: string + description: githubWritableScopes value + HerokuApp: + type: object + properties: + id: + type: string + name: + type: string + HerokuImportVariablesResult: + type: object + properties: + result: + type: integer + description: Value returned by the herokuImportVariables mutation (Int!) + Integration: + type: object + properties: + config: + type: object + id: + type: string + name: + type: string + project_id: + type: string + IntegrationAuth: + type: object + properties: + id: + type: string + provider: + type: string + provider_id: + type: string + IntegrationDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the integrationDelete mutation (Boolean!) + VercelInfo: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + id: + type: string + integration_auth_id: + type: string + is_user: + type: boolean + name: + type: string + slug: + type: string + description: List of VercelAccount objects + x-stackQL-resources: + github_pr_info: + id: railway.integrations.github_pr_info + name: github_pr_info + title: Github Pr Info + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_pr_info&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.githubPRInfo + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_pr_info/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + github_pr_info_results: + id: railway.integrations.github_pr_info_results + name: github_pr_info_results + title: Github Pr Info Results + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_pr_info_results&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.githubPRInfoResult + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_pr_info_results/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + github_repo_access: + id: railway.integrations.github_repo_access + name: github_repo_access + title: Github Repo Access + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_repo_access&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.gitHubRepoAccessAvailable + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_repo_access/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + github_repo_branches: + id: railway.integrations.github_repo_branches + name: github_repo_branches + title: Github Repo Branches + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_repo_branches&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.githubRepoBranches + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_repo_branches/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + github_repo_name_availability: + id: railway.integrations.github_repo_name_availability + name: github_repo_name_availability + title: Github Repo Name Availability + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_repo_name_availability&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.githubIsRepoNameAvailable + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"githubIsRepoNameAvailable":[{"result":{{ toJson (index (index . "data") "githubIsRepoNameAvailable") }}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_repo_name_availability/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + github_repos: + id: railway.integrations.github_repos + name: github_repos + title: Github Repos + methods: + deploy: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_repos&__method=deploy/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($branch: String, $environment_id: String, $project_id: String!, $repo: String!) { githubRepoDeploy(input: { branch: $branch, environmentId: $environment_id, projectId: $project_id, repo: $repo }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "branch" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"branch":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "repo" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"repo":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.githubRepoDeploy + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"githubRepoDeploy":{"result":{{ toJson (index (index . "data") "githubRepoDeploy") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_repos&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.githubRepo + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_repos&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.githubRepos + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_repos&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $project_id: String!, $service_id: String!) { githubRepoUpdate(input: { environmentId: $environment_id, projectId: $project_id, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.githubRepoUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"githubRepoUpdate":{"result":{{ toJson (index (index . "data") "githubRepoUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_repos/methods/get' + - $ref: '#/components/x-stackQL-resources/github_repos/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/github_repos/methods/update' + delete: [] + replace: [] + github_ssh_keys: + id: railway.integrations.github_ssh_keys + name: github_ssh_keys + title: Github Ssh Keys + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_ssh_keys&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.gitHubSshKeys + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_ssh_keys/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + github_writable_scopes: + id: railway.integrations.github_writable_scopes + name: github_writable_scopes + title: Github Writable Scopes + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=github_writable_scopes&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.githubWritableScopes + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"githubWritableScopes":[{{- $s := separator "," -}}{{- range $v := index (index . "data") "githubWritableScopes" -}}{{ call $s }}{"result":{{ toJson $v }}}{{- end -}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/github_writable_scopes/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + heroku_apps: + id: railway.integrations.heroku_apps + name: heroku_apps + title: Heroku Apps + methods: + import_variables: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=heroku_apps&__method=import_variables/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $heroku_app_id: String!, $project_id: String!, $service_id: String!) { herokuImportVariables(input: { environmentId: $environment_id, herokuAppId: $heroku_app_id, projectId: $project_id, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "heroku_app_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"heroku_app_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.herokuImportVariables + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"herokuImportVariables":{"result":{{ toJson (index (index . "data") "herokuImportVariables") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=heroku_apps&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.herokuApps + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/heroku_apps/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + integration_auths: + id: railway.integrations.integration_auths + name: integration_auths + title: Integration Auths + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=integration_auths&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.integrationAuth + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=integration_auths&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.integrationAuths.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "integrationAuths" -}}{"data":{"integrationAuths":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/integration_auths/methods/get' + - $ref: '#/components/x-stackQL-resources/integration_auths/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + integrations: + id: railway.integrations.integrations + name: integrations + title: Integrations + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=integrations&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($config: JSON!, $integration_auth_id: String, $name: String!, $project_id: String!) { integrationCreate(input: { config: $config, integrationAuthId: $integration_auth_id, name: $name, projectId: $project_id }) { config id name project_id: projectId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "config" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"config":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "integration_auth_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"integration_auth_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.integrationCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=integrations&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { integrationDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.integrationDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"integrationDelete":{"result":{{ toJson (index (index . "data") "integrationDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=integrations&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.integrations.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "integrations" -}}{"data":{"integrations":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=integrations&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $config: JSON!, $integration_auth_id: String, $name: String!, $project_id: String!) { integrationUpdate(id: $id, input: { config: $config, integrationAuthId: $integration_auth_id, name: $name, projectId: $project_id }) { config id name project_id: projectId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "config" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"config":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "integration_auth_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"integration_auth_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.integrationUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/integrations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/integrations/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/integrations/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/integrations/methods/delete' + replace: [] + vercel_info: + id: railway.integrations.vercel_info + name: vercel_info + title: Vercel Info + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=vercel_info&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.vercelInfo + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/vercel_info/methods/get' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/networking.yaml b/providers/src/railway/v00.00.00000/services/networking.yaml new file mode 100644 index 00000000..17a11c7f --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/networking.yaml @@ -0,0 +1,3523 @@ +openapi: 3.0.3 +info: + title: Networking API + description: Service domains, custom domains, TCP proxies, private networks, egress gateways, and Railway-registered domains with their DNS records and email forwarding rules. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=custom_domain_availability&__method=get: + post: + operationId: custom_domain_availability_get + summary: Checks if a custom domain is available + description: Checks if a custom domain is available. Backed by the Railway GraphQL query customDomainAvailable. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.custom_domain_availability.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { customDomainAvailable(domain: "{{ .domain }}") { available message } }' + x-stackql-protocol: graphql + parameters: + - name: domain + in: query + required: true + schema: + type: string + responses: + '200': + description: One DomainAvailable row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customDomainAvailable: + $ref: '#/components/schemas/DomainAvailable' + /graphql/v2?__resource=custom_domains&__method=create: + post: + operationId: custom_domains_create + summary: Creates a new custom domain + description: Creates a new custom domain. Backed by the Railway GraphQL mutation customDomainCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - domain + - environment_id + - project_id + - service_id + properties: + domain: + type: string + environment_id: + type: string + project_id: + type: string + service_id: + type: string + target_port: + type: integer + responses: + '200': + description: The CustomDomain the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customDomainCreate: + $ref: '#/components/schemas/CustomDomain' + /graphql/v2?__resource=custom_domains&__method=delete: + post: + operationId: custom_domains_delete + summary: Deletes a custom domain + description: Deletes a custom domain. Backed by the Railway GraphQL mutation customDomainDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customDomainDelete: + $ref: '#/components/schemas/CustomDomainDeleteResult' + /graphql/v2?__resource=custom_domains&__method=get: + post: + operationId: custom_domains_get + summary: Fetch details for a custom domain + description: Fetch details for a custom domain. Backed by the Railway GraphQL query customDomain. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.custom_domains.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { customDomain(id: "{{ .id }}" projectId: "{{ .project_id }}") { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id is_railway_domain: isRailwayDomain project_id: projectId service_id: serviceId status { cdn_provider: cdnProvider certificate_error_message: certificateErrorMessage certificate_error_type: certificateErrorType certificate_retryable: certificateRetryable certificates { domain_names: domainNames expires_at: expiresAt fingerprint_sha256: fingerprintSha256 issued_at: issuedAt key_type: keyType } certificate_status: certificateStatus certificate_status_detailed: certificateStatusDetailed dns_records: dnsRecords { current_value: currentValue fqdn hostlabel purpose record_type: recordType required_value: requiredValue status zone } verification_dns_host: verificationDnsHost verification_token: verificationToken verified } sync_status: syncStatus target_port: targetPort updated_at: updatedAt } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One CustomDomain row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customDomain: + $ref: '#/components/schemas/CustomDomain' + /graphql/v2?__resource=custom_domains&__method=issue_certificate: + post: + operationId: custom_domains_issue_certificate + summary: Issues a new certificate + description: Issues a new certificate. Backed by the Railway GraphQL mutation customDomainIssueCertificate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customDomainIssueCertificate: + $ref: '#/components/schemas/CustomDomainIssueCertificateResult' + /graphql/v2?__resource=custom_domains&__method=list: + post: + operationId: custom_domains_list + summary: Lists CustomDomain objects of a AllDomains + description: Lists CustomDomain objects of a AllDomains. Backed by the Railway GraphQL query domains.customDomains. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.custom_domains.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.domains.customDomains[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { domains(environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}" serviceId: "{{ .service_id }}") { customDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id is_railway_domain: isRailwayDomain project_id: projectId service_id: serviceId status { cdn_provider: cdnProvider certificate_error_message: certificateErrorMessage certificate_error_type: certificateErrorType certificate_retryable: certificateRetryable certificates { domain_names: domainNames expires_at: expiresAt fingerprint_sha256: fingerprintSha256 issued_at: issuedAt key_type: keyType } certificate_status: certificateStatus certificate_status_detailed: certificateStatusDetailed dns_records: dnsRecords { current_value: currentValue fqdn hostlabel purpose record_type: recordType required_value: requiredValue status zone } verification_dns_host: verificationDnsHost verification_token: verificationToken verified } sync_status: syncStatus target_port: targetPort updated_at: updatedAt } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per CustomDomain. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + domains: + type: object + properties: + customDomains: + type: array + items: + $ref: '#/components/schemas/CustomDomain' + /graphql/v2?__resource=custom_domains&__method=update: + post: + operationId: custom_domains_update + summary: Updates a custom domain + description: Updates a custom domain. Backed by the Railway GraphQL mutation customDomainUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - id + properties: + environment_id: + type: string + id: + type: string + target_port: + type: integer + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customDomainUpdate: + $ref: '#/components/schemas/CustomDomainUpdateResult' + /graphql/v2?__resource=domains&__method=get: + post: + operationId: domains_get + summary: All domains for a service instance + description: All domains for a service instance. Backed by the Railway GraphQL query domains. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.domains.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { domains(environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}" serviceId: "{{ .service_id }}") { custom_domains: customDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id is_railway_domain: isRailwayDomain project_id: projectId service_id: serviceId status { cdn_provider: cdnProvider certificate_error_message: certificateErrorMessage certificate_error_type: certificateErrorType certificate_retryable: certificateRetryable certificates { domain_names: domainNames expires_at: expiresAt fingerprint_sha256: fingerprintSha256 issued_at: issuedAt key_type: keyType } certificate_status: certificateStatus certificate_status_detailed: certificateStatusDetailed dns_records: dnsRecords { current_value: currentValue fqdn hostlabel purpose record_type: recordType required_value: requiredValue status zone } verification_dns_host: verificationDnsHost verification_token: verificationToken verified } sync_status: syncStatus target_port: targetPort updated_at: updatedAt } service_domains: serviceDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id new_domain_name: newDomainName new_host_label: newHostLabel project_id: projectId service_id: serviceId suffix sync_status: syncStatus target_port: targetPort updated_at: updatedAt } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One AllDomains row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + domains: + $ref: '#/components/schemas/AllDomains' + /graphql/v2?__resource=egress_gateway_ha_previews&__method=list: + post: + operationId: egress_gateway_ha_previews_list + summary: Preview HA static egress IPs that would be assigned without persisting + description: Preview HA static egress IPs that would be assigned without persisting. Backed by the Railway GraphQL query egressGatewayHAPreview. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.egress_gateway_ha_previews.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.egressGatewayHAPreview[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { egressGatewayHAPreview(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") { ipv4 region zone } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per EgressGateway. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGatewayHAPreview: + type: array + items: + $ref: '#/components/schemas/EgressGateway' + /graphql/v2?__resource=egress_gateway_legacy_previews&__method=list: + post: + operationId: egress_gateway_legacy_previews_list + summary: Preview legacy static egress IP that would be assigned without persisting + description: Preview legacy static egress IP that would be assigned without persisting. Backed by the Railway GraphQL query egressGatewayLegacyPreview. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.egress_gateway_legacy_previews.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.egressGatewayLegacyPreview[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { egressGatewayLegacyPreview(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") { ipv4 region zone } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per EgressGateway. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGatewayLegacyPreview: + type: array + items: + $ref: '#/components/schemas/EgressGateway' + /graphql/v2?__resource=egress_gateways&__method=clear: + post: + operationId: egress_gateways_clear + summary: Clear all egress gateway associations for a service instance + description: Clear all egress gateway associations for a service instance. Backed by the Railway GraphQL mutation egressGatewayAssociationsClear. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + all_environments: + type: boolean + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGatewayAssociationsClear: + $ref: '#/components/schemas/EgressGatewayAssociationsClearResult' + /graphql/v2?__resource=egress_gateways&__method=create: + post: + operationId: egress_gateways_create + summary: Create a new egress gateway association for a service instance + description: Create a new egress gateway association for a service instance. Backed by the Railway GraphQL mutation egressGatewayAssociationCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + region: + type: string + service_id: + type: string + responses: + '200': + description: The EgressGateway objects the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGatewayAssociationCreate: + type: array + items: + $ref: '#/components/schemas/EgressGateway' + /graphql/v2?__resource=egress_gateways&__method=list: + post: + operationId: egress_gateways_list + summary: All egress gateways assigned to a service instance + description: All egress gateways assigned to a service instance. Backed by the Railway GraphQL query egressGateways. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.egress_gateways.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.egressGateways[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { egressGateways(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") { ipv4 region zone } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per EgressGateway. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGateways: + type: array + items: + $ref: '#/components/schemas/EgressGateway' + /graphql/v2?__resource=egress_gateways&__method=preview_ha_migration: + post: + operationId: egress_gateways_preview_ha_migration + summary: Preview the HA static egress IPs that would be assigned, without applying them + description: Preview the HA static egress IPs that would be assigned, without applying them. Set allEnvironments to cover all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayHAMigrationPreview. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + all_environments: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The EgressMigrationResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGatewayHAMigrationPreview: + $ref: '#/components/schemas/EgressMigrationResult' + /graphql/v2?__resource=egress_gateways&__method=rollback_from_ha: + post: + operationId: egress_gateways_rollback_from_ha + summary: Switch a service from HA static egress IPs back to a standard static IP + description: Switch a service from HA static egress IPs back to a standard static IP. Set allEnvironments to apply to all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayRollbackFromHA. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + all_environments: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The EgressGateway objects the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGatewayRollbackFromHA: + type: array + items: + $ref: '#/components/schemas/EgressGateway' + /graphql/v2?__resource=egress_gateways&__method=upgrade_to_ha: + post: + operationId: egress_gateways_upgrade_to_ha + summary: Enable HA static egress IPs for a service + description: Enable HA static egress IPs for a service. Set allEnvironments to apply to all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayUpgradeToHA. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + all_environments: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The EgressGateway objects the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + egressGatewayUpgradeToHA: + type: array + items: + $ref: '#/components/schemas/EgressGateway' + /graphql/v2?__resource=private_network_endpoint_name_availability&__method=get: + post: + operationId: private_network_endpoint_name_availability_get + summary: Check if an endpoint name is available + description: Check if an endpoint name is available. Backed by the Railway GraphQL query privateNetworkEndpointNameAvailable. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.private_network_endpoint_name_availability.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.privateNetworkEndpointNameAvailable[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { privateNetworkEndpointNameAvailable(environmentId: "{{ .environment_id }}" prefix: "{{ .prefix }}" privateNetworkId: "{{ .private_network_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: prefix + in: query + required: true + schema: + type: string + - name: private_network_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + privateNetworkEndpointNameAvailable: + type: array + items: + $ref: '#/components/schemas/PrivateNetworkEndpointNameAvailableResult' + /graphql/v2?__resource=private_network_endpoints&__method=get: + post: + operationId: private_network_endpoints_get + summary: Get a private network endpoint for a service instance + description: Get a private network endpoint for a service instance. Backed by the Railway GraphQL query privateNetworkEndpoint. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.private_network_endpoints.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { privateNetworkEndpoint(environmentId: "{{ .environment_id }}" privateNetworkId: "{{ .private_network_id }}" serviceId: "{{ .service_id }}") { created_at: createdAt deleted_at: deletedAt dns_name: dnsName new_dns_name: newDnsName private_ips: privateIps public_id: publicId service_instance_id: serviceInstanceId sync_status: syncStatus tags } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: private_network_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One PrivateNetworkEndpoint row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + privateNetworkEndpoint: + $ref: '#/components/schemas/PrivateNetworkEndpoint' + /graphql/v2?__resource=private_network_endpoints&__method=rename: + post: + operationId: private_network_endpoints_rename + summary: Rename a private network endpoint + description: Rename a private network endpoint. Backed by the Railway GraphQL mutation privateNetworkEndpointRename. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - dns_name + - id + - private_network_id + properties: + dns_name: + type: string + id: + type: string + private_network_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + privateNetworkEndpointRename: + $ref: '#/components/schemas/PrivateNetworkEndpointRenameResult' + /graphql/v2?__resource=private_networks&__method=list: + post: + operationId: private_networks_list + summary: List private networks for an environment + description: List private networks for an environment. Backed by the Railway GraphQL query privateNetworks. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.private_networks.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.privateNetworks[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { privateNetworks(environmentId: "{{ .environment_id }}") { created_at: createdAt deleted_at: deletedAt dns_name: dnsName environment_id: environmentId name network_id: networkId project_id: projectId public_id: publicId tags } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per PrivateNetwork. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + privateNetworks: + type: array + items: + $ref: '#/components/schemas/PrivateNetwork' + /graphql/v2?__resource=railway_domain_dns_records&__method=create: + post: + operationId: railway_domain_dns_records_create + summary: Create a DNS record for a Railway domain + description: Create a DNS record for a Railway domain. Backed by the Railway GraphQL mutation railwayDomainDnsRecordCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - answer + - domain + - host + - type + - workspace_id + properties: + answer: + type: string + domain: + type: string + host: + type: string + priority: + type: integer + ttl: + type: integer + type: + type: string + enum: + - A + - AAAA + - ANAME + - CNAME + - MX + - NS + - SRV + - TXT + workspace_id: + type: string + responses: + '200': + description: The RailwayDomainDnsRecord the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainDnsRecordCreate: + $ref: '#/components/schemas/RailwayDomainDnsRecord' + /graphql/v2?__resource=railway_domain_dns_records&__method=delete: + post: + operationId: railway_domain_dns_records_delete + summary: Delete a DNS record for a Railway domain + description: Delete a DNS record for a Railway domain. Backed by the Railway GraphQL mutation railwayDomainDnsRecordDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - domain + - record_id + - workspace_id + properties: + domain: + type: string + record_id: + type: integer + remove_email_forwarding: + type: boolean + description: Confirms that deleting a mail exchange may also remove every forwarding address and its sibling exchanges. + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainDnsRecordDelete: + $ref: '#/components/schemas/RailwayDomainDnsRecordDeleteResult' + /graphql/v2?__resource=railway_domain_dns_records&__method=list: + post: + operationId: railway_domain_dns_records_list + summary: List DNS records for a Railway domain + description: List DNS records for a Railway domain. Backed by the Railway GraphQL query railwayDomainDnsRecords. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.railway_domain_dns_records.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.railwayDomainDnsRecords[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { railwayDomainDnsRecords(domain: "{{ .domain }}" workspaceId: "{{ .workspace_id }}") { answer domain_name: domainName fqdn host id priority ttl type } }' + x-stackql-protocol: graphql + parameters: + - name: domain + in: query + required: true + schema: + type: string + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per RailwayDomainDnsRecord. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainDnsRecords: + type: array + items: + $ref: '#/components/schemas/RailwayDomainDnsRecord' + /graphql/v2?__resource=railway_domain_dns_records&__method=update: + post: + operationId: railway_domain_dns_records_update + summary: Update a DNS record for a Railway domain + description: Update a DNS record for a Railway domain. Backed by the Railway GraphQL mutation railwayDomainDnsRecordUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - answer + - domain + - host + - record_id + - type + - workspace_id + properties: + answer: + type: string + domain: + type: string + host: + type: string + priority: + type: integer + record_id: + type: integer + ttl: + type: integer + type: + type: string + enum: + - A + - AAAA + - ANAME + - CNAME + - MX + - NS + - SRV + - TXT + workspace_id: + type: string + responses: + '200': + description: The RailwayDomainDnsRecord the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainDnsRecordUpdate: + $ref: '#/components/schemas/RailwayDomainDnsRecord' + /graphql/v2?__resource=railway_domain_email_forwarding_eligibility&__method=get: + post: + operationId: railway_domain_email_forwarding_eligibility_get + summary: Whether email forwarding can be offered on this domain, or why it can't + description: Whether email forwarding can be offered on this domain, or why it can't. Backed by the Railway GraphQL query railwayDomainEmailForwardingEligibility. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.railway_domain_email_forwarding_eligibility.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.railwayDomainEmailForwardingEligibility[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { railwayDomainEmailForwardingEligibility(domain: "{{ .domain }}" workspaceId: "{{ .workspace_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: domain + in: query + required: true + schema: + type: string + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingEligibility: + type: array + items: + $ref: '#/components/schemas/RailwayDomainEmailForwardingEligibilityResult' + /graphql/v2?__resource=railway_domain_email_forwarding_limits&__method=get: + post: + operationId: railway_domain_email_forwarding_limits_get + summary: Caps the forwarding UI surfaces before a rule is rejected server-side + description: Caps the forwarding UI surfaces before a rule is rejected server-side. Pass workspaceId for that workspace's alias allowance; without it the highest plan's is returned. Backed by the Railway GraphQL query railwayDomainEmailForwardingLimits. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.railway_domain_email_forwarding_limits.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { railwayDomainEmailForwardingLimits{{ if or .workspace_id }}({{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}){{ end }} { max_aliases: maxAliases } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One RailwayDomainEmailForwardingLimits row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingLimits: + $ref: '#/components/schemas/RailwayDomainEmailForwardingLimits' + /graphql/v2?__resource=railway_domain_email_forwarding_rules&__method=create: + post: + operationId: railway_domain_email_forwarding_rules_create + summary: Forward an address on this domain to an external inbox + description: Forward an address on this domain to an external inbox. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - alias + - destination + - domain + - workspace_id + properties: + alias: + type: string + destination: + type: string + domain: + type: string + workspace_id: + type: string + responses: + '200': + description: The RailwayDomainEmailForwardingRule the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingRuleCreate: + $ref: '#/components/schemas/RailwayDomainEmailForwardingRule' + /graphql/v2?__resource=railway_domain_email_forwarding_rules&__method=delete: + post: + operationId: railway_domain_email_forwarding_rules_delete + summary: Stop forwarding an address on this domain + description: Stop forwarding an address on this domain. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - alias + - domain + - workspace_id + properties: + alias: + type: string + domain: + type: string + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingRuleDelete: + $ref: '#/components/schemas/RailwayDomainEmailForwardingRuleDeleteResult' + /graphql/v2?__resource=railway_domain_email_forwarding_rules&__method=list: + post: + operationId: railway_domain_email_forwarding_rules_list + summary: List email forwarding rules for a Railway domain + description: List email forwarding rules for a Railway domain. Backed by the Railway GraphQL query railwayDomainEmailForwardingRules. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.railway_domain_email_forwarding_rules.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.railwayDomainEmailForwardingRules[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { railwayDomainEmailForwardingRules(domain: "{{ .domain }}" workspaceId: "{{ .workspace_id }}") { alias destination } }' + x-stackql-protocol: graphql + parameters: + - name: domain + in: query + required: true + schema: + type: string + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per RailwayDomainEmailForwardingRule. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingRules: + type: array + items: + $ref: '#/components/schemas/RailwayDomainEmailForwardingRule' + /graphql/v2?__resource=railway_domain_email_forwarding_rules&__method=remove_all: + post: + operationId: railway_domain_email_forwarding_rules_remove_all + summary: Stop forwarding every address on this domain, and remove the mail records that delivered them + description: Stop forwarding every address on this domain, and remove the mail records that delivered them. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRemoveAll. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - domain + - workspace_id + properties: + domain: + type: string + workspace_id: + type: string + responses: + '200': + description: The RailwayDomainEmailForwardingTeardown the mutation returns. What removing forwarding took out of the zone. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingRemoveAll: + $ref: '#/components/schemas/RailwayDomainEmailForwardingTeardown' + /graphql/v2?__resource=railway_domain_email_forwarding_rules&__method=send_test: + post: + operationId: railway_domain_email_forwarding_rules_send_test + summary: Send a message to a forwarded address so the customer can confirm it delivers + description: Send a message to a forwarded address so the customer can confirm it delivers. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleSendTest. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - alias + - domain + - workspace_id + properties: + alias: + type: string + domain: + type: string + workspace_id: + type: string + responses: + '200': + description: The RailwayDomainEmailForwardingRule the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingRuleSendTest: + $ref: '#/components/schemas/RailwayDomainEmailForwardingRule' + /graphql/v2?__resource=railway_domain_email_forwarding_rules&__method=update: + post: + operationId: railway_domain_email_forwarding_rules_update + summary: Change where a forwarded address delivers + description: Change where a forwarded address delivers. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - alias + - destination + - domain + - workspace_id + properties: + alias: + type: string + destination: + type: string + domain: + type: string + workspace_id: + type: string + responses: + '200': + description: The RailwayDomainEmailForwardingRule the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainEmailForwardingRuleUpdate: + $ref: '#/components/schemas/RailwayDomainEmailForwardingRule' + /graphql/v2?__resource=railway_domains&__method=get: + post: + operationId: railway_domains_get + summary: Get a Railway domain by ID + description: Get a Railway domain by ID. Backed by the Railway GraphQL query railwayDomain. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.railway_domains.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { railwayDomain(id: "{{ .id }}") { auto_renew_enabled: autoRenewEnabled connected_service_instances: connectedServiceInstances { environment_id: environmentId project_id: projectId service_id: serviceId service_name: serviceName } created_at: createdAt domain id nameservers { is_default: isDefault nameservers } next_billing_date: nextBillingDate purchase_price: purchasePrice registration_years: registrationYears renewal_price: renewalPrice status workspace_id: workspaceId workspace_name: workspaceName } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One RailwayDomain row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomain: + $ref: '#/components/schemas/RailwayDomain' + /graphql/v2?__resource=railway_domains&__method=get_by_name: + post: + operationId: railway_domains_get_by_name + summary: Get a Railway domain by its domain name within a workspace + description: Get a Railway domain by its domain name within a workspace. Backed by the Railway GraphQL query railwayDomainByName. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.railway_domains.get_by_name + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { railwayDomainByName(domain: "{{ .domain }}" workspaceId: "{{ .workspace_id }}") { auto_renew_enabled: autoRenewEnabled connected_service_instances: connectedServiceInstances { environment_id: environmentId project_id: projectId service_id: serviceId service_name: serviceName } created_at: createdAt domain id nameservers { is_default: isDefault nameservers } next_billing_date: nextBillingDate purchase_price: purchasePrice registration_years: registrationYears renewal_price: renewalPrice status workspace_id: workspaceId workspace_name: workspaceName } }' + x-stackql-protocol: graphql + parameters: + - name: domain + in: query + required: true + schema: + type: string + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One RailwayDomain row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainByName: + $ref: '#/components/schemas/RailwayDomain' + /graphql/v2?__resource=railway_domains&__method=list: + post: + operationId: railway_domains_list + summary: Get Railway domains for a workspace + description: Get Railway domains for a workspace. Backed by the Railway GraphQL query railwayDomains. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.railway_domains.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.railwayDomains[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { railwayDomains({{ if .status }}status: {{ .status }} {{ end }}workspaceId: "{{ .workspace_id }}") { auto_renew_enabled: autoRenewEnabled connected_service_instances: connectedServiceInstances { environment_id: environmentId project_id: projectId service_id: serviceId service_name: serviceName } created_at: createdAt domain id nameservers { is_default: isDefault nameservers } next_billing_date: nextBillingDate purchase_price: purchasePrice registration_years: registrationYears renewal_price: renewalPrice status workspace_id: workspaceId workspace_name: workspaceName } }' + x-stackql-protocol: graphql + parameters: + - name: status + in: query + required: false + schema: + type: string + enum: + - ACTIVE + - EXPIRED + - PURCHASING + - REFUNDED + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per RailwayDomain. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomains: + type: array + items: + $ref: '#/components/schemas/RailwayDomain' + /graphql/v2?__resource=railway_domains&__method=set_nameservers: + post: + operationId: railway_domains_set_nameservers + summary: Delegate the domain's authoritative nameservers to an external DNS provider, or reset to Railway defaults by passing an empty list + description: Delegate the domain's authoritative nameservers to an external DNS provider, or reset to Railway defaults by passing an empty list. Backed by the Railway GraphQL mutation railwayDomainNameserversSet. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - nameservers + properties: + id: + type: string + nameservers: + type: array + items: + type: string + description: Hostnames of the nameservers to delegate to (2-13). Pass an empty list to reset to Name.com's account-level defaults for this domain. + responses: + '200': + description: The RailwayDomainNameservers the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainNameserversSet: + $ref: '#/components/schemas/RailwayDomainNameservers' + /graphql/v2?__resource=railway_domains&__method=update: + post: + operationId: railway_domains_update + summary: Update a Railway domain's settings + description: Update a Railway domain's settings. Backed by the Railway GraphQL mutation railwayDomainUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + auto_renew_enabled: + type: boolean + id: + type: string + responses: + '200': + description: The RailwayDomain the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + railwayDomainUpdate: + $ref: '#/components/schemas/RailwayDomain' + /graphql/v2?__resource=service_domain_availability&__method=get: + post: + operationId: service_domain_availability_get + summary: Checks if a service domain is available + description: Checks if a service domain is available. Backed by the Railway GraphQL query serviceDomainAvailable. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.service_domain_availability.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { serviceDomainAvailable(domain: "{{ .domain }}") { available message } }' + x-stackql-protocol: graphql + parameters: + - name: domain + in: query + required: true + schema: + type: string + responses: + '200': + description: One DomainAvailable row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceDomainAvailable: + $ref: '#/components/schemas/DomainAvailable' + /graphql/v2?__resource=service_domains&__method=create: + post: + operationId: service_domains_create + summary: Creates a new service domain + description: Creates a new service domain. Backed by the Railway GraphQL mutation serviceDomainCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + target_port: + type: integer + responses: + '200': + description: The ServiceDomain the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceDomainCreate: + $ref: '#/components/schemas/ServiceDomain' + /graphql/v2?__resource=service_domains&__method=delete: + post: + operationId: service_domains_delete + summary: Deletes a service domain + description: Deletes a service domain. Backed by the Railway GraphQL mutation serviceDomainDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceDomainDelete: + $ref: '#/components/schemas/ServiceDomainDeleteResult' + /graphql/v2?__resource=service_domains&__method=list: + post: + operationId: service_domains_list + summary: Lists ServiceDomain objects of a AllDomains + description: Lists ServiceDomain objects of a AllDomains. Backed by the Railway GraphQL query domains.serviceDomains. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.service_domains.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.domains.serviceDomains[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { domains(environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}" serviceId: "{{ .service_id }}") { serviceDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id new_domain_name: newDomainName new_host_label: newHostLabel project_id: projectId service_id: serviceId suffix sync_status: syncStatus target_port: targetPort updated_at: updatedAt } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ServiceDomain. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + domains: + type: object + properties: + serviceDomains: + type: array + items: + $ref: '#/components/schemas/ServiceDomain' + /graphql/v2?__resource=service_domains&__method=update: + post: + operationId: service_domains_update + summary: Updates a service domain + description: Updates a service domain. Backed by the Railway GraphQL mutation serviceDomainUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - domain + - environment_id + - service_domain_id + - service_id + properties: + domain: + type: string + environment_id: + type: string + service_domain_id: + type: string + service_id: + type: string + target_port: + type: integer + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceDomainUpdate: + $ref: '#/components/schemas/ServiceDomainUpdateResult' + /graphql/v2?__resource=tcp_proxies&__method=delete: + post: + operationId: tcp_proxies_delete + summary: Deletes a TCP proxy by id + description: Deletes a TCP proxy by id. Backed by the Railway GraphQL mutation tcpProxyDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + tcpProxyDelete: + $ref: '#/components/schemas/TcpProxyDeleteResult' + /graphql/v2?__resource=tcp_proxies&__method=list: + post: + operationId: tcp_proxies_list + summary: All TCP proxies for a service instance + description: All TCP proxies for a service instance. Backed by the Railway GraphQL query tcpProxies. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.networking.tcp_proxies.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.tcpProxies[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { tcpProxies(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") { application_port: applicationPort created_at: createdAt deleted_at: deletedAt domain environment_id: environmentId id proxy_port: proxyPort service_id: serviceId sync_status: syncStatus updated_at: updatedAt } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per TCPProxy. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + tcpProxies: + type: array + items: + $ref: '#/components/schemas/TCPProxy' +components: + schemas: + AllDomains: + type: object + properties: + custom_domains: + type: array + items: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + domain: + type: string + edge_id: + type: string + environment_id: + type: string + id: + type: string + is_railway_domain: + type: boolean + project_id: + type: string + service_id: + type: string + status: + type: object + properties: + cdn_provider: + type: string + enum: + - DETECTED_CDN_PROVIDER_CLOUDFLARE + - DETECTED_CDN_PROVIDER_UNSPECIFIED + - UNRECOGNIZED + certificate_error_message: + type: string + description: Human-readable error message when certificate issuance fails + certificate_error_type: + type: string + enum: + - CERTIFICATE_ERROR_TYPE_AUTHORIZATION_FAILED + - CERTIFICATE_ERROR_TYPE_DNS_VALIDATION + - CERTIFICATE_ERROR_TYPE_INTERNAL + - CERTIFICATE_ERROR_TYPE_KEY_GENERATION + - CERTIFICATE_ERROR_TYPE_ORDER_CREATION + - CERTIFICATE_ERROR_TYPE_RATE_LIMIT + - CERTIFICATE_ERROR_TYPE_UNSPECIFIED + - UNRECOGNIZED + description: Structured error type for programmatic handling + certificate_retryable: + type: boolean + description: Whether the certificate issuance can be retried + certificates: + type: array + items: + type: object + properties: + domain_names: + type: array + items: + type: string + expires_at: + type: string + format: date-time + fingerprint_sha256: + type: string + issued_at: + type: string + format: date-time + key_type: + type: string + enum: + - KEY_TYPE_ECDSA + - KEY_TYPE_RSA_2048 + - KEY_TYPE_RSA_4096 + - KEY_TYPE_UNSPECIFIED + - UNRECOGNIZED + description: List of CertificatePublicData objects + certificate_status: + type: string + enum: + - CERTIFICATE_STATUS_TYPE_ISSUE_FAILED + - CERTIFICATE_STATUS_TYPE_ISSUING + - CERTIFICATE_STATUS_TYPE_UNSPECIFIED + - CERTIFICATE_STATUS_TYPE_VALID + - CERTIFICATE_STATUS_TYPE_VALIDATING_OWNERSHIP + - UNRECOGNIZED + certificate_status_detailed: + type: string + enum: + - CERTIFICATE_STATUS_TYPE_DETAILED_CLEANING_UP + - CERTIFICATE_STATUS_TYPE_DETAILED_COMPLETE + - CERTIFICATE_STATUS_TYPE_DETAILED_CREATING_ORDER + - CERTIFICATE_STATUS_TYPE_DETAILED_DOWNLOADING_CERTIFICATE + - CERTIFICATE_STATUS_TYPE_DETAILED_FAILED + - CERTIFICATE_STATUS_TYPE_DETAILED_FETCHING_AUTHORIZATIONS + - CERTIFICATE_STATUS_TYPE_DETAILED_FINALIZING_ORDER + - CERTIFICATE_STATUS_TYPE_DETAILED_GENERATING_KEYS + - CERTIFICATE_STATUS_TYPE_DETAILED_INITIATING_CHALLENGES + - CERTIFICATE_STATUS_TYPE_DETAILED_POLLING_AUTHORIZATIONS + - CERTIFICATE_STATUS_TYPE_DETAILED_PRESENTING_CHALLENGES + - CERTIFICATE_STATUS_TYPE_DETAILED_UNSPECIFIED + - UNRECOGNIZED + dns_records: + type: array + items: + type: object + properties: + current_value: + type: string + fqdn: + type: string + hostlabel: + type: string + purpose: + type: string + enum: + - DNS_RECORD_PURPOSE_ACME_DNS01_CHALLENGE + - DNS_RECORD_PURPOSE_TRAFFIC_ROUTE + - DNS_RECORD_PURPOSE_UNSPECIFIED + - UNRECOGNIZED + record_type: + type: string + enum: + - DNS_RECORD_TYPE_A + - DNS_RECORD_TYPE_CNAME + - DNS_RECORD_TYPE_NS + - DNS_RECORD_TYPE_TXT + - DNS_RECORD_TYPE_UNSPECIFIED + - UNRECOGNIZED + required_value: + type: string + status: + type: string + enum: + - DNS_RECORD_STATUS_PROPAGATED + - DNS_RECORD_STATUS_REQUIRES_UPDATE + - DNS_RECORD_STATUS_UNSPECIFIED + - UNRECOGNIZED + zone: + type: string + description: List of DNSRecords objects + verification_dns_host: + type: string + verification_token: + type: string + verified: + type: boolean + description: CustomDomainStatus object + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + target_port: + type: integer + updated_at: + type: string + format: date-time + description: List of CustomDomain objects + service_domains: + type: array + items: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + domain: + type: string + edge_id: + type: string + environment_id: + type: string + id: + type: string + new_domain_name: + type: string + new_host_label: + type: string + project_id: + type: string + service_id: + type: string + suffix: + type: string + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + target_port: + type: integer + updated_at: + type: string + format: date-time + description: List of ServiceDomain objects + CustomDomain: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + domain: + type: string + edge_id: + type: string + environment_id: + type: string + id: + type: string + is_railway_domain: + type: boolean + project_id: + type: string + service_id: + type: string + status: + type: object + properties: + cdn_provider: + type: string + enum: + - DETECTED_CDN_PROVIDER_CLOUDFLARE + - DETECTED_CDN_PROVIDER_UNSPECIFIED + - UNRECOGNIZED + certificate_error_message: + type: string + description: Human-readable error message when certificate issuance fails + certificate_error_type: + type: string + enum: + - CERTIFICATE_ERROR_TYPE_AUTHORIZATION_FAILED + - CERTIFICATE_ERROR_TYPE_DNS_VALIDATION + - CERTIFICATE_ERROR_TYPE_INTERNAL + - CERTIFICATE_ERROR_TYPE_KEY_GENERATION + - CERTIFICATE_ERROR_TYPE_ORDER_CREATION + - CERTIFICATE_ERROR_TYPE_RATE_LIMIT + - CERTIFICATE_ERROR_TYPE_UNSPECIFIED + - UNRECOGNIZED + description: Structured error type for programmatic handling + certificate_retryable: + type: boolean + description: Whether the certificate issuance can be retried + certificates: + type: array + items: + type: object + properties: + domain_names: + type: array + items: + type: string + expires_at: + type: string + format: date-time + fingerprint_sha256: + type: string + issued_at: + type: string + format: date-time + key_type: + type: string + enum: + - KEY_TYPE_ECDSA + - KEY_TYPE_RSA_2048 + - KEY_TYPE_RSA_4096 + - KEY_TYPE_UNSPECIFIED + - UNRECOGNIZED + description: List of CertificatePublicData objects + certificate_status: + type: string + enum: + - CERTIFICATE_STATUS_TYPE_ISSUE_FAILED + - CERTIFICATE_STATUS_TYPE_ISSUING + - CERTIFICATE_STATUS_TYPE_UNSPECIFIED + - CERTIFICATE_STATUS_TYPE_VALID + - CERTIFICATE_STATUS_TYPE_VALIDATING_OWNERSHIP + - UNRECOGNIZED + certificate_status_detailed: + type: string + enum: + - CERTIFICATE_STATUS_TYPE_DETAILED_CLEANING_UP + - CERTIFICATE_STATUS_TYPE_DETAILED_COMPLETE + - CERTIFICATE_STATUS_TYPE_DETAILED_CREATING_ORDER + - CERTIFICATE_STATUS_TYPE_DETAILED_DOWNLOADING_CERTIFICATE + - CERTIFICATE_STATUS_TYPE_DETAILED_FAILED + - CERTIFICATE_STATUS_TYPE_DETAILED_FETCHING_AUTHORIZATIONS + - CERTIFICATE_STATUS_TYPE_DETAILED_FINALIZING_ORDER + - CERTIFICATE_STATUS_TYPE_DETAILED_GENERATING_KEYS + - CERTIFICATE_STATUS_TYPE_DETAILED_INITIATING_CHALLENGES + - CERTIFICATE_STATUS_TYPE_DETAILED_POLLING_AUTHORIZATIONS + - CERTIFICATE_STATUS_TYPE_DETAILED_PRESENTING_CHALLENGES + - CERTIFICATE_STATUS_TYPE_DETAILED_UNSPECIFIED + - UNRECOGNIZED + dns_records: + type: array + items: + type: object + properties: + current_value: + type: string + fqdn: + type: string + hostlabel: + type: string + purpose: + type: string + enum: + - DNS_RECORD_PURPOSE_ACME_DNS01_CHALLENGE + - DNS_RECORD_PURPOSE_TRAFFIC_ROUTE + - DNS_RECORD_PURPOSE_UNSPECIFIED + - UNRECOGNIZED + record_type: + type: string + enum: + - DNS_RECORD_TYPE_A + - DNS_RECORD_TYPE_CNAME + - DNS_RECORD_TYPE_NS + - DNS_RECORD_TYPE_TXT + - DNS_RECORD_TYPE_UNSPECIFIED + - UNRECOGNIZED + required_value: + type: string + status: + type: string + enum: + - DNS_RECORD_STATUS_PROPAGATED + - DNS_RECORD_STATUS_REQUIRES_UPDATE + - DNS_RECORD_STATUS_UNSPECIFIED + - UNRECOGNIZED + zone: + type: string + description: List of DNSRecords objects + verification_dns_host: + type: string + verification_token: + type: string + verified: + type: boolean + description: CustomDomainStatus object + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + target_port: + type: integer + updated_at: + type: string + format: date-time + CustomDomainDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the customDomainDelete mutation (Boolean!) + CustomDomainIssueCertificateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the customDomainIssueCertificate mutation (Boolean!) + CustomDomainUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the customDomainUpdate mutation (Boolean!) + DomainAvailable: + type: object + properties: + available: + type: boolean + message: + type: string + EgressGateway: + type: object + properties: + ipv4: + type: string + region: + type: string + zone: + type: string + EgressGatewayAssociationsClearResult: + type: object + properties: + result: + type: boolean + description: Value returned by the egressGatewayAssociationsClear mutation (Boolean!) + EgressMigrationResult: + type: object + properties: + environments: + type: array + items: + type: object + properties: + environment_id: + type: string + environment_name: + type: string + error: + type: string + success: + type: boolean + description: List of EgressMigrationEnvironmentResult objects + ips: + type: array + items: + type: object + properties: + ipv4: + type: string + region: + type: string + zone: + type: string + description: List of EgressGateway objects + PrivateNetwork: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + dns_name: + type: string + environment_id: + type: string + name: + type: string + network_id: + type: string + project_id: + type: string + public_id: + type: string + tags: + type: array + items: + type: string + PrivateNetworkEndpoint: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + dns_name: + type: string + new_dns_name: + type: string + private_ips: + type: array + items: + type: string + public_id: + type: string + service_instance_id: + type: string + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + tags: + type: array + items: + type: string + PrivateNetworkEndpointNameAvailableResult: + type: object + properties: + result: + type: boolean + description: privateNetworkEndpointNameAvailable value + PrivateNetworkEndpointRenameResult: + type: object + properties: + result: + type: boolean + description: Value returned by the privateNetworkEndpointRename mutation (Boolean!) + RailwayDomain: + type: object + properties: + auto_renew_enabled: + type: boolean + connected_service_instances: + type: array + items: + type: object + properties: + environment_id: + type: string + project_id: + type: string + service_id: + type: string + service_name: + type: string + description: List of ConnectedServiceInstance objects + created_at: + type: string + format: date-time + domain: + type: string + id: + type: string + nameservers: + type: object + properties: + is_default: + type: boolean + description: True when the domain is delegated to Name.com's nameservers (Railway-managed DNS). + nameservers: + type: array + items: + type: string + description: Authoritative nameservers currently delegated for this domain at the registrar. + next_billing_date: + type: string + format: date-time + purchase_price: + type: integer + registration_years: + type: integer + renewal_price: + type: integer + status: + type: string + enum: + - ACTIVE + - EXPIRED + - PURCHASING + - REFUNDED + workspace_id: + type: string + workspace_name: + type: string + RailwayDomainDnsRecord: + type: object + properties: + answer: + type: string + domain_name: + type: string + fqdn: + type: string + host: + type: string + id: + type: integer + priority: + type: integer + ttl: + type: integer + type: + type: string + enum: + - A + - AAAA + - ANAME + - CNAME + - MX + - NS + - SRV + - TXT + RailwayDomainDnsRecordDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the railwayDomainDnsRecordDelete mutation (Boolean!) + RailwayDomainEmailForwardingEligibilityResult: + type: object + properties: + result: + type: string + enum: + - DELEGATED + - ELIGIBLE + - EXTERNAL_MAIL + - UNKNOWN + description: railwayDomainEmailForwardingEligibility value + RailwayDomainEmailForwardingLimits: + type: object + properties: + max_aliases: + type: integer + RailwayDomainEmailForwardingRule: + type: object + properties: + alias: + type: string + description: Local part of the forwarded address, without the domain. + destination: + type: string + description: The external inbox mail for this alias is delivered to. + RailwayDomainEmailForwardingRuleDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the railwayDomainEmailForwardingRuleDelete mutation (Boolean!) + RailwayDomainEmailForwardingTeardown: + type: object + properties: + addresses_removed: + type: integer + mail_records_removed: + type: integer + RailwayDomainNameservers: + type: object + properties: + is_default: + type: boolean + description: True when the domain is delegated to Name.com's nameservers (Railway-managed DNS). + nameservers: + type: array + items: + type: string + ServiceDomain: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + domain: + type: string + edge_id: + type: string + environment_id: + type: string + id: + type: string + new_domain_name: + type: string + new_host_label: + type: string + project_id: + type: string + service_id: + type: string + suffix: + type: string + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + target_port: + type: integer + updated_at: + type: string + format: date-time + ServiceDomainDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceDomainDelete mutation (Boolean!) + ServiceDomainUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceDomainUpdate mutation (Boolean!) + TCPProxy: + type: object + properties: + application_port: + type: integer + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + domain: + type: string + environment_id: + type: string + id: + type: string + proxy_port: + type: integer + service_id: + type: string + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + updated_at: + type: string + format: date-time + TcpProxyDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the tcpProxyDelete mutation (Boolean!) + x-stackQL-resources: + custom_domain_availability: + id: railway.networking.custom_domain_availability + name: custom_domain_availability + title: Custom Domain Availability + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=custom_domain_availability&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.customDomainAvailable + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom_domain_availability/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + custom_domains: + id: railway.networking.custom_domains + name: custom_domains + title: Custom Domains + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=custom_domains&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($domain: String!, $environment_id: String!, $project_id: String!, $service_id: String!, $target_port: Int) { customDomainCreate(input: { domain: $domain, environmentId: $environment_id, projectId: $project_id, serviceId: $service_id, targetPort: $target_port }) { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id is_railway_domain: isRailwayDomain project_id: projectId service_id: serviceId status { cdn_provider: cdnProvider certificate_error_message: certificateErrorMessage certificate_error_type: certificateErrorType certificate_retryable: certificateRetryable certificates { domain_names: domainNames expires_at: expiresAt fingerprint_sha256: fingerprintSha256 issued_at: issuedAt key_type: keyType } certificate_status: certificateStatus certificate_status_detailed: certificateStatusDetailed dns_records: dnsRecords { current_value: currentValue fqdn hostlabel purpose record_type: recordType required_value: requiredValue status zone } verification_dns_host: verificationDnsHost verification_token: verificationToken verified } sync_status: syncStatus target_port: targetPort updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "target_port" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"target_port":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.customDomainCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=custom_domains&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { customDomainDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.customDomainDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"customDomainDelete":{"result":{{ toJson (index (index . "data") "customDomainDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=custom_domains&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.customDomain + x-stackql-protocol: graphql + issue_certificate: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=custom_domains&__method=issue_certificate/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { customDomainIssueCertificate(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.customDomainIssueCertificate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"customDomainIssueCertificate":{"result":{{ toJson (index (index . "data") "customDomainIssueCertificate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=custom_domains&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.domains.customDomains + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=custom_domains&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $id: String!, $target_port: Int) { customDomainUpdate(environmentId: $environment_id, id: $id, targetPort: $target_port) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "target_port" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"target_port":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.customDomainUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"customDomainUpdate":{"result":{{ toJson (index (index . "data") "customDomainUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom_domains/methods/list' + - $ref: '#/components/x-stackQL-resources/custom_domains/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/custom_domains/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/custom_domains/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/custom_domains/methods/delete' + replace: [] + domains: + id: railway.networking.domains + name: domains + title: Domains + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=domains&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.domains + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/domains/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + egress_gateway_ha_previews: + id: railway.networking.egress_gateway_ha_previews + name: egress_gateway_ha_previews + title: Egress Gateway Ha Previews + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateway_ha_previews&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.egressGatewayHAPreview + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/egress_gateway_ha_previews/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + egress_gateway_legacy_previews: + id: railway.networking.egress_gateway_legacy_previews + name: egress_gateway_legacy_previews + title: Egress Gateway Legacy Previews + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateway_legacy_previews&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.egressGatewayLegacyPreview + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/egress_gateway_legacy_previews/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + egress_gateways: + id: railway.networking.egress_gateways + name: egress_gateways + title: Egress Gateways + methods: + clear: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateways&__method=clear/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($all_environments: Boolean, $environment_id: String!, $service_id: String!) { egressGatewayAssociationsClear(input: { allEnvironments: $all_environments, environmentId: $environment_id, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "all_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"all_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.egressGatewayAssociationsClear + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"egressGatewayAssociationsClear":{"result":{{ toJson (index (index . "data") "egressGatewayAssociationsClear") }}}}}{{- end -}}' + x-stackql-protocol: graphql + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateways&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $region: String, $service_id: String!) { egressGatewayAssociationCreate(input: { environmentId: $environment_id, region: $region, serviceId: $service_id }) { ipv4 region zone } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "region" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"region":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.egressGatewayAssociationCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateways&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.egressGateways + x-stackql-protocol: graphql + preview_ha_migration: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateways&__method=preview_ha_migration/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($all_environments: Boolean, $environment_id: String!, $service_id: String!) { egressGatewayHAMigrationPreview(input: { allEnvironments: $all_environments, environmentId: $environment_id, serviceId: $service_id }) { environments { environment_id: environmentId environment_name: environmentName error success } ips { ipv4 region zone } } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "all_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"all_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.egressGatewayHAMigrationPreview + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + rollback_from_ha: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateways&__method=rollback_from_ha/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($all_environments: Boolean, $environment_id: String!, $service_id: String!) { egressGatewayRollbackFromHA(input: { allEnvironments: $all_environments, environmentId: $environment_id, serviceId: $service_id }) { ipv4 region zone } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "all_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"all_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.egressGatewayRollbackFromHA + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + upgrade_to_ha: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=egress_gateways&__method=upgrade_to_ha/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($all_environments: Boolean, $environment_id: String!, $service_id: String!) { egressGatewayUpgradeToHA(input: { allEnvironments: $all_environments, environmentId: $environment_id, serviceId: $service_id }) { ipv4 region zone } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "all_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"all_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.egressGatewayUpgradeToHA + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/egress_gateways/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/egress_gateways/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/egress_gateways/methods/clear' + replace: [] + private_network_endpoint_name_availability: + id: railway.networking.private_network_endpoint_name_availability + name: private_network_endpoint_name_availability + title: Private Network Endpoint Name Availability + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=private_network_endpoint_name_availability&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.privateNetworkEndpointNameAvailable + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"privateNetworkEndpointNameAvailable":[{"result":{{ toJson (index (index . "data") "privateNetworkEndpointNameAvailable") }}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/private_network_endpoint_name_availability/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + private_network_endpoints: + id: railway.networking.private_network_endpoints + name: private_network_endpoints + title: Private Network Endpoints + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=private_network_endpoints&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.privateNetworkEndpoint + x-stackql-protocol: graphql + rename: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=private_network_endpoints&__method=rename/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($dns_name: String!, $id: String!, $private_network_id: String!) { privateNetworkEndpointRename(dnsName: $dns_name, id: $id, privateNetworkId: $private_network_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "dns_name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"dns_name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "private_network_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"private_network_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.privateNetworkEndpointRename + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"privateNetworkEndpointRename":{"result":{{ toJson (index (index . "data") "privateNetworkEndpointRename") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/private_network_endpoints/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/private_network_endpoints/methods/rename' + delete: [] + replace: [] + private_networks: + id: railway.networking.private_networks + name: private_networks + title: Private Networks + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=private_networks&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.privateNetworks + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/private_networks/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + railway_domain_dns_records: + id: railway.networking.railway_domain_dns_records + name: railway_domain_dns_records + title: Railway Domain Dns Records + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_dns_records&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($answer: String!, $domain: String!, $host: String!, $priority: Int, $ttl: Int, $type: RailwayDomainDnsRecordType!, $workspace_id: String!) { railwayDomainDnsRecordCreate(input: { answer: $answer, domain: $domain, host: $host, priority: $priority, ttl: $ttl, type: $type, workspaceId: $workspace_id }) { answer domain_name: domainName fqdn host id priority ttl type } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "answer" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"answer":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "host" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"host":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "priority" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"priority":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "ttl" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ttl":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "type" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"type":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainDnsRecordCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_dns_records&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($domain: String!, $record_id: Int!, $remove_email_forwarding: Boolean, $workspace_id: String!) { railwayDomainDnsRecordDelete(input: { domain: $domain, recordId: $record_id, removeEmailForwarding: $remove_email_forwarding, workspaceId: $workspace_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "record_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"record_id":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "remove_email_forwarding" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"remove_email_forwarding":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainDnsRecordDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"railwayDomainDnsRecordDelete":{"result":{{ toJson (index (index . "data") "railwayDomainDnsRecordDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_dns_records&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.railwayDomainDnsRecords + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_dns_records&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($answer: String!, $domain: String!, $host: String!, $priority: Int, $record_id: Int!, $ttl: Int, $type: RailwayDomainDnsRecordType!, $workspace_id: String!) { railwayDomainDnsRecordUpdate(input: { answer: $answer, domain: $domain, host: $host, priority: $priority, recordId: $record_id, ttl: $ttl, type: $type, workspaceId: $workspace_id }) { answer domain_name: domainName fqdn host id priority ttl type } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "answer" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"answer":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "host" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"host":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "priority" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"priority":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "record_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"record_id":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "ttl" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ttl":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "type" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"type":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainDnsRecordUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/railway_domain_dns_records/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/railway_domain_dns_records/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/railway_domain_dns_records/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/railway_domain_dns_records/methods/delete' + replace: [] + railway_domain_email_forwarding_eligibility: + id: railway.networking.railway_domain_email_forwarding_eligibility + name: railway_domain_email_forwarding_eligibility + title: Railway Domain Email Forwarding Eligibility + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_eligibility&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.railwayDomainEmailForwardingEligibility + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"railwayDomainEmailForwardingEligibility":[{"result":{{ toJson (index (index . "data") "railwayDomainEmailForwardingEligibility") }}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/railway_domain_email_forwarding_eligibility/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + railway_domain_email_forwarding_limits: + id: railway.networking.railway_domain_email_forwarding_limits + name: railway_domain_email_forwarding_limits + title: Railway Domain Email Forwarding Limits + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_limits&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.railwayDomainEmailForwardingLimits + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/railway_domain_email_forwarding_limits/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + railway_domain_email_forwarding_rules: + id: railway.networking.railway_domain_email_forwarding_rules + name: railway_domain_email_forwarding_rules + title: Railway Domain Email Forwarding Rules + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_rules&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($alias: String!, $destination: String!, $domain: String!, $workspace_id: String!) { railwayDomainEmailForwardingRuleCreate(input: { alias: $alias, destination: $destination, domain: $domain, workspaceId: $workspace_id }) { alias destination } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "alias" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"alias":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "destination" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"destination":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainEmailForwardingRuleCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_rules&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($alias: String!, $domain: String!, $workspace_id: String!) { railwayDomainEmailForwardingRuleDelete(input: { alias: $alias, domain: $domain, workspaceId: $workspace_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "alias" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"alias":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainEmailForwardingRuleDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"railwayDomainEmailForwardingRuleDelete":{"result":{{ toJson (index (index . "data") "railwayDomainEmailForwardingRuleDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_rules&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.railwayDomainEmailForwardingRules + x-stackql-protocol: graphql + remove_all: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_rules&__method=remove_all/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($domain: String!, $workspace_id: String!) { railwayDomainEmailForwardingRemoveAll(input: { domain: $domain, workspaceId: $workspace_id }) { addresses_removed: addressesRemoved mail_records_removed: mailRecordsRemoved } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainEmailForwardingRemoveAll + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + send_test: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_rules&__method=send_test/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($alias: String!, $domain: String!, $workspace_id: String!) { railwayDomainEmailForwardingRuleSendTest(input: { alias: $alias, domain: $domain, workspaceId: $workspace_id }) { alias destination } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "alias" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"alias":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainEmailForwardingRuleSendTest + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domain_email_forwarding_rules&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($alias: String!, $destination: String!, $domain: String!, $workspace_id: String!) { railwayDomainEmailForwardingRuleUpdate(input: { alias: $alias, destination: $destination, domain: $domain, workspaceId: $workspace_id }) { alias destination } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "alias" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"alias":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "destination" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"destination":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainEmailForwardingRuleUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/railway_domain_email_forwarding_rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/railway_domain_email_forwarding_rules/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/railway_domain_email_forwarding_rules/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/railway_domain_email_forwarding_rules/methods/delete' + replace: [] + railway_domains: + id: railway.networking.railway_domains + name: railway_domains + title: Railway Domains + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domains&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.railwayDomain + x-stackql-protocol: graphql + get_by_name: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domains&__method=get_by_name/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.railwayDomainByName + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domains&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.railwayDomains + x-stackql-protocol: graphql + set_nameservers: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domains&__method=set_nameservers/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $nameservers: [String!]!) { railwayDomainNameserversSet(input: { id: $id, nameservers: $nameservers }) { is_default: isDefault nameservers } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "nameservers" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"nameservers":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainNameserversSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=railway_domains&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($auto_renew_enabled: Boolean, $id: String!) { railwayDomainUpdate(input: { autoRenewEnabled: $auto_renew_enabled, id: $id }) { auto_renew_enabled: autoRenewEnabled connected_service_instances: connectedServiceInstances { environment_id: environmentId project_id: projectId service_id: serviceId service_name: serviceName } created_at: createdAt domain id nameservers { is_default: isDefault nameservers } next_billing_date: nextBillingDate purchase_price: purchasePrice registration_years: registrationYears renewal_price: renewalPrice status workspace_id: workspaceId workspace_name: workspaceName } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "auto_renew_enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"auto_renew_enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.railwayDomainUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/railway_domains/methods/get_by_name' + - $ref: '#/components/x-stackQL-resources/railway_domains/methods/get' + - $ref: '#/components/x-stackQL-resources/railway_domains/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/railway_domains/methods/update' + delete: [] + replace: [] + service_domain_availability: + id: railway.networking.service_domain_availability + name: service_domain_availability + title: Service Domain Availability + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_domain_availability&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.serviceDomainAvailable + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_domain_availability/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + service_domains: + id: railway.networking.service_domains + name: service_domains + title: Service Domains + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_domains&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!, $target_port: Int) { serviceDomainCreate(input: { environmentId: $environment_id, serviceId: $service_id, targetPort: $target_port }) { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id new_domain_name: newDomainName new_host_label: newHostLabel project_id: projectId service_id: serviceId suffix sync_status: syncStatus target_port: targetPort updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "target_port" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"target_port":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceDomainCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_domains&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { serviceDomainDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceDomainDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceDomainDelete":{"result":{{ toJson (index (index . "data") "serviceDomainDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_domains&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.domains.serviceDomains + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_domains&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($domain: String!, $environment_id: String!, $service_domain_id: String!, $service_id: String!, $target_port: Int) { serviceDomainUpdate(input: { domain: $domain, environmentId: $environment_id, serviceDomainId: $service_domain_id, serviceId: $service_id, targetPort: $target_port }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "domain" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_domain_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_domain_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "target_port" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"target_port":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceDomainUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceDomainUpdate":{"result":{{ toJson (index (index . "data") "serviceDomainUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_domains/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/service_domains/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/service_domains/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/service_domains/methods/delete' + replace: [] + tcp_proxies: + id: railway.networking.tcp_proxies + name: tcp_proxies + title: Tcp Proxies + methods: + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=tcp_proxies&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { tcpProxyDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.tcpProxyDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"tcpProxyDelete":{"result":{{ toJson (index (index . "data") "tcpProxyDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=tcp_proxies&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.tcpProxies + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tcp_proxies/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/tcp_proxies/methods/delete' + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/observability.yaml b/providers/src/railway/v00.00.00000/services/observability.yaml new file mode 100644 index 00000000..a13aa059 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/observability.yaml @@ -0,0 +1,2774 @@ +openapi: 3.0.3 +info: + title: Observability API + description: Build, deployment, environment, HTTP, DNS query and network flow logs; resource and HTTP metrics; traces; observability dashboards; project events; notification rules and deliveries. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=build_logs&__method=list: + post: + operationId: build_logs_list + summary: Fetch logs for a build + description: Fetch logs for a build. Backed by the Railway GraphQL query buildLogs. A SQL LIMIT is pushed down to the limit argument. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.build_logs.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.buildLogs[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { buildLogs(deploymentId: "{{ .deployment_id }}" {{ if .end_date }}endDate: "{{ .end_date }}" {{ end }}{{ if .filter }}filter: "{{ .filter }}" {{ end }}{{ if .limit }}limit: {{ .limit }} {{ end }}{{ if .start_date }}startDate: "{{ .start_date }}" {{ end }}) { attributes { key value } message severity tags { deployment_id: deploymentId deployment_instance_id: deploymentInstanceId environment_id: environmentId project_id: projectId service_id: serviceId snapshot_id: snapshotId } timestamp } }' + x-stackql-protocol: graphql + parameters: + - name: deployment_id + in: query + required: true + schema: + type: string + - name: end_date + in: query + required: false + schema: + type: string + format: date-time + - name: filter + in: query + required: false + description: Filter logs by a string. Providing an empty value will match all logs. + schema: + type: string + - name: start_date + in: query + required: false + schema: + type: string + format: date-time + responses: + '200': + description: One row per Log. The result of a logs query. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + buildLogs: + type: array + items: + $ref: '#/components/schemas/Log' + /graphql/v2?__resource=deployment_logs&__method=list: + post: + operationId: deployment_logs_list + summary: Fetch logs for a deployment + description: Fetch logs for a deployment. Backed by the Railway GraphQL query deploymentLogs. A SQL LIMIT is pushed down to the limit argument. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.deployment_logs.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.deploymentLogs[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { deploymentLogs(deploymentId: "{{ .deployment_id }}" {{ if .end_date }}endDate: "{{ .end_date }}" {{ end }}{{ if .filter }}filter: "{{ .filter }}" {{ end }}{{ if .limit }}limit: {{ .limit }} {{ end }}{{ if .start_date }}startDate: "{{ .start_date }}" {{ end }}) { attributes { key value } message severity tags { deployment_id: deploymentId deployment_instance_id: deploymentInstanceId environment_id: environmentId project_id: projectId service_id: serviceId snapshot_id: snapshotId } timestamp } }' + x-stackql-protocol: graphql + parameters: + - name: deployment_id + in: query + required: true + schema: + type: string + - name: end_date + in: query + required: false + schema: + type: string + format: date-time + - name: filter + in: query + required: false + description: Filter logs by a string. Providing an empty value will match all logs. + schema: + type: string + - name: start_date + in: query + required: false + schema: + type: string + format: date-time + responses: + '200': + description: One row per Log. The result of a logs query. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deploymentLogs: + type: array + items: + $ref: '#/components/schemas/Log' + /graphql/v2?__resource=dns_query_logs&__method=list: + post: + operationId: dns_query_logs_list + summary: Fetch individual DNS query logs for an environment + description: Fetch individual DNS query logs for an environment. Backed by the Railway GraphQL query dnsQueryLogs. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.dns_query_logs.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.dnsQueryLogs[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { dnsQueryLogs({{ if .after_date }}afterDate: "{{ .after_date }}" {{ end }}{{ if .after_limit }}afterLimit: {{ .after_limit }} {{ end }}{{ if .anchor_date }}anchorDate: "{{ .anchor_date }}" {{ end }}{{ if .before_date }}beforeDate: "{{ .before_date }}" {{ end }}{{ if .before_limit }}beforeLimit: {{ .before_limit }} {{ end }}{{ if .deployment_instance_id }}deploymentInstanceId: "{{ .deployment_instance_id }}" {{ end }}environmentId: "{{ .environment_id }}" {{ if .filter }}filter: "{{ .filter }}" {{ end }}{{ if .service_id }}serviceId: "{{ .service_id }}" {{ end }}) { answers cname_chain: cnameChain deployment_id: deploymentId deployment_instance_id: deploymentInstanceId qname qtype queried_at: queriedAt query_zone: queryZone rcode service_id: serviceId } }' + x-stackql-protocol: graphql + parameters: + - name: after_date + in: query + required: false + description: Latest date to look for logs after the anchor. + schema: + type: string + - name: after_limit + in: query + required: false + description: Limit logs returned after the anchor. + schema: + type: integer + - name: anchor_date + in: query + required: false + description: Target date time to look for logs. + schema: + type: string + - name: before_date + in: query + required: false + description: Oldest date to look for logs before the anchor. + schema: + type: string + - name: before_limit + in: query + required: false + description: Limit logs returned before the anchor. + schema: + type: integer + - name: deployment_instance_id + in: query + required: false + description: Filter by deployment instance / sandbox ID (optional). + schema: + type: string + - name: environment_id + in: query + required: true + schema: + type: string + - name: filter + in: query + required: false + description: Filter expression (e.g., @rcode:NXDOMAIN @qtype:A @domain:example.com @status:failed). Prefix a term with - to exclude it; repeat a key to match any of its values. + schema: + type: string + - name: service_id + in: query + required: false + description: Filter by service ID (optional). + schema: + type: string + responses: + '200': + description: One row per DnsQueryLog. A single DNS query resolved for a service (one row per query, not aggregated). + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + dnsQueryLogs: + type: array + items: + $ref: '#/components/schemas/DnsQueryLog' + /graphql/v2?__resource=environment_logs&__method=list: + post: + operationId: environment_logs_list + summary: Fetch logs for a project environment + description: Fetch logs for a project environment. Build logs are excluded unless a snapshot ID is explicitly provided in the filter. Backed by the Railway GraphQL query environmentLogs. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.environment_logs.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environmentLogs[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { environmentLogs({{ if .after_date }}afterDate: "{{ .after_date }}" {{ end }}{{ if .after_limit }}afterLimit: {{ .after_limit }} {{ end }}{{ if .anchor_date }}anchorDate: "{{ .anchor_date }}" {{ end }}{{ if .before_date }}beforeDate: "{{ .before_date }}" {{ end }}{{ if .before_limit }}beforeLimit: {{ .before_limit }} {{ end }}environmentId: "{{ .environment_id }}" {{ if .filter }}filter: "{{ .filter }}" {{ end }}) { attributes { key value } message severity tags { deployment_id: deploymentId deployment_instance_id: deploymentInstanceId environment_id: environmentId project_id: projectId service_id: serviceId snapshot_id: snapshotId } timestamp } }' + x-stackql-protocol: graphql + parameters: + - name: after_date + in: query + required: false + description: Latest date to look for logs after the anchor. + schema: + type: string + - name: after_limit + in: query + required: false + description: Limit the number of logs returned after the anchor. + schema: + type: integer + - name: anchor_date + in: query + required: false + description: Target date time to look for logs. + schema: + type: string + - name: before_date + in: query + required: false + description: Oldest date to look for logs before the anchor. + schema: + type: string + - name: before_limit + in: query + required: false + description: Limit the number of logs returned before the anchor. + schema: + type: integer + - name: environment_id + in: query + required: true + schema: + type: string + - name: filter + in: query + required: false + description: Filter logs using a query syntax. + schema: + type: string + responses: + '200': + description: One row per Log. The result of a logs query. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environmentLogs: + type: array + items: + $ref: '#/components/schemas/Log' + /graphql/v2?__resource=events&__method=list: + post: + operationId: events_list + summary: Gets the events for a project + description: Gets the events for a project. Backed by the Railway GraphQL query events. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.events.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.events.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.events.pageInfo.endCursor + terminateOnJsonPath: $.data.events.pageInfo.hasNextPage + query: 'query { events(first: 100{{ .cursor }} {{ if .environment_id }}environmentId: "{{ .environment_id }}" {{ end }}{{ if or .action .object .service_id }}filter: { {{ if .action }}action: {{ .action }} {{ end }}{{ if .object }}object: {{ .object }} {{ end }}{{ if .service_id }}serviceId: {{ .service_id }} {{ end }}} {{ end }}projectId: "{{ .project_id }}") { edges { node { action activity_payload: activityPayload created_at: createdAt environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId id object payload project_id: projectId severity } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: false + schema: + type: string + - name: action + in: query + required: false + description: 'GraphQL input object literal of type EventStringListFilter, for example {field: "value"}.' + schema: + type: string + - name: object + in: query + required: false + description: 'GraphQL input object literal of type EventStringListFilter, for example {field: "value"}.' + schema: + type: string + - name: service_id + in: query + required: false + description: 'GraphQL input object literal of type EventStringListFilter, for example {field: "value"}.' + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Event. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + events: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Event' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=http_duration_metrics&__method=list: + post: + operationId: http_duration_metrics_list + summary: Get HTTP request duration metrics for a service (avg, p50, p90, p95, p99) + description: Get HTTP request duration metrics for a service (avg, p50, p90, p95, p99). Backed by the Railway GraphQL query httpDurationMetrics. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.http_duration_metrics.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.httpDurationMetrics.samples[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { httpDurationMetrics(endDate: "{{ .end_date }}" environmentId: "{{ .environment_id }}" {{ if .method }}method: "{{ .method }}" {{ end }}{{ if .path }}path: "{{ .path }}" {{ end }}serviceId: "{{ .service_id }}" startDate: "{{ .start_date }}" {{ if .status_code }}statusCode: {{ .status_code }} {{ end }}{{ if .step_seconds }}stepSeconds: {{ .step_seconds }} {{ end }}) { samples { p50 p90 p95 p99 ts } } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: true + description: The end of the period to get metrics for. + schema: + type: string + format: date-time + - name: environment_id + in: query + required: true + schema: + type: string + - name: method + in: query + required: false + description: Filter by HTTP method (e.g., GET, POST). + schema: + type: string + - name: path + in: query + required: false + description: Filter by request path. + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + - name: start_date + in: query + required: true + description: The start of the period to get metrics for. + schema: + type: string + format: date-time + - name: status_code + in: query + required: false + description: Filter by HTTP status code (e.g., 200, 404, 500). + schema: + type: integer + - name: step_seconds + in: query + required: false + description: The frequency of data points in the response. If the `stepSeconds` is 60, then the response will contain one data point per minute. + schema: + type: integer + responses: + '200': + description: One row per HttpDurationMetricsSample. A single sample of HTTP duration metrics. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + httpDurationMetrics: + type: object + properties: + samples: + type: array + items: + $ref: '#/components/schemas/HttpDurationMetricsSample' + /graphql/v2?__resource=http_logs&__method=list: + post: + operationId: http_logs_list + summary: Fetch HTTP logs for a deployment + description: Fetch HTTP logs for a deployment. Backed by the Railway GraphQL query httpLogs. A SQL LIMIT is pushed down to the limit argument. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.http_logs.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.httpLogs[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { httpLogs({{ if .after_date }}afterDate: "{{ .after_date }}" {{ end }}{{ if .after_limit }}afterLimit: {{ .after_limit }} {{ end }}{{ if .anchor_date }}anchorDate: "{{ .anchor_date }}" {{ end }}{{ if .before_date }}beforeDate: "{{ .before_date }}" {{ end }}{{ if .before_limit }}beforeLimit: {{ .before_limit }} {{ end }}deploymentId: "{{ .deployment_id }}" {{ if .filter }}filter: "{{ .filter }}" {{ end }}{{ if .limit }}limit: {{ .limit }} {{ end }}) { client_ua: clientUa deployment_id: deploymentId deployment_instance_id: deploymentInstanceId downstream_proto: downstreamProto edge_region: edgeRegion host http_status: httpStatus method path request_id: requestId response_details: responseDetails rx_bytes: rxBytes src_ip: srcIp timestamp total_duration: totalDuration tx_bytes: txBytes upstream_address: upstreamAddress upstream_errors: upstreamErrors upstream_proto: upstreamProto upstream_rq_duration: upstreamRqDuration } }' + x-stackql-protocol: graphql + parameters: + - name: after_date + in: query + required: false + description: Latest date to look for logs after the anchor. + schema: + type: string + - name: after_limit + in: query + required: false + description: Limit the number of logs returned after the anchor. + schema: + type: integer + - name: anchor_date + in: query + required: false + description: Target date time to look for logs. + schema: + type: string + - name: before_date + in: query + required: false + description: Oldest date to look for logs before the anchor. + schema: + type: string + - name: before_limit + in: query + required: false + description: Limit the number of logs returned before the anchor. + schema: + type: integer + - name: deployment_id + in: query + required: true + schema: + type: string + - name: filter + in: query + required: false + description: Filter logs using a query syntax. + schema: + type: string + responses: + '200': + description: One row per HttpLog. The result of a http logs query. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + httpLogs: + type: array + items: + $ref: '#/components/schemas/HttpLog' + /graphql/v2?__resource=http_metrics_grouped_by_status&__method=list: + post: + operationId: http_metrics_grouped_by_status_list + summary: Get HTTP request metrics for a service, grouped by status code + description: Get HTTP request metrics for a service, grouped by status code. Backed by the Railway GraphQL query httpMetricsGroupedByStatus. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.http_metrics_grouped_by_status.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.httpMetricsGroupedByStatus[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { httpMetricsGroupedByStatus(endDate: "{{ .end_date }}" environmentId: "{{ .environment_id }}" {{ if .method }}method: "{{ .method }}" {{ end }}{{ if .path }}path: "{{ .path }}" {{ end }}serviceId: "{{ .service_id }}" startDate: "{{ .start_date }}" {{ if .step_seconds }}stepSeconds: {{ .step_seconds }} {{ end }}) { samples { ts value } status_code: statusCode } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: true + description: The end of the period to get metrics for. + schema: + type: string + format: date-time + - name: environment_id + in: query + required: true + schema: + type: string + - name: method + in: query + required: false + description: Filter by HTTP method (e.g., GET, POST). + schema: + type: string + - name: path + in: query + required: false + description: Filter by request path. + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + - name: start_date + in: query + required: true + description: The start of the period to get metrics for. + schema: + type: string + format: date-time + - name: step_seconds + in: query + required: false + description: The frequency of data points in the response. If the `stepSeconds` is 60, then the response will contain one data point per minute. + schema: + type: integer + responses: + '200': + description: One row per HttpMetricsByStatusResult. HTTP metrics grouped by status code. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + httpMetricsGroupedByStatus: + type: array + items: + $ref: '#/components/schemas/HttpMetricsByStatusResult' + /graphql/v2?__resource=http_metrics&__method=list: + post: + operationId: http_metrics_list + summary: Get HTTP request metrics for a service + description: Get HTTP request metrics for a service. Backed by the Railway GraphQL query httpMetrics. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.http_metrics.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.httpMetrics.samples[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { httpMetrics(endDate: "{{ .end_date }}" environmentId: "{{ .environment_id }}" {{ if .method }}method: "{{ .method }}" {{ end }}{{ if .path }}path: "{{ .path }}" {{ end }}serviceId: "{{ .service_id }}" startDate: "{{ .start_date }}" {{ if .status_code }}statusCode: {{ .status_code }} {{ end }}{{ if .step_seconds }}stepSeconds: {{ .step_seconds }} {{ end }}) { samples { ts value } } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: true + description: The end of the period to get metrics for. + schema: + type: string + format: date-time + - name: environment_id + in: query + required: true + schema: + type: string + - name: method + in: query + required: false + description: Filter by HTTP method (e.g., GET, POST). + schema: + type: string + - name: path + in: query + required: false + description: Filter by request path. + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + - name: start_date + in: query + required: true + description: The start of the period to get metrics for. + schema: + type: string + format: date-time + - name: status_code + in: query + required: false + description: Filter by HTTP status code (e.g., 200, 404, 500). + schema: + type: integer + - name: step_seconds + in: query + required: false + description: The frequency of data points in the response. If the `stepSeconds` is 60, then the response will contain one data point per minute. + schema: + type: integer + responses: + '200': + description: One row per HttpMetricsSample. A single sample of an HTTP metric. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + httpMetrics: + type: object + properties: + samples: + type: array + items: + $ref: '#/components/schemas/HttpMetricsSample' + /graphql/v2?__resource=metrics&__method=list: + post: + operationId: metrics_list + summary: Get metrics for a project, environment, and service + description: Get metrics for a project, environment, and service. Backed by the Railway GraphQL query metrics. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.metrics.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.metrics[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { metrics({{ if .averaging_window_seconds }}averagingWindowSeconds: {{ .averaging_window_seconds }} {{ end }}{{ if .end_date }}endDate: "{{ .end_date }}" {{ end }}{{ if .environment_id }}environmentId: "{{ .environment_id }}" {{ end }}{{ if .group_by }}groupBy: {{ .group_by }} {{ end }}{{ if .include_deleted }}includeDeleted: {{ .include_deleted }} {{ end }}measurements: {{ .measurements }} {{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}{{ if .sample_rate_seconds }}sampleRateSeconds: {{ .sample_rate_seconds }} {{ end }}{{ if .service_id }}serviceId: "{{ .service_id }}" {{ end }}startDate: "{{ .start_date }}" {{ if .volume_id }}volumeId: "{{ .volume_id }}" {{ end }}{{ if .volume_instance_external_id }}volumeInstanceExternalId: "{{ .volume_instance_external_id }}" {{ end }}{{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}) { measurement tags { deployment_id: deploymentId deployment_instance_id: deploymentInstanceId environment_id: environmentId project_id: projectId region service_id: serviceId volume_id: volumeId volume_instance_id: volumeInstanceId } values_: values { ts value } } }' + x-stackql-protocol: graphql + parameters: + - name: averaging_window_seconds + in: query + required: false + description: The averaging window when computing CPU usage. By default, it is the same as the `sampleRateSeconds`. + schema: + type: integer + - name: end_date + in: query + required: false + description: The end of the period to get metrics for. If not provided, the current datetime is used. + schema: + type: string + format: date-time + - name: environment_id + in: query + required: false + schema: + type: string + - name: group_by + in: query + required: false + description: What to group the aggregated usage by. By default, it is grouped over the entire project. GraphQL list literal of MetricTag values, for example [BILLABLE, DEPLOYMENT_ID]. + schema: + type: string + - name: include_deleted + in: query + required: false + description: Whether or not to include deleted projects in the results. + schema: + type: boolean + - name: measurements + in: query + required: true + description: GraphQL list literal of MetricMeasurement values, for example [AGENT_CACHE_READ_TOKENS, AGENT_CACHE_WRITE_TOKENS]. + schema: + type: string + - name: project_id + in: query + required: false + schema: + type: string + - name: sample_rate_seconds + in: query + required: false + description: The frequency of data points in the response. If the `sampleRateSeconds` is 60, then the response will contain one data point per minute. + schema: + type: integer + - name: service_id + in: query + required: false + schema: + type: string + - name: start_date + in: query + required: true + description: The start of the period to get metrics for. + schema: + type: string + format: date-time + - name: volume_id + in: query + required: false + schema: + type: string + - name: volume_instance_external_id + in: query + required: false + schema: + type: string + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per MetricsResult. The result of a metrics query. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + metrics: + type: array + items: + $ref: '#/components/schemas/MetricsResult' + /graphql/v2?__resource=network_flow_logs&__method=list: + post: + operationId: network_flow_logs_list + summary: Fetch individual network flow logs for an environment + description: Fetch individual network flow logs for an environment. Backed by the Railway GraphQL query networkFlowLogs. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.network_flow_logs.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.networkFlowLogs[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { networkFlowLogs({{ if .after_date }}afterDate: "{{ .after_date }}" {{ end }}{{ if .after_limit }}afterLimit: {{ .after_limit }} {{ end }}{{ if .anchor_date }}anchorDate: "{{ .anchor_date }}" {{ end }}{{ if .before_date }}beforeDate: "{{ .before_date }}" {{ end }}{{ if .before_limit }}beforeLimit: {{ .before_limit }} {{ end }}{{ if .deployment_instance_id }}deploymentInstanceId: "{{ .deployment_instance_id }}" {{ end }}environmentId: "{{ .environment_id }}" {{ if .filter }}filter: "{{ .filter }}" {{ end }}{{ if .service_id }}serviceId: "{{ .service_id }}" {{ end }}) { byte_count: byteCount capture_end: captureEnd capture_start: captureStart deployment_id: deploymentId deployment_instance_id: deploymentInstanceId direction drop_cause: dropCause dst_addr: dstAddr dst_port: dstPort flow_id: flowId flow_state: flowState l4_latency_ms: l4LatencyMs l4_protocol: l4Protocol packet_count: packetCount peer_kind: peerKind peer_service_id: peerServiceId service_id: serviceId src_addr: srcAddr src_port: srcPort } }' + x-stackql-protocol: graphql + parameters: + - name: after_date + in: query + required: false + description: Latest date to look for logs after the anchor. + schema: + type: string + - name: after_limit + in: query + required: false + description: Limit logs returned after the anchor. + schema: + type: integer + - name: anchor_date + in: query + required: false + description: Target date time to look for logs. + schema: + type: string + - name: before_date + in: query + required: false + description: Oldest date to look for logs before the anchor. + schema: + type: string + - name: before_limit + in: query + required: false + description: Limit logs returned before the anchor. + schema: + type: integer + - name: deployment_instance_id + in: query + required: false + description: Filter by deployment instance / sandbox ID (optional). + schema: + type: string + - name: environment_id + in: query + required: true + schema: + type: string + - name: filter + in: query + required: false + description: Filter expression (e.g., @protocol:tcp @direction:egress @dropped:true). + schema: + type: string + - name: service_id + in: query + required: false + description: Filter by service ID (optional). + schema: + type: string + responses: + '200': + description: One row per NetworkFlowLog. A single network flow log entry. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + networkFlowLogs: + type: array + items: + $ref: '#/components/schemas/NetworkFlowLog' + /graphql/v2?__resource=notification_deliveries&__method=get: + post: + operationId: notification_deliveries_get + summary: Gets a notification delivery by ID for the authenticated user + description: Gets a notification delivery by ID for the authenticated user. Backed by the Railway GraphQL query notificationDelivery. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.notification_deliveries.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { notificationDelivery(id: "{{ .id }}") { created_at: createdAt id notification_instance: notificationInstance { created_at: createdAt environment_id: environmentId event_id: eventId event_type: eventType id project_id: projectId resolved_at: resolvedAt resource_id: resourceId resource_type: resourceType service_id: serviceId severity status updated_at: updatedAt volume_id: volumeId workspace_id: workspaceId } read_at: readAt status type updated_at: updatedAt user_id: userId } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One NotificationDelivery row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + notificationDelivery: + $ref: '#/components/schemas/NotificationDelivery' + /graphql/v2?__resource=notification_deliveries&__method=list: + post: + operationId: notification_deliveries_list + summary: Gets notification deliveries for the authenticated user + description: Gets notification deliveries for the authenticated user. Backed by the Railway GraphQL query notificationDeliveries. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.notification_deliveries.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.notificationDeliveries.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.notificationDeliveries.pageInfo.endCursor + terminateOnJsonPath: $.data.notificationDeliveries.pageInfo.hasNextPage + query: 'query { notificationDeliveries(first: 100{{ .cursor }} {{ if or .environment_id .only_unread .project_id .status .type .workspace_id }}filter: { {{ if .environment_id }}environmentId: "{{ .environment_id }}" {{ end }}{{ if .only_unread }}onlyUnread: {{ .only_unread }} {{ end }}{{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}{{ if .status }}status: {{ .status }} {{ end }}{{ if .type }}type: {{ .type }} {{ end }}{{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}} {{ end }}) { edges { node { created_at: createdAt id notification_instance: notificationInstance { created_at: createdAt environment_id: environmentId event_id: eventId event_type: eventType id project_id: projectId resolved_at: resolvedAt resource_id: resourceId resource_type: resourceType service_id: serviceId severity status updated_at: updatedAt volume_id: volumeId workspace_id: workspaceId } read_at: readAt status type updated_at: updatedAt user_id: userId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: false + schema: + type: string + - name: only_unread + in: query + required: false + schema: + type: boolean + - name: project_id + in: query + required: false + schema: + type: string + - name: status + in: query + required: false + schema: + type: string + enum: + - ACTIVE + - RESOLVED + - name: type + in: query + required: false + schema: + type: string + enum: + - EMAIL + - INAPP + - WEBHOOK + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per NotificationDelivery. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + notificationDeliveries: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/NotificationDelivery' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=notification_deliveries&__method=mark_as_read: + post: + operationId: notification_deliveries_mark_as_read + summary: Marks notification deliveries as read + description: Marks notification deliveries as read. Backed by the Railway GraphQL mutation notificationDeliveriesMarkAsRead. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - delivery_ids + properties: + delivery_ids: + type: array + items: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + notificationDeliveriesMarkAsRead: + $ref: '#/components/schemas/NotificationDeliveriesMarkAsReadResult' + /graphql/v2?__resource=notification_rules&__method=create: + post: + operationId: notification_rules_create + summary: Create a new notification rule + description: Create a new notification rule. Backed by the Railway GraphQL mutation notificationRuleCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - channel_configs + - event_types + - workspace_id + properties: + channel_configs: + type: array + items: + type: object + ephemeral_environments: + type: boolean + event_types: + type: array + items: + type: string + project_id: + type: string + severities: + type: array + items: + type: string + enum: + - CRITICAL + - INFO + - NOTICE + - WARNING + workspace_id: + type: string + responses: + '200': + description: The NotificationRule the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + notificationRuleCreate: + $ref: '#/components/schemas/NotificationRule' + /graphql/v2?__resource=notification_rules&__method=delete: + post: + operationId: notification_rules_delete + summary: Delete a notification rule + description: Delete a notification rule. Backed by the Railway GraphQL mutation notificationRuleDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + notificationRuleDelete: + $ref: '#/components/schemas/NotificationRuleDeleteResult' + /graphql/v2?__resource=notification_rules&__method=list: + post: + operationId: notification_rules_list + summary: Get all notification rules for a workspace and project + description: Get all notification rules for a workspace and project. Backed by the Railway GraphQL query notificationRules. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.notification_rules.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.notificationRules[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { notificationRules({{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}workspaceId: "{{ .workspace_id }}") { channels { config created_at: createdAt id updated_at: updatedAt workspace_id: workspaceId } created_at: createdAt environment_id: environmentId ephemeral_environments: ephemeralEnvironments event_types: eventTypes id project_id: projectId service_id: serviceId severities updated_at: updatedAt workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: false + schema: + type: string + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per NotificationRule. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + notificationRules: + type: array + items: + $ref: '#/components/schemas/NotificationRule' + /graphql/v2?__resource=notification_rules&__method=test_webhook: + post: + operationId: notification_rules_test_webhook + summary: Test a webhook URL by sending a sample payload + description: Test a webhook URL by sending a sample payload. Returns the HTTP status code. Backed by the Railway GraphQL mutation webhookTest. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - payload + - url + properties: + payload: + type: string + url: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + webhookTest: + $ref: '#/components/schemas/WebhookTestResult' + /graphql/v2?__resource=notification_rules&__method=update: + post: + operationId: notification_rules_update + summary: Update a notification rule + description: Update a notification rule. Backed by the Railway GraphQL mutation notificationRuleUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + channel_configs: + type: array + items: + type: object + ephemeral_environments: + type: boolean + event_types: + type: array + items: + type: string + severities: + type: array + items: + type: string + enum: + - CRITICAL + - INFO + - NOTICE + - WARNING + responses: + '200': + description: The NotificationRule the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + notificationRuleUpdate: + $ref: '#/components/schemas/NotificationRule' + /graphql/v2?__resource=observability_dashboards&__method=create: + post: + operationId: observability_dashboards_create + summary: Create an observability dashboard + description: Create an observability dashboard. Backed by the Railway GraphQL mutation observabilityDashboardCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + properties: + environment_id: + type: string + items: + type: array + items: + type: object + description: If no items are provided, a default dashboard will be created. JSON array of objects of GraphQL type ObservabilityDashboardUpdateInput; keys keep the API's camelCase names. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + observabilityDashboardCreate: + $ref: '#/components/schemas/ObservabilityDashboardCreateResult' + /graphql/v2?__resource=observability_dashboards&__method=list: + post: + operationId: observability_dashboards_list + summary: Get all observability dashboards for an environment + description: Get all observability dashboards for an environment. Backed by the Railway GraphQL query observabilityDashboards. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.observability_dashboards.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.observabilityDashboards.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.observabilityDashboards.pageInfo.endCursor + terminateOnJsonPath: $.data.observabilityDashboards.pageInfo.hasNextPage + query: 'query { observabilityDashboards(first: 100{{ .cursor }} environmentId: "{{ .environment_id }}") { edges { node { id items { id } } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ObservabilityDashboard. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + observabilityDashboards: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/ObservabilityDashboard' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=observability_dashboards&__method=reset: + post: + operationId: observability_dashboards_reset + summary: Reset an observability dashboard to default dashboard items + description: Reset an observability dashboard to default dashboard items. Backed by the Railway GraphQL mutation observabilityDashboardReset. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + observabilityDashboardReset: + $ref: '#/components/schemas/ObservabilityDashboardResetResult' + /graphql/v2?__resource=observability_dashboards&__method=update: + post: + operationId: observability_dashboards_update + summary: Update an observability dashboard + description: Update an observability dashboard. Backed by the Railway GraphQL mutation observabilityDashboardUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - input + properties: + id: + type: string + input: + type: array + items: + type: object + description: JSON array of objects of GraphQL type ObservabilityDashboardUpdateInput; keys keep the API's camelCase names. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + observabilityDashboardUpdate: + $ref: '#/components/schemas/ObservabilityDashboardUpdateResult' + /graphql/v2?__resource=trace_spans&__method=list: + post: + operationId: trace_spans_list + summary: The spans of one trace, oldest first + description: The spans of one trace, oldest first. Only spans belonging to the environment are returned. Backed by the Railway GraphQL query trace. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.trace_spans.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.trace[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { trace(environmentId: "{{ .environment_id }}" {{ if .max_spans }}maxSpans: {{ .max_spans }} {{ end }}traceId: "{{ .trace_id }}") { component deployment_id: deploymentId deployment_instance_id: deploymentInstanceId duration_ms: durationMs events { name timestamp } kind links { span_id: spanId trace_id: traceId } name parent_span_id: parentSpanId resource_attributes: resourceAttributes service_id: serviceId service_name: serviceName span_attributes: spanAttributes span_id: spanId started_at: startedAt status_code: statusCode status_message: statusMessage trace_id: traceId } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: max_spans + in: query + required: false + description: Spans returned (defaults 1000, max 2000). + schema: + type: integer + - name: trace_id + in: query + required: true + description: W3C trace id, 32 hex characters. + schema: + type: string + responses: + '200': + description: One row per TraceSpan. One span of a trace. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + trace: + type: array + items: + $ref: '#/components/schemas/TraceSpan' + /graphql/v2?__resource=traces&__method=list: + post: + operationId: traces_list + summary: Traces of an environment with at least one span matching the filter, newest first + description: Traces of an environment with at least one span matching the filter, newest first. Backed by the Railway GraphQL query traces. A SQL LIMIT is pushed down to the limit argument. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.traces.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.traces[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { traces({{ if .end_date }}endDate: "{{ .end_date }}" {{ end }}environmentId: "{{ .environment_id }}" {{ if .filter }}filter: "{{ .filter }}" {{ end }}{{ if .limit }}limit: {{ .limit }} {{ end }}{{ if .service_id }}serviceId: "{{ .service_id }}" {{ end }}{{ if .start_date }}startDate: "{{ .start_date }}" {{ end }}) { duration_ms: durationMs error_count: errorCount has_edge: hasEdge root_component: rootComponent root_server_address: rootServerAddress root_service_id: rootServiceId root_service_name: rootServiceName root_span_name: rootSpanName root_url_path: rootUrlPath service_name: serviceName span_count: spanCount started_at: startedAt trace_id: traceId } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: false + description: Latest span start to consider (ISO); defaults to now. + schema: + type: string + - name: environment_id + in: query + required: true + schema: + type: string + - name: filter + in: query + required: false + description: 'Filter expression over spans, e.g. @status:error @component:edge @duration:>500 @http.route:/api/users. Built-in fields: trace, span, name, serviceName, service, deployment, replica, component, kind, status, duration (ms). Any other @key looks the key up in the span and resource attributes; free text matches the span name. Prefix a term with - to exclude it.' + schema: + type: string + - name: service_id + in: query + required: false + description: Only traces with a span from this Railway service (optional). + schema: + type: string + - name: start_date + in: query + required: false + description: Oldest span start to consider (ISO). Clamped to the project's retention; defaults to one hour ago. + schema: + type: string + responses: + '200': + description: 'One row per TraceSummary. One trace of an environment: the request as a whole, summarised from its spans.' + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + traces: + type: array + items: + $ref: '#/components/schemas/TraceSummary' + /graphql/v2?__resource=tracing_status&__method=list: + post: + operationId: tracing_status_list + summary: Span activity per service of an environment within retention; a service absent from the list has produced no spans at all + description: Span activity per service of an environment within retention; a service absent from the list has produced no spans at all. Backed by the Railway GraphQL query tracingStatus. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.observability.tracing_status.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.tracingStatus[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { tracingStatus(environmentId: "{{ .environment_id }}") { last_edge_span_at: lastEdgeSpanAt last_service_span_at: lastServiceSpanAt service_id: serviceId } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ServiceTracingStatus. Whether a service's requests are producing spans, per exporting hop. The edge tracing a request says nothing about the app behind it. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + tracingStatus: + type: array + items: + $ref: '#/components/schemas/ServiceTracingStatus' +components: + schemas: + DnsQueryLog: + type: object + properties: + answers: + type: array + items: + type: string + description: The IP addresses the name resolved to + cname_chain: + type: array + items: + type: string + description: Ordered CNAME targets the queried name aliased through before the final answer (empty when the response had no CNAME) + deployment_id: + type: string + description: The deployment ID + deployment_instance_id: + type: string + description: The deployment instance ID + qname: + type: string + description: The domain name that was looked up + qtype: + type: string + description: The DNS record type queried (A, AAAA, TXT, ...) + queried_at: + type: string + description: When the query was resolved (ISO timestamp) + query_zone: + type: string + enum: + - external + - internal + description: Whether the query targeted the internal zone or the public internet + rcode: + type: string + description: The DNS response code (NOERROR, NXDOMAIN, SERVFAIL, ...) or synthetic TIMEOUT/ERROR when no upstream response was received + service_id: + type: string + description: The service ID that made the queries + Event: + type: object + properties: + action: + type: string + activity_payload: + type: object + description: Minimal event payload for activity feed list rendering. Avoids returning large deployment payload fields like commit messages. + created_at: + type: string + format: date-time + environment: + type: object + properties: + can_access: + type: boolean + config_etag: + type: string + description: Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + id: + type: string + is_ephemeral: + type: boolean + name: + type: string + project_id: + type: string + unmerged_changes_count: + type: integer + updated_at: + type: string + format: date-time + description: Environment object + environment_id: + type: string + id: + type: string + object: + type: string + payload: + type: object + project_id: + type: string + severity: + type: string + enum: + - CRITICAL + - INFO + - NOTICE + - WARNING + HttpDurationMetricsSample: + type: object + properties: + p50: + type: number + description: 50th percentile (median) request duration in milliseconds. + p90: + type: number + description: 90th percentile request duration in milliseconds. + p95: + type: number + description: 95th percentile request duration in milliseconds. + p99: + type: number + description: 99th percentile request duration in milliseconds. + ts: + type: integer + description: The timestamp of the sample. Represented as number of seconds since the Unix epoch. + HttpLog: + type: object + properties: + client_ua: + type: string + description: The client user agent + deployment_id: + type: string + description: The deployment ID that was requested + deployment_instance_id: + type: string + description: The deployment instance ID that was requested + downstream_proto: + type: string + description: The downstream HTTP protocol version + edge_region: + type: string + description: The edge region the client connected to + host: + type: string + description: The requested host + http_status: + type: integer + description: The http status of the log + method: + type: string + description: The request HTTP method + path: + type: string + description: The requested path + request_id: + type: string + description: The unique request ID + response_details: + type: string + description: Details about the upstream response + rx_bytes: + type: integer + description: Received bytes + src_ip: + type: string + description: The source IP of the request + timestamp: + type: string + description: The timestamp the log was created + total_duration: + type: integer + description: The total duration the request took + tx_bytes: + type: integer + description: Outgoing bytes + upstream_address: + type: string + description: The upstream address + upstream_errors: + type: string + description: Any upstream errors that occurred + upstream_proto: + type: string + description: The upstream HTTP protocol version + upstream_rq_duration: + type: integer + description: How long the upstream request took to respond + HttpMetricsByStatusResult: + type: object + properties: + samples: + type: array + items: + type: object + properties: + ts: + type: integer + description: The timestamp of the sample. Represented as number of seconds since the Unix epoch. + value: + type: number + description: The value of the sample (count of requests). + description: The samples of HTTP metrics for this status code. + status_code: + type: integer + description: The HTTP status code. + HttpMetricsSample: + type: object + properties: + ts: + type: integer + description: The timestamp of the sample. Represented as number of seconds since the Unix epoch. + value: + type: number + description: The value of the sample (count of requests). + Log: + type: object + properties: + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: The attributes that were parsed from a structured log + message: + type: string + description: The contents of the log message + severity: + type: string + description: The severity of the log message (eg. err) + tags: + type: object + properties: + deployment_id: + type: string + deployment_instance_id: + type: string + environment_id: + type: string + project_id: + type: string + service_id: + type: string + snapshot_id: + type: string + description: The tags that were associated with the log + timestamp: + type: string + description: The timestamp of the log message in format RFC3339 (nano) + MetricsResult: + type: object + properties: + measurement: + type: string + enum: + - AGENT_CACHE_READ_TOKENS + - AGENT_CACHE_WRITE_TOKENS + - AGENT_INPUT_TOKENS + - AGENT_OUTPUT_TOKENS + - AGENT_SPEND_USD + - BACKUP_USAGE_GB + - CPU_LIMIT + - CPU_USAGE + - CPU_USAGE_2 + - DISK_USAGE_GB + - EPHEMERAL_DISK_USAGE_GB + - MEASUREMENT_UNSPECIFIED + - MEMORY_LIMIT_GB + - MEMORY_USAGE_GB + - NETWORK_RX_GB + - NETWORK_TX_GB + - UNRECOGNIZED + description: The measurement of the metric. + tags: + type: object + properties: + deployment_id: + type: string + deployment_instance_id: + type: string + environment_id: + type: string + project_id: + type: string + region: + type: string + service_id: + type: string + volume_id: + type: string + volume_instance_id: + type: string + description: The tags that were used to group the metric. Only the tags that were used to by will be present. + values_: + type: array + items: + type: object + properties: + ts: + type: integer + description: The timestamp of the sample. Represented has number of seconds since the Unix epoch. + value: + type: number + description: The value of the sample. + description: The samples of the metric. + NetworkFlowLog: + type: object + properties: + byte_count: + type: integer + description: Number of bytes transferred + capture_end: + type: string + description: When the flow capture ended (ISO timestamp) + capture_start: + type: string + description: When the flow capture started (ISO timestamp) + deployment_id: + type: string + description: The deployment ID + deployment_instance_id: + type: string + description: The deployment instance ID + direction: + type: string + enum: + - egress + - ingress + description: Traffic direction (ingress or egress) + drop_cause: + type: string + description: If packets were dropped, the reason + dst_addr: + type: string + description: Destination IP address + dst_port: + type: integer + description: Destination port number + flow_id: + type: string + description: Unique identifier for the flow + flow_state: + type: string + enum: + - complete + - partial + description: Whether the flow is partial or complete + l4_latency_ms: + type: number + description: Layer 4 latency in milliseconds + l4_protocol: + type: string + enum: + - icmp + - icmpv6 + - tcp + - udp + - unknown + description: Layer 4 protocol (TCP, UDP, ICMP, etc) + packet_count: + type: integer + description: Number of packets transferred + peer_kind: + type: string + enum: + - edge_proxy + - internet + - local_dns + - service + - unknown + description: Type of peer (service, internet, DNS, etc) + peer_service_id: + type: string + description: Service instance ID of the peer (for service-to-service flows) + service_id: + type: string + description: The service ID this flow belongs to + src_addr: + type: string + description: Source IP address + src_port: + type: integer + description: Source port number + NotificationDeliveriesMarkAsReadResult: + type: object + properties: + result: + type: boolean + description: Value returned by the notificationDeliveriesMarkAsRead mutation (Boolean!) + NotificationDelivery: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + notification_instance: + type: object + properties: + created_at: + type: string + format: date-time + environment_id: + type: string + event_id: + type: string + event_type: + type: string + id: + type: string + project_id: + type: string + resolved_at: + type: string + format: date-time + resource_id: + type: string + resource_type: + type: string + service_id: + type: string + severity: + type: string + enum: + - CRITICAL + - INFO + - NOTICE + - WARNING + status: + type: string + enum: + - ACTIVE + - RESOLVED + updated_at: + type: string + format: date-time + volume_id: + type: string + workspace_id: + type: string + description: NotificationInstance object + read_at: + type: string + format: date-time + status: + type: string + enum: + - FAILED + - PENDING + - SENT + type: + type: string + enum: + - EMAIL + - INAPP + - WEBHOOK + updated_at: + type: string + format: date-time + user_id: + type: string + NotificationRule: + type: object + properties: + channels: + type: array + items: + type: object + properties: + config: + type: object + created_at: + type: string + format: date-time + id: + type: string + updated_at: + type: string + format: date-time + workspace_id: + type: string + description: List of NotificationChannel objects + created_at: + type: string + format: date-time + environment_id: + type: string + ephemeral_environments: + type: boolean + event_types: + type: array + items: + type: string + id: + type: string + project_id: + type: string + service_id: + type: string + severities: + type: array + items: + type: string + enum: + - CRITICAL + - INFO + - NOTICE + - WARNING + updated_at: + type: string + format: date-time + workspace_id: + type: string + NotificationRuleDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the notificationRuleDelete mutation (Boolean!) + ObservabilityDashboard: + type: object + properties: + id: + type: string + items: + type: array + items: + type: object + properties: + id: + type: string + description: List of ObservabilityDashboardItemInstance objects + ObservabilityDashboardCreateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the observabilityDashboardCreate mutation (Boolean!) + ObservabilityDashboardResetResult: + type: object + properties: + result: + type: boolean + description: Value returned by the observabilityDashboardReset mutation (Boolean!) + ObservabilityDashboardUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the observabilityDashboardUpdate mutation (Boolean!) + ServiceTracingStatus: + type: object + properties: + last_edge_span_at: + type: string + format: date-time + description: When the edge last exported a span for a request to the service; null when it never has within retention + last_service_span_at: + type: string + format: date-time + description: When the service's own app last exported a span; null when it never has within retention + service_id: + type: string + TraceSpan: + type: object + properties: + component: + type: string + description: 'Which hop exported the span: edge, proxy or service' + deployment_id: + type: string + deployment_instance_id: + type: string + duration_ms: + type: number + events: + type: array + items: + type: object + properties: + name: + type: string + timestamp: + type: string + description: List of TraceSpanEvent objects + kind: + type: string + description: INTERNAL, SERVER, CLIENT, PRODUCER, CONSUMER or UNSPECIFIED + links: + type: array + items: + type: object + properties: + span_id: + type: string + trace_id: + type: string + description: List of TraceSpanLink objects + name: + type: string + parent_span_id: + type: string + description: Absent on a root span + resource_attributes: + type: object + description: Resource attributes as exported, without the railway.* keys Railway promotes into typed fields + service_id: + type: string + description: Railway service the span belongs to, when known + service_name: + type: string + description: The exporter's service.name resource attribute + span_attributes: + type: object + span_id: + type: string + description: 16 lower-case hex characters + started_at: + type: string + description: ISO timestamp + status_code: + type: string + description: UNSET, OK or ERROR + status_message: + type: string + trace_id: + type: string + TraceSummary: + type: object + properties: + duration_ms: + type: number + description: From the earliest span start to the latest span end + error_count: + type: integer + description: Spans with an error status + has_edge: + type: boolean + description: Whether the edge exported any span of the trace + root_component: + type: string + description: 'Which hop exported the root span: edge (hikari), proxy (tcp-proxy) or service' + root_server_address: + type: string + description: The root span's server.address, when it set one + root_service_id: + type: string + description: Railway service the root span belongs to + root_service_name: + type: string + description: The root span's service.name + root_span_name: + type: string + description: Name of the root span, or of the earliest span when the root is missing + root_url_path: + type: string + description: The root span's url.path, when it set one + service_name: + type: string + description: service.name of the earliest span a service exported; null when the request never reached one + span_count: + type: integer + started_at: + type: string + description: Start of the earliest span (ISO timestamp) + trace_id: + type: string + description: W3C trace id, 32 lower-case hex characters + WebhookTestResult: + type: object + properties: + result: + type: integer + description: Value returned by the webhookTest mutation (Int!) + x-stackQL-resources: + build_logs: + id: railway.observability.build_logs + name: build_logs + title: Build Logs + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=build_logs&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.buildLogs + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/build_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + deployment_logs: + id: railway.observability.deployment_logs + name: deployment_logs + title: Deployment Logs + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=deployment_logs&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.deploymentLogs + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployment_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + dns_query_logs: + id: railway.observability.dns_query_logs + name: dns_query_logs + title: Dns Query Logs + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=dns_query_logs&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.dnsQueryLogs + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dns_query_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + environment_logs: + id: railway.observability.environment_logs + name: environment_logs + title: Environment Logs + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_logs&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environmentLogs + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + events: + id: railway.observability.events + name: events + title: Events + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=events&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.events.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "events" -}}{"data":{"events":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + http_duration_metrics: + id: railway.observability.http_duration_metrics + name: http_duration_metrics + title: Http Duration Metrics + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=http_duration_metrics&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.httpDurationMetrics.samples + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/http_duration_metrics/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + http_logs: + id: railway.observability.http_logs + name: http_logs + title: Http Logs + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=http_logs&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.httpLogs + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/http_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + http_metrics: + id: railway.observability.http_metrics + name: http_metrics + title: Http Metrics + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=http_metrics&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.httpMetrics.samples + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/http_metrics/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + http_metrics_grouped_by_status: + id: railway.observability.http_metrics_grouped_by_status + name: http_metrics_grouped_by_status + title: Http Metrics Grouped By Status + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=http_metrics_grouped_by_status&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.httpMetricsGroupedByStatus + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/http_metrics_grouped_by_status/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + metrics: + id: railway.observability.metrics + name: metrics + title: Metrics + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=metrics&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.metrics + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/metrics/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + network_flow_logs: + id: railway.observability.network_flow_logs + name: network_flow_logs + title: Network Flow Logs + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=network_flow_logs&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.networkFlowLogs + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/network_flow_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + notification_deliveries: + id: railway.observability.notification_deliveries + name: notification_deliveries + title: Notification Deliveries + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_deliveries&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.notificationDelivery + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_deliveries&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.notificationDeliveries.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "notificationDeliveries" -}}{"data":{"notificationDeliveries":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + mark_as_read: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_deliveries&__method=mark_as_read/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($delivery_ids: [String!]!) { notificationDeliveriesMarkAsRead(deliveryIds: $delivery_ids) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "delivery_ids" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"delivery_ids":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.notificationDeliveriesMarkAsRead + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"notificationDeliveriesMarkAsRead":{"result":{{ toJson (index (index . "data") "notificationDeliveriesMarkAsRead") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/notification_deliveries/methods/get' + - $ref: '#/components/x-stackQL-resources/notification_deliveries/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + notification_rules: + id: railway.observability.notification_rules + name: notification_rules + title: Notification Rules + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_rules&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($channel_configs: [NotificationChannelConfig!]!, $ephemeral_environments: Boolean, $event_types: [String!]!, $project_id: String, $severities: [NotificationSeverity!], $workspace_id: String!) { notificationRuleCreate(input: { channelConfigs: $channel_configs, ephemeralEnvironments: $ephemeral_environments, eventTypes: $event_types, projectId: $project_id, severities: $severities, workspaceId: $workspace_id }) { channels { config created_at: createdAt id updated_at: updatedAt workspace_id: workspaceId } created_at: createdAt environment_id: environmentId ephemeral_environments: ephemeralEnvironments event_types: eventTypes id project_id: projectId service_id: serviceId severities updated_at: updatedAt workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "channel_configs" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"channel_configs":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "ephemeral_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ephemeral_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "event_types" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"event_types":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "severities" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"severities":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.notificationRuleCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_rules&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { notificationRuleDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.notificationRuleDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"notificationRuleDelete":{"result":{{ toJson (index (index . "data") "notificationRuleDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_rules&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.notificationRules + x-stackql-protocol: graphql + test_webhook: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_rules&__method=test_webhook/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($payload: String!, $url: String!) { webhookTest(payload: $payload, url: $url) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "payload" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"payload":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "url" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"url":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.webhookTest + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"webhookTest":{"result":{{ toJson (index (index . "data") "webhookTest") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=notification_rules&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $channel_configs: [NotificationChannelConfig!], $ephemeral_environments: Boolean, $event_types: [String!], $severities: [NotificationSeverity!]) { notificationRuleUpdate(id: $id, input: { channelConfigs: $channel_configs, ephemeralEnvironments: $ephemeral_environments, eventTypes: $event_types, severities: $severities }) { channels { config created_at: createdAt id updated_at: updatedAt workspace_id: workspaceId } created_at: createdAt environment_id: environmentId ephemeral_environments: ephemeralEnvironments event_types: eventTypes id project_id: projectId service_id: serviceId severities updated_at: updatedAt workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "channel_configs" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"channel_configs":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "ephemeral_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ephemeral_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "event_types" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"event_types":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "severities" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"severities":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.notificationRuleUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/notification_rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/notification_rules/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/notification_rules/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/notification_rules/methods/delete' + replace: [] + observability_dashboards: + id: railway.observability.observability_dashboards + name: observability_dashboards + title: Observability Dashboards + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=observability_dashboards&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $items: [ObservabilityDashboardUpdateInput!]) { observabilityDashboardCreate(input: { environmentId: $environment_id, items: $items }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "items" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"items":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.observabilityDashboardCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"observabilityDashboardCreate":{"result":{{ toJson (index (index . "data") "observabilityDashboardCreate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=observability_dashboards&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.observabilityDashboards.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "observabilityDashboards" -}}{"data":{"observabilityDashboards":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + reset: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=observability_dashboards&__method=reset/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { observabilityDashboardReset(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.observabilityDashboardReset + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"observabilityDashboardReset":{"result":{{ toJson (index (index . "data") "observabilityDashboardReset") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=observability_dashboards&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $input: [ObservabilityDashboardUpdateInput!]!) { observabilityDashboardUpdate(id: $id, input: $input) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "input" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"input":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.observabilityDashboardUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"observabilityDashboardUpdate":{"result":{{ toJson (index (index . "data") "observabilityDashboardUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/observability_dashboards/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/observability_dashboards/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/observability_dashboards/methods/update' + delete: [] + replace: [] + trace_spans: + id: railway.observability.trace_spans + name: trace_spans + title: Trace Spans + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=trace_spans&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.trace + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/trace_spans/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + traces: + id: railway.observability.traces + name: traces + title: Traces + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=traces&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.traces + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/traces/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tracing_status: + id: railway.observability.tracing_status + name: tracing_status + title: Tracing Status + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=tracing_status&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.tracingStatus + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tracing_status/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/platform.yaml b/providers/src/railway/v00.00.00000/services/platform.yaml new file mode 100644 index 00000000..4dd0a703 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/platform.yaml @@ -0,0 +1,1133 @@ +openapi: 3.0.3 +info: + title: Platform API + description: 'Platform reference data: regions, platform status, public statistics, function runtimes, platform feature flags and signals.' + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=all_platform_feature_flags&__method=list: + post: + operationId: all_platform_feature_flags_list + summary: Returns the platform feature flags enabled for the current user + description: Returns the platform feature flags enabled for the current user. Backed by the Railway GraphQL query allPlatformFeatureFlags. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.all_platform_feature_flags.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.allPlatformFeatureFlags[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { allPlatformFeatureFlags { flag rollout_percentage: rolloutPercentage status type } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per PlatformFeatureFlagStatus. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + allPlatformFeatureFlags: + type: array + items: + $ref: '#/components/schemas/PlatformFeatureFlagStatus' + /graphql/v2?__resource=platform_status&__method=get: + post: + operationId: platform_status_get + summary: Get the current status of the platform + description: Get the current status of the platform. Backed by the Railway GraphQL query platformStatus. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.platform_status.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { platformStatus { incident { created_at: createdAt id message status url } is_stable: isStable maintenance { id message start status url } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One PlatformStatus row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + platformStatus: + $ref: '#/components/schemas/PlatformStatus' + /graphql/v2?__resource=public_stats&__method=get: + post: + operationId: public_stats_get + summary: Get public Railway stats + description: Get public Railway stats. Backed by the Railway GraphQL query publicStats. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.public_stats.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { publicStats { total_deployments_last_month: totalDeploymentsLastMonth total_logs_last_month: totalLogsLastMonth total_projects: totalProjects total_requests_last_month: totalRequestsLastMonth total_services: totalServices total_users: totalUsers } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One PublicStats row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + publicStats: + $ref: '#/components/schemas/PublicStats' + /graphql/v2?__resource=regions&__method=list: + post: + operationId: regions_list + summary: List available regions + description: List available regions. Backed by the Railway GraphQL query regions. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.regions.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.regions[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { regions{{ if or .project_id }}({{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}){{ end }} { country id location name region workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per Region. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + regions: + type: array + items: + $ref: '#/components/schemas/Region' + /graphql/v2?__resource=signal_changes&__method=list: + post: + operationId: signal_changes_list + summary: Recent audit log entries for a signal + description: Recent audit log entries for a signal. Backed by the Railway GraphQL query signalChanges. A SQL LIMIT is pushed down to the limit argument. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.signal_changes.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.signalChanges[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { signalChanges({{ if .limit }}limit: {{ .limit }} {{ end }}name: "{{ .name }}" {{ if .owner }}owner: "{{ .owner }}" {{ end }}) { author_id: authorId created_at: createdAt id kind payload prev_state: prevState seq signal_id: signalId } }' + x-stackql-protocol: graphql + parameters: + - name: name + in: query + required: true + schema: + type: string + - name: owner + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per SignalChange. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalChanges: + type: array + items: + $ref: '#/components/schemas/SignalChange' + /graphql/v2?__resource=signal_evaluations&__method=get: + post: + operationId: signal_evaluations_get + summary: Evaluate a signal against an evaluation context (pure resolution; does not mutate registry state) + description: Evaluate a signal against an evaluation context (pure resolution; does not mutate registry state). Backed by the Railway GraphQL query signalEvaluate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.signal_evaluations.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { signalEvaluate(context: {{ .context }} name: "{{ .name }}" {{ if .owner }}owner: "{{ .owner }}" {{ end }}) { reason trace value } }' + x-stackql-protocol: graphql + parameters: + - name: context + in: query + required: true + description: 'GraphQL value literal, for example {key: "value"}.' + schema: + type: string + - name: name + in: query + required: true + schema: + type: string + - name: owner + in: query + required: false + schema: + type: string + responses: + '200': + description: One SignalEvaluation row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalEvaluate: + $ref: '#/components/schemas/SignalEvaluation' + /graphql/v2?__resource=signals&__method=create: + post: + operationId: signals_create + summary: Register a new signal for an owner scope + description: Register a new signal for an owner scope. Backed by the Railway GraphQL mutation signalCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - default_ + - name + - owner + - type + properties: + default_: + type: object + name: + type: string + owner: + type: string + type: + type: string + enum: + - bool + - json + - number + - string + writable_by: + type: array + items: + type: string + responses: + '200': + description: The Signal the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalCreate: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=delete: + post: + operationId: signals_delete + summary: Delete a signal and its audit log + description: Delete a signal and its audit log. Backed by the Railway GraphQL mutation signalDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - owner + properties: + name: + type: string + owner: + type: string + responses: + '200': + description: The Signal the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalDelete: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=get: + post: + operationId: signals_get + summary: Fetch a single signal by owner scope and name + description: Fetch a single signal by owner scope and name. Backed by the Railway GraphQL query signal. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.signals.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { signal(name: "{{ .name }}" {{ if .owner }}owner: "{{ .owner }}" {{ end }}) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }' + x-stackql-protocol: graphql + parameters: + - name: name + in: query + required: true + schema: + type: string + - name: owner + in: query + required: false + schema: + type: string + responses: + '200': + description: One Signal row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signal: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=list: + post: + operationId: signals_list + summary: List signals registered for an owner scope + description: List signals registered for an owner scope. Backed by the Railway GraphQL query signals. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.platform.signals.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.signals[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { signals{{ if or .owner }}({{ if .owner }}owner: "{{ .owner }}" {{ end }}){{ end }} { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }' + x-stackql-protocol: graphql + parameters: + - name: owner + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per Signal. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signals: + type: array + items: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=replace: + post: + operationId: signals_replace + summary: Replace a signal's type and default, clearing all rules + description: Replace a signal's type and default, clearing all rules. Destructive — intended for CLI --force re-type. Backed by the Railway GraphQL mutation signalReplace. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - default_ + - name + - owner + - type + properties: + default_: + type: object + name: + type: string + owner: + type: string + type: + type: string + enum: + - bool + - json + - number + - string + responses: + '200': + description: The Signal the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalReplace: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=rollback: + post: + operationId: signals_rollback + summary: Restore a signal to the snapshot captured before a change (reads prevState from the target change row) + description: Restore a signal to the snapshot captured before a change (reads prevState from the target change row). Backed by the Railway GraphQL mutation signalRollback. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - owner + - seq + properties: + name: + type: string + owner: + type: string + seq: + type: string + responses: + '200': + description: The Signal the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalRollback: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=set_default: + post: + operationId: signals_set_default + summary: Change a signal's canonical default (production floor) + description: Change a signal's canonical default (production floor). Backed by the Railway GraphQL mutation signalDefaultSet. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - default_ + - name + - owner + properties: + default_: + type: object + name: + type: string + owner: + type: string + responses: + '200': + description: The Signal the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalDefaultSet: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=set_rule: + post: + operationId: signals_set_rule + summary: Attach or replace a rule on a signal + description: Attach or replace a rule on a signal. Matching rules must agree at resolution time or the default is returned. Backed by the Railway GraphQL mutation signalRuleSet. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - expression + - name + - owner + - rule_id + - value + properties: + expression: + type: object + name: + type: string + owner: + type: string + rule_id: + type: string + value: + type: object + responses: + '200': + description: The Signal the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalRuleSet: + $ref: '#/components/schemas/Signal' + /graphql/v2?__resource=signals&__method=unset_rule: + post: + operationId: signals_unset_rule + summary: Remove a rule from a signal + description: Remove a rule from a signal. Backed by the Railway GraphQL mutation signalRuleUnset. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - owner + - rule_id + properties: + name: + type: string + owner: + type: string + rule_id: + type: string + responses: + '200': + description: The Signal the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + signalRuleUnset: + $ref: '#/components/schemas/Signal' +components: + schemas: + PlatformFeatureFlagStatus: + type: object + properties: + flag: + type: string + enum: + - AGENT_USAGE_CH_INGEST + - ALERT_SUS_USERS_CRON_KILLSWITCH + - BUILDER_V4_ROLLOUT + - BUILD_DEPLOY_QUEUE_V2 + - CAC_T0_KILLSWITCH + - CANVAS_CROSS_ENV_GUARD_ENFORCE + - CHAT_SANDBOX + - CLICKHOUSE_WORKSPACE_LIMIT_ENFORCE + - CS_MCP + - CS_MCP_EXPRESS + - CTRD_IMAGE_STORE_ROLLOUT + - DEFAULT_USAGE_ALERTS + - DEMO_PERCENTAGE_ROLLOUT + - DEPLOYMENT_DIAGNOSIS_KILLSWITCH + - DEPLOY_SUPERSEDE_ON_PUSH + - DEV_STUDIO + - DEV_STUDIO_ANON_PROVISIONS + - DOMAIN_RECONCILE_KILLSWITCH + - EMAIL_FORWARDING_KILLSWITCH + - IN_DASHBOARD_SUPPORT + - KAFKA_EPHEMERAL_ENVIRONMENT_UPDATES + - LOGS_LONG_WINDOW_CHUNKING + - NEW_PROJECT_PAGE + - NEW_STRIPE_WEBHOOK_VERSION_ROLLOUT + - NUDGES + - NUDGE_BACKUP_SCHEDULE_MISSING + - NUDGE_FIRST_DEPLOY_FAILED + - NUDGE_PUBLIC_DB_URL_WITHIN_PROJECT + - NUDGE_RESUBSCRIBE_AFTER_DEAD_INVOICE + - NUDGE_UPGRADE_TO_PRO + - OAUTH_DCR_KILLSWITCH + - PRE_DEPLOY_TIMEOUT_KILLSWITCH + - PROJECT_HISTORY_DUAL_WRITE + - REMOVE_DEPLOYMENT_COMPACT + - SERVICEINSTANCE_DATALOADER_FOR_STATIC_URL + - SPLIT_USAGE_QUERIES + - SSH_ANON_PROVISIONING + - SSH_TRIAL_GUEST_IDLE_SLEEP + - STRIPE_INTERACTIVE_SUBSCRIPTION_ON_SESSION + - STRIPE_METERS_NEW_ACCOUNTS + - STRIPE_METERS_SHADOW_ENABLED + - STRIPE_WEBHOOK_DISPUTE_CANCELLATION + - UPDATED_VM_QUERIES + - USAGE_CH_READS + - VM_COUPON_MIGRATION + - VM_USAGE_CH_INGEST + - WORKSPACE_MCP_KILLSWITCH + rollout_percentage: + type: integer + status: + type: boolean + type: + type: string + enum: + - BOOLEAN + - PERCENTAGE + PlatformStatus: + type: object + properties: + incident: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + message: + type: string + status: + type: string + enum: + - IDENTIFIED + - INVESTIGATING + - MONITORING + - RESOLVED + url: + type: string + description: Incident object + is_stable: + type: boolean + maintenance: + type: object + properties: + id: + type: string + message: + type: string + start: + type: string + format: date-time + status: + type: string + enum: + - COMPLETED + - INPROGRESS + - NOTSTARTEDYET + url: + type: string + description: Maintenance object + PublicStats: + type: object + properties: + total_deployments_last_month: + type: integer + total_logs_last_month: + type: string + total_projects: + type: integer + total_requests_last_month: + type: string + total_services: + type: integer + total_users: + type: integer + Region: + type: object + properties: + country: + type: string + description: Region country + id: + type: string + description: Region ID (airport code) + location: + type: string + name: + type: string + region: + type: string + workspace_id: + type: string + Signal: + type: object + properties: + created_at: + type: string + format: date-time + created_by: + type: string + default_: + type: object + id: + type: string + name: + type: string + owner: + type: string + rules: + type: object + type: + type: string + enum: + - bool + - json + - number + - string + updated_at: + type: string + format: date-time + version: + type: string + writable_by: + type: array + items: + type: string + SignalChange: + type: object + properties: + author_id: + type: string + created_at: + type: string + format: date-time + id: + type: string + kind: + type: string + enum: + - default_changed + - replaced + - rollback + - set + - unset + payload: + type: object + prev_state: + type: object + seq: + type: string + signal_id: + type: string + SignalEvaluation: + type: object + properties: + reason: + type: string + enum: + - DEFAULT + - SPLIT + - TARGETING_MATCH + trace: + type: object + value: + type: object + x-stackQL-resources: + all_platform_feature_flags: + id: railway.platform.all_platform_feature_flags + name: all_platform_feature_flags + title: All Platform Feature Flags + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=all_platform_feature_flags&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.allPlatformFeatureFlags + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/all_platform_feature_flags/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + platform_status: + id: railway.platform.platform_status + name: platform_status + title: Platform Status + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=platform_status&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.platformStatus + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/platform_status/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + public_stats: + id: railway.platform.public_stats + name: public_stats + title: Public Stats + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=public_stats&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.publicStats + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/public_stats/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + regions: + id: railway.platform.regions + name: regions + title: Regions + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=regions&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.regions + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/regions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + signal_changes: + id: railway.platform.signal_changes + name: signal_changes + title: Signal Changes + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signal_changes&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.signalChanges + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/signal_changes/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + signal_evaluations: + id: railway.platform.signal_evaluations + name: signal_evaluations + title: Signal Evaluations + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signal_evaluations&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.signalEvaluate + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/signal_evaluations/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + signals: + id: railway.platform.signals + name: signals + title: Signals + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($default_: JSON!, $name: String!, $owner: String!, $type: SignalType!, $writable_by: [String!]) { signalCreate(input: { default: $default_, name: $name, owner: $owner, type: $type, writableBy: $writable_by }) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "default_" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"default_":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "type" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"type":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "writable_by" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"writable_by":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.signalCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String!, $owner: String!) { signalDelete(input: { name: $name, owner: $owner }) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.signalDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.signal + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.signals + x-stackql-protocol: graphql + replace: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=replace/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($default_: JSON!, $name: String!, $owner: String!, $type: SignalType!) { signalReplace(input: { default: $default_, name: $name, owner: $owner, type: $type }) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "default_" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"default_":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "type" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"type":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.signalReplace + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + rollback: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=rollback/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String!, $owner: String!, $seq: BigInt!) { signalRollback(input: { name: $name, owner: $owner, seq: $seq }) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "seq" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"seq":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.signalRollback + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + set_default: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=set_default/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($default_: JSON!, $name: String!, $owner: String!) { signalDefaultSet(input: { default: $default_, name: $name, owner: $owner }) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "default_" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"default_":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.signalDefaultSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + set_rule: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=set_rule/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($expression: JSON!, $name: String!, $owner: String!, $rule_id: String!, $value: JSON!) { signalRuleSet(input: { expression: $expression, name: $name, owner: $owner, ruleId: $rule_id, value: $value }) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "expression" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"expression":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "rule_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"rule_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "value" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"value":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.signalRuleSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + unset_rule: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=signals&__method=unset_rule/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String!, $owner: String!, $rule_id: String!) { signalRuleUnset(input: { name: $name, owner: $owner, ruleId: $rule_id }) { created_at: createdAt created_by: createdBy default_: default id name owner rules type updated_at: updatedAt version writable_by: writableBy } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "rule_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"rule_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.signalRuleUnset + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/signals/methods/get' + - $ref: '#/components/x-stackQL-resources/signals/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/signals/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/signals/methods/delete' + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/projects.yaml b/providers/src/railway/v00.00.00000/services/projects.yaml new file mode 100644 index 00000000..c133fcab --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/projects.yaml @@ -0,0 +1,3213 @@ +openapi: 3.0.3 +info: + title: Projects API + description: Projects and their lifecycle, members, invitations, invite codes, project tokens, permissions, canvas groups and compliance. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=invite_codes&__method=get: + post: + operationId: invite_codes_get + summary: Get an invite code by the code + description: Get an invite code by the code. Backed by the Railway GraphQL query inviteCode. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.invite_codes.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { inviteCode(code: "{{ .code }}") { code created_at: createdAt id project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId role } }' + x-stackql-protocol: graphql + parameters: + - name: code + in: query + required: true + schema: + type: string + responses: + '200': + description: One InviteCode row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + inviteCode: + $ref: '#/components/schemas/InviteCode' + /graphql/v2?__resource=invite_codes&__method=use: + post: + operationId: invite_codes_use + summary: Join a project using an invite code + description: Join a project using an invite code. Backed by the Railway GraphQL mutation inviteCodeUse. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + properties: + code: + type: string + responses: + '200': + description: The Project the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + inviteCodeUse: + $ref: '#/components/schemas/Project' + /graphql/v2?__resource=project_compliance&__method=get: + post: + operationId: project_compliance_get + summary: Get comprehensive compliance information for a project including 2FA status, member permissions, backup schedules, and compliance agreements + description: Get comprehensive compliance information for a project including 2FA status, member permissions, backup schedules, and compliance agreements. Requires workspace API token with admin access. Backed by the Railway GraphQL query projectCompliance. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_compliance.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectCompliance(projectId: "{{ .project_id }}") { member_permissions: memberPermissions { email name role } project_id: projectId project_name: projectName service_backups: serviceBackups { schedules service_id: serviceId service_name: serviceName } two_factor_members: twoFactorMembers { email enabled_methods: enabledMethods name two_factor_auth_enabled: twoFactorAuthEnabled } workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One ProjectComplianceInfo row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectCompliance: + $ref: '#/components/schemas/ProjectComplianceInfo' + /graphql/v2?__resource=project_favorites&__method=list: + post: + operationId: project_favorites_list + summary: The authenticated user's favorited project ids in a workspace, in the order the Favorites row should render them + description: The authenticated user's favorited project ids in a workspace, in the order the Favorites row should render them. Defaults to the order they were starred in. Backed by the Railway GraphQL query projectFavorites. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_favorites.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projectFavorites[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectFavorites({{ if .order_by }}orderBy: {{ .order_by }} {{ end }}workspaceId: "{{ .workspace_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: order_by + in: query + required: false + schema: + type: string + enum: + - CREATED_AT_DESC + - NAME_ASC + - UPDATED_AT_DESC + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per value, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectFavorites: + type: array + items: + $ref: '#/components/schemas/ProjectFavoritesResult' + /graphql/v2?__resource=project_favorites&__method=set: + post: + operationId: project_favorites_set + summary: Star or unstar a project for the authenticated user + description: Star or unstar a project for the authenticated user. Returns the resulting state. Backed by the Railway GraphQL mutation projectFavoriteSet. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - favorite + - project_id + properties: + favorite: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectFavoriteSet: + $ref: '#/components/schemas/ProjectFavoriteSetResult' + /graphql/v2?__resource=project_groups&__method=list: + post: + operationId: project_groups_list + summary: Lists Group objects of a Project + description: Lists Group objects of a Project. Backed by the Railway GraphQL query project.groups. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_groups.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.project.groups.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.project.groups.pageInfo.endCursor + terminateOnJsonPath: $.data.project.groups.pageInfo.hasNextPage + query: 'query { project(id: "{{ .project_id }}") { groups(first: 100{{ .cursor }}) { edges { node { color group_id: groupId icon id is_collapsed: isCollapsed name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Group. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + project: + type: object + properties: + groups: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Group' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=project_invitations&__method=accept: + post: + operationId: project_invitations_accept + summary: Accept a project invitation using the invite code + description: Accept a project invitation using the invite code. Backed by the Railway GraphQL mutation projectInvitationAccept. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + properties: + code: + type: string + responses: + '200': + description: The ProjectPermission the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectInvitationAccept: + $ref: '#/components/schemas/ProjectPermission' + /graphql/v2?__resource=project_invitations&__method=create: + post: + operationId: project_invitations_create + summary: Create an invitation for a project + description: Create an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - email + - role + properties: + id: + type: string + email: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + responses: + '200': + description: The ProjectInvitation the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectInvitationCreate: + $ref: '#/components/schemas/ProjectInvitation' + /graphql/v2?__resource=project_invitations&__method=delete: + post: + operationId: project_invitations_delete + summary: Delete an invitation for a project + description: Delete an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectInvitationDelete: + $ref: '#/components/schemas/ProjectInvitationDeleteResult' + /graphql/v2?__resource=project_invitations&__method=list: + post: + operationId: project_invitations_list + summary: Get invitations for a project + description: Get invitations for a project. Backed by the Railway GraphQL query projectInvitations. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_invitations.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projectInvitations[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectInvitations(id: "{{ .id }}") { email expires_at: expiresAt id inviter { email name } is_expired: isExpired project { id name } } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ProjectInvitation. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectInvitations: + type: array + items: + $ref: '#/components/schemas/ProjectInvitation' + /graphql/v2?__resource=project_invitations&__method=resend: + post: + operationId: project_invitations_resend + summary: Resend an invitation for a project + description: Resend an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationResend. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The ProjectInvitation the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectInvitationResend: + $ref: '#/components/schemas/ProjectInvitation' + /graphql/v2?__resource=project_invite_codes&__method=get: + post: + operationId: project_invite_codes_get + summary: Get an invite code for a project for a specifc role + description: Get an invite code for a project for a specifc role. Backed by the Railway GraphQL query projectInviteCode. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_invite_codes.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectInviteCode(projectId: "{{ .project_id }}" role: {{ .role }}) { code created_at: createdAt id project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId role } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + - name: role + in: query + required: true + schema: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + responses: + '200': + description: One InviteCode row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectInviteCode: + $ref: '#/components/schemas/InviteCode' + /graphql/v2?__resource=project_members&__method=add: + post: + operationId: project_members_add + summary: Add a workspace member to a project with a specific role + description: Add a workspace member to a project with a specific role. The user must already be a member of the project's workspace. Backed by the Railway GraphQL mutation projectMemberAdd. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + - role + - user_id + properties: + project_id: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + user_id: + type: string + responses: + '200': + description: The ProjectMember the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectMemberAdd: + $ref: '#/components/schemas/ProjectMember' + /graphql/v2?__resource=project_members&__method=list: + post: + operationId: project_members_list + summary: Gets users who belong to a project along with their role + description: Gets users who belong to a project along with their role. Backed by the Railway GraphQL query projectMembers. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_members.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projectMembers[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectMembers(projectId: "{{ .project_id }}") { avatar email id name role } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ProjectMember. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectMembers: + type: array + items: + $ref: '#/components/schemas/ProjectMember' + /graphql/v2?__resource=project_members&__method=remove: + post: + operationId: project_members_remove + summary: Remove user from a project + description: Remove user from a project. Backed by the Railway GraphQL mutation projectMemberRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + - user_id + properties: + project_id: + type: string + user_id: + type: string + responses: + '200': + description: The ProjectMember objects the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectMemberRemove: + type: array + items: + $ref: '#/components/schemas/ProjectMember' + /graphql/v2?__resource=project_members&__method=update: + post: + operationId: project_members_update + summary: Change the role for a user within a project + description: Change the role for a user within a project. Backed by the Railway GraphQL mutation projectMemberUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + - role + - user_id + properties: + project_id: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + user_id: + type: string + responses: + '200': + description: The ProjectMember the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectMemberUpdate: + $ref: '#/components/schemas/ProjectMember' + /graphql/v2?__resource=project_permissions&__method=list: + post: + operationId: project_permissions_list + summary: Lists ProjectPermission objects of a Project + description: Lists ProjectPermission objects of a Project. Backed by the Railway GraphQL query project.projectPermissions. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_permissions.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.project.projectPermissions.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.project.projectPermissions.pageInfo.endCursor + terminateOnJsonPath: $.data.project.projectPermissions.pageInfo.hasNextPage + query: 'query { project(id: "{{ .project_id }}") { projectPermissions(first: 100{{ .cursor }}) { edges { node { id project_id: projectId role user_id: userId } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ProjectPermission. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + project: + type: object + properties: + projectPermissions: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/ProjectPermission' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=project_resource_access&__method=get: + post: + operationId: project_resource_access_get + summary: Get resource access rules for project-specific actions + description: Get resource access rules for project-specific actions. Backed by the Railway GraphQL query projectResourceAccess. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_resource_access.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectResourceAccess(projectId: "{{ .project_id }}") { custom_domain: customDomain { disallowed } database_deployment: databaseDeployment { disallowed } deployment { disallowed } environment { disallowed } sandbox { disallowed } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One ProjectResourceAccess row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectResourceAccess: + $ref: '#/components/schemas/ProjectResourceAccess' + /graphql/v2?__resource=project_tokens&__method=create: + post: + operationId: project_tokens_create + summary: Create a token for a project that has access to a specific environment + description: Create a token for a project that has access to a specific environment. Backed by the Railway GraphQL mutation projectTokenCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - name + - project_id + properties: + environment_id: + type: string + name: + type: string + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectTokenCreate: + $ref: '#/components/schemas/ProjectTokenCreateResult' + /graphql/v2?__resource=project_tokens&__method=delete: + post: + operationId: project_tokens_delete + summary: Delete a project token + description: Delete a project token. Backed by the Railway GraphQL mutation projectTokenDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectTokenDelete: + $ref: '#/components/schemas/ProjectTokenDeleteResult' + /graphql/v2?__resource=project_tokens&__method=list: + post: + operationId: project_tokens_list + summary: Get all project tokens for a project + description: Get all project tokens for a project. Backed by the Railway GraphQL query projectTokens. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_tokens.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projectTokens.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.projectTokens.pageInfo.endCursor + terminateOnJsonPath: $.data.projectTokens.pageInfo.hasNextPage + query: 'query { projectTokens(first: 100{{ .cursor }} projectId: "{{ .project_id }}") { edges { node { created_at: createdAt display_token: displayToken environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ProjectToken. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectTokens: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/ProjectToken' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=project_workspace_members&__method=list: + post: + operationId: project_workspace_members_list + summary: Get workspace members for a project with 2FA details + description: Get workspace members for a project with 2FA details. Backed by the Railway GraphQL query projectWorkspaceMembers. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.project_workspace_members.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projectWorkspaceMembers.members[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectWorkspaceMembers(projectId: "{{ .project_id }}") { members { email enabled_methods: enabledMethods name two_factor_auth_enabled: twoFactorAuthEnabled } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per ProjectWorkspaceMember. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectWorkspaceMembers: + type: object + properties: + members: + type: array + items: + $ref: '#/components/schemas/ProjectWorkspaceMember' + /graphql/v2?__resource=projects&__method=add_feature_flag: + post: + operationId: projects_add_feature_flag + summary: Add a feature flag for a project + description: Add a feature flag for a project. Backed by the Railway GraphQL mutation projectFeatureFlagAdd. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flag + - project_id + properties: + flag: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectFeatureFlagAdd: + $ref: '#/components/schemas/ProjectFeatureFlagAddResult' + /graphql/v2?__resource=projects&__method=claim: + post: + operationId: projects_claim + summary: Claims a project + description: Claims a project. Backed by the Railway GraphQL mutation projectClaim. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - workspace_id + properties: + id: + type: string + workspace_id: + type: string + responses: + '200': + description: The Project the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectClaim: + $ref: '#/components/schemas/Project' + /graphql/v2?__resource=projects&__method=create: + post: + operationId: projects_create + summary: Creates a new project + description: Creates a new project. Backed by the Railway GraphQL mutation projectCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + default_environment_name: + type: string + description: + type: string + is_monorepo: + type: boolean + is_public: + type: boolean + name: + type: string + pr_deploys: + type: boolean + repo: + type: object + description: JSON object of GraphQL type ProjectCreateRepo; keys keep the API's camelCase names. + runtime: + type: string + enum: + - LEGACY + - UNSPECIFIED + - V2 + workspace_id: + type: string + responses: + '200': + description: The Project the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectCreate: + $ref: '#/components/schemas/Project' + /graphql/v2?__resource=projects&__method=delete: + post: + operationId: projects_delete + summary: Deletes a project + description: Deletes a project. Backed by the Railway GraphQL mutation projectDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectDelete: + $ref: '#/components/schemas/ProjectDeleteResult' + /graphql/v2?__resource=projects&__method=get: + post: + operationId: projects_get + summary: Get a project by ID + description: Get a project by ID. Backed by the Railway GraphQL query project. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.projects.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { project(id: "{{ .id }}") { base_environment: baseEnvironment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One Project row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + project: + $ref: '#/components/schemas/Project' + /graphql/v2?__resource=projects&__method=invite_user: + post: + operationId: projects_invite_user + summary: Invite a user by email to a project + description: Invite a user by email to a project. Backed by the Railway GraphQL mutation projectInviteUser. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - email + - link + properties: + id: + type: string + email: + type: string + link: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectInviteUser: + $ref: '#/components/schemas/ProjectInviteUserResult' + /graphql/v2?__resource=projects&__method=leave: + post: + operationId: projects_leave + summary: Leave project as currently authenticated user + description: Leave project as currently authenticated user. Backed by the Railway GraphQL mutation projectLeave. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectLeave: + $ref: '#/components/schemas/ProjectLeaveResult' + /graphql/v2?__resource=projects&__method=list: + post: + operationId: projects_list + summary: Gets all projects for a user or workspace + description: Gets all projects for a user or workspace. Backed by the Railway GraphQL query projects. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.projects.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projects.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.projects.pageInfo.endCursor + terminateOnJsonPath: $.data.projects.pageInfo.hasNextPage + query: 'query { projects(first: 100{{ .cursor }} {{ if .include_deleted }}includeDeleted: {{ .include_deleted }} {{ end }}{{ if .order_by }}orderBy: {{ .order_by }} {{ end }}{{ if .user_id }}userId: "{{ .user_id }}" {{ end }}{{ if .workspace_id }}workspaceId: "{{ .workspace_id }}" {{ end }}) { edges { node { base_environment: baseEnvironment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: include_deleted + in: query + required: false + schema: + type: boolean + - name: order_by + in: query + required: false + schema: + type: string + enum: + - CREATED_AT_DESC + - NAME_ASC + - UPDATED_AT_DESC + - name: user_id + in: query + required: false + schema: + type: string + - name: workspace_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per Project. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projects: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Project' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=projects&__method=list_by_ids: + post: + operationId: projects_list_by_ids + summary: Fetch multiple projects by id + description: Fetch multiple projects by id. Skips ids the caller cannot access (does not throw on partial denial). Intended for batched dashboard hydration of a small viewport-sized set of cards. Backed by the Railway GraphQL query projectsByIds. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.projects.list_by_ids + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.projectsByIds[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { projectsByIds(ids: {{ .ids }}) { base_environment: baseEnvironment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: ids + in: query + required: true + description: GraphQL list literal, for example ["a", "b"]. + schema: + type: string + responses: + '200': + description: One row per Project. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectsByIds: + type: array + items: + $ref: '#/components/schemas/Project' + /graphql/v2?__resource=projects&__method=override_base_environment: + post: + operationId: projects_override_base_environment + summary: Sets the base environment override for a deployment trigger + description: Sets the base environment override for a deployment trigger. Backed by the Railway GraphQL mutation baseEnvironmentOverride. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + base_environment_override_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + baseEnvironmentOverride: + $ref: '#/components/schemas/BaseEnvironmentOverrideResult' + /graphql/v2?__resource=projects&__method=remove_feature_flag: + post: + operationId: projects_remove_feature_flag + summary: Remove a feature flag for a project + description: Remove a feature flag for a project. Backed by the Railway GraphQL mutation projectFeatureFlagRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flag + - project_id + properties: + flag: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectFeatureFlagRemove: + $ref: '#/components/schemas/ProjectFeatureFlagRemoveResult' + /graphql/v2?__resource=projects&__method=schedule_delete: + post: + operationId: projects_schedule_delete + summary: Deletes a project with a 48 hour grace period + description: Deletes a project with a 48 hour grace period. Backed by the Railway GraphQL mutation projectScheduleDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectScheduleDelete: + $ref: '#/components/schemas/ProjectScheduleDeleteResult' + /graphql/v2?__resource=projects&__method=schedule_delete_cancel: + post: + operationId: projects_schedule_delete_cancel + summary: Cancel scheduled deletion of a project + description: Cancel scheduled deletion of a project. Backed by the Railway GraphQL mutation projectScheduleDeleteCancel. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectScheduleDeleteCancel: + $ref: '#/components/schemas/ProjectScheduleDeleteCancelResult' + /graphql/v2?__resource=projects&__method=schedule_delete_force: + post: + operationId: projects_schedule_delete_force + summary: Force delete a scheduled deletion of a project (skips the grace period) + description: Force delete a scheduled deletion of a project (skips the grace period). Backed by the Railway GraphQL mutation projectScheduleDeleteForce. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectScheduleDeleteForce: + $ref: '#/components/schemas/ProjectScheduleDeleteForceResult' + /graphql/v2?__resource=projects&__method=transfer: + post: + operationId: projects_transfer + summary: Transfer a project to a workspace + description: Transfer a project to a workspace. Backed by the Railway GraphQL mutation projectTransfer. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - workspace_id + - project_id + properties: + workspace_id: + type: string + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectTransfer: + $ref: '#/components/schemas/ProjectTransferResult' + /graphql/v2?__resource=projects&__method=transfer_confirm: + post: + operationId: projects_transfer_confirm + summary: Confirm the transfer of project ownership + description: Confirm the transfer of project ownership. Backed by the Railway GraphQL mutation projectTransferConfirm. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - ownership_transfer_id + - project_id + properties: + destination_workspace_id: + type: string + ownership_transfer_id: + type: string + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectTransferConfirm: + $ref: '#/components/schemas/ProjectTransferConfirmResult' + /graphql/v2?__resource=projects&__method=transfer_initiate: + post: + operationId: projects_transfer_initiate + summary: Initiate the transfer of project ownership + description: Initiate the transfer of project ownership. Backed by the Railway GraphQL mutation projectTransferInitiate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - member_id + - project_id + properties: + member_id: + type: string + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectTransferInitiate: + $ref: '#/components/schemas/ProjectTransferInitiateResult' + /graphql/v2?__resource=projects&__method=update: + post: + operationId: projects_update + summary: Updates a project + description: Updates a project. Backed by the Railway GraphQL mutation projectUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + base_environment_id: + type: string + bot_pr_environments: + type: boolean + description: Enable/disable pull request environments for PRs created by bots. + description: + type: string + focused_pr_environments: + type: boolean + description: Enable focused PR environments that only deploy services affected by changed files. + is_public: + type: boolean + name: + type: string + pr_deploys: + type: boolean + tracing_enabled: + type: boolean + description: 'Trace the project''s services by default: the edge records a span for each sampled request to their domains, and the next deploy configures each app''s OpenTelemetry SDK to export to Railway. A service''s own tracingEnabled overrides this.' + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1, for every traced service in the project. Null resets to Railway's default. + responses: + '200': + description: The Project the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + projectUpdate: + $ref: '#/components/schemas/Project' + /graphql/v2?__resource=resource_access&__method=get: + post: + operationId: resource_access_get + summary: Get resource access for the current user or workspace + description: Get resource access for the current user or workspace. Backed by the Railway GraphQL query resourceAccess. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.projects.resource_access.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { resourceAccess(explicitResourceOwner: { id: "{{ .id }}" {{ if .type }}type: {{ .type }} {{ end }}}) { deployment { disallowed } project { disallowed } } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + description: The ID of the owner. + schema: + type: string + - name: type + in: query + required: false + description: The type of owner. + schema: + type: string + enum: + - WORKSPACE + responses: + '200': + description: One ResourceAccess row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + resourceAccess: + $ref: '#/components/schemas/ResourceAccess' +components: + schemas: + BaseEnvironmentOverrideResult: + type: object + properties: + result: + type: boolean + description: Value returned by the baseEnvironmentOverride mutation (Boolean!) + Group: + type: object + properties: + color: + type: string + group_id: + type: string + icon: + type: string + id: + type: string + is_collapsed: + type: boolean + name: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + InviteCode: + type: object + properties: + code: + type: string + created_at: + type: string + format: date-time + id: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + Project: + type: object + properties: + base_environment: + type: object + properties: + can_access: + type: boolean + config_etag: + type: string + description: Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + id: + type: string + is_ephemeral: + type: boolean + name: + type: string + project_id: + type: string + unmerged_changes_count: + type: integer + updated_at: + type: string + format: date-time + description: Environment object + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + ProjectComplianceInfo: + type: object + properties: + member_permissions: + type: array + items: + type: object + properties: + email: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Permissions for each project member + project_id: + type: string + project_name: + type: string + service_backups: + type: array + items: + type: object + properties: + schedules: + type: array + items: + type: string + enum: + - DAILY + - MONTHLY + - WEEKLY + description: List of enabled backup schedule kinds (DAILY, WEEKLY, MONTHLY) + service_id: + type: string + service_name: + type: string + description: Backup schedules for database services + two_factor_members: + type: array + items: + type: object + properties: + email: + type: string + enabled_methods: + type: array + items: + type: string + enum: + - AUTHENTICATOR + - PASSKEY + description: List of enabled 2FA methods (AUTHENTICATOR, PASSKEY) + name: + type: string + two_factor_auth_enabled: + type: boolean + description: 2FA status for each project member + workspace_id: + type: string + ProjectDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectDelete mutation (Boolean!) + ProjectFavoriteSetResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectFavoriteSet mutation (Boolean!) + ProjectFavoritesResult: + type: object + properties: + result: + type: string + description: projectFavorites value + ProjectFeatureFlagAddResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectFeatureFlagAdd mutation (Boolean!) + ProjectFeatureFlagRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectFeatureFlagRemove mutation (Boolean!) + ProjectInvitation: + type: object + properties: + email: + type: string + expires_at: + type: string + format: date-time + id: + type: string + inviter: + type: object + properties: + email: + type: string + name: + type: string + description: ProjectInvitationInviter object + is_expired: + type: boolean + project: + type: object + properties: + id: + type: string + name: + type: string + description: PublicProjectInformation object + ProjectInvitationDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectInvitationDelete mutation (Boolean!) + ProjectInviteUserResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectInviteUser mutation (Boolean!) + ProjectLeaveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectLeave mutation (Boolean!) + ProjectMember: + type: object + properties: + avatar: + type: string + email: + type: string + id: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + ProjectPermission: + type: object + properties: + id: + type: string + project_id: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + user_id: + type: string + ProjectResourceAccess: + type: object + properties: + custom_domain: + type: object + properties: + disallowed: + type: string + description: AccessRule object + database_deployment: + type: object + properties: + disallowed: + type: string + description: AccessRule object + deployment: + type: object + properties: + disallowed: + type: string + description: AccessRule object + environment: + type: object + properties: + disallowed: + type: string + description: AccessRule object + sandbox: + type: object + properties: + disallowed: + type: string + description: AccessRule object + ProjectScheduleDeleteCancelResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectScheduleDeleteCancel mutation (Boolean!) + ProjectScheduleDeleteForceResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectScheduleDeleteForce mutation (Boolean!) + ProjectScheduleDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectScheduleDelete mutation (Boolean!) + ProjectToken: + type: object + properties: + created_at: + type: string + format: date-time + display_token: + type: string + environment: + type: object + properties: + can_access: + type: boolean + config_etag: + type: string + description: Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + id: + type: string + is_ephemeral: + type: boolean + name: + type: string + project_id: + type: string + unmerged_changes_count: + type: integer + updated_at: + type: string + format: date-time + description: Environment object + environment_id: + type: string + id: + type: string + name: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + ProjectTokenCreateResult: + type: object + properties: + result: + type: string + description: Value returned by the projectTokenCreate mutation (String!) + ProjectTokenDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectTokenDelete mutation (Boolean!) + ProjectTransferConfirmResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectTransferConfirm mutation (Boolean!) + ProjectTransferInitiateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectTransferInitiate mutation (Boolean!) + ProjectTransferResult: + type: object + properties: + result: + type: boolean + description: Value returned by the projectTransfer mutation (Boolean!) + ProjectWorkspaceMember: + type: object + properties: + email: + type: string + enabled_methods: + type: array + items: + type: string + enum: + - AUTHENTICATOR + - PASSKEY + description: List of enabled 2FA methods (AUTHENTICATOR, PASSKEY) + name: + type: string + two_factor_auth_enabled: + type: boolean + ResourceAccess: + type: object + properties: + deployment: + type: object + properties: + disallowed: + type: string + description: AccessRule object + project: + type: object + properties: + disallowed: + type: string + description: AccessRule object + x-stackQL-resources: + invite_codes: + id: railway.projects.invite_codes + name: invite_codes + title: Invite Codes + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=invite_codes&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.inviteCode + x-stackql-protocol: graphql + use: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=invite_codes&__method=use/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($code: String!) { inviteCodeUse(code: $code) { base_environment: baseEnvironment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "code" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"code":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.inviteCodeUse + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/invite_codes/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + project_compliance: + id: railway.projects.project_compliance + name: project_compliance + title: Project Compliance + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_compliance&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectCompliance + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_compliance/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + project_favorites: + id: railway.projects.project_favorites + name: project_favorites + title: Project Favorites + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_favorites&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectFavorites + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"projectFavorites":[{{- $s := separator "," -}}{{- range $v := index (index . "data") "projectFavorites" -}}{{ call $s }}{"result":{{ toJson $v }}}{{- end -}}]}}' + x-stackql-protocol: graphql + set: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_favorites&__method=set/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($favorite: Boolean!, $project_id: String!) { projectFavoriteSet(favorite: $favorite, projectId: $project_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "favorite" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"favorite":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectFavoriteSet + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectFavoriteSet":{"result":{{ toJson (index (index . "data") "projectFavoriteSet") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_favorites/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + project_groups: + id: railway.projects.project_groups + name: project_groups + title: Project Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_groups&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.project.groups.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "project" "groups" -}}{"data":{"project":{"groups":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + project_invitations: + id: railway.projects.project_invitations + name: project_invitations + title: Project Invitations + methods: + accept: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_invitations&__method=accept/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($code: String!) { projectInvitationAccept(code: $code) { id project_id: projectId role user_id: userId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "code" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"code":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectInvitationAccept + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_invitations&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $email: String!, $role: ProjectRole!) { projectInvitationCreate(id: $id, input: { email: $email, role: $role }) { email expires_at: expiresAt id inviter { email name } is_expired: isExpired project { id name } } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"email":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectInvitationCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_invitations&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectInvitationDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectInvitationDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectInvitationDelete":{"result":{{ toJson (index (index . "data") "projectInvitationDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_invitations&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectInvitations + x-stackql-protocol: graphql + resend: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_invitations&__method=resend/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectInvitationResend(id: $id) { email expires_at: expiresAt id inviter { email name } is_expired: isExpired project { id name } } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectInvitationResend + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_invitations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/project_invitations/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/project_invitations/methods/delete' + replace: [] + project_invite_codes: + id: railway.projects.project_invite_codes + name: project_invite_codes + title: Project Invite Codes + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_invite_codes&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectInviteCode + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_invite_codes/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + project_members: + id: railway.projects.project_members + name: project_members + title: Project Members + methods: + add: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_members&__method=add/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($project_id: String!, $role: ProjectRole!, $user_id: String!) { projectMemberAdd(input: { projectId: $project_id, role: $role, userId: $user_id }) { avatar email id name role } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectMemberAdd + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_members&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectMembers + x-stackql-protocol: graphql + remove: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_members&__method=remove/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($project_id: String!, $user_id: String!) { projectMemberRemove(input: { projectId: $project_id, userId: $user_id }) { avatar email id name role } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectMemberRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_members&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($project_id: String!, $role: ProjectRole!, $user_id: String!) { projectMemberUpdate(input: { projectId: $project_id, role: $role, userId: $user_id }) { avatar email id name role } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectMemberUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_members/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/project_members/methods/add' + update: + - $ref: '#/components/x-stackQL-resources/project_members/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/project_members/methods/remove' + replace: [] + project_permissions: + id: railway.projects.project_permissions + name: project_permissions + title: Project Permissions + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_permissions&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.project.projectPermissions.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "project" "projectPermissions" -}}{"data":{"project":{"projectPermissions":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_permissions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + project_resource_access: + id: railway.projects.project_resource_access + name: project_resource_access + title: Project Resource Access + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_resource_access&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectResourceAccess + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_resource_access/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + project_tokens: + id: railway.projects.project_tokens + name: project_tokens + title: Project Tokens + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_tokens&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $name: String!, $project_id: String!) { projectTokenCreate(input: { environmentId: $environment_id, name: $name, projectId: $project_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectTokenCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectTokenCreate":{"result":{{ toJson (index (index . "data") "projectTokenCreate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_tokens&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectTokenDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectTokenDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectTokenDelete":{"result":{{ toJson (index (index . "data") "projectTokenDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_tokens&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectTokens.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "projectTokens" -}}{"data":{"projectTokens":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_tokens/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/project_tokens/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/project_tokens/methods/delete' + replace: [] + project_workspace_members: + id: railway.projects.project_workspace_members + name: project_workspace_members + title: Project Workspace Members + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=project_workspace_members&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectWorkspaceMembers.members + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_workspace_members/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + projects: + id: railway.projects.projects + name: projects + title: Projects + methods: + add_feature_flag: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=add_feature_flag/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flag: ActiveProjectFeatureFlag!, $project_id: String!) { projectFeatureFlagAdd(input: { flag: $flag, projectId: $project_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectFeatureFlagAdd + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectFeatureFlagAdd":{"result":{{ toJson (index (index . "data") "projectFeatureFlagAdd") }}}}}{{- end -}}' + x-stackql-protocol: graphql + claim: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=claim/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $workspace_id: String!) { projectClaim(id: $id, workspaceId: $workspace_id) { base_environment: baseEnvironment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectClaim + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($default_environment_name: String, $description: String, $is_monorepo: Boolean, $is_public: Boolean, $name: String, $pr_deploys: Boolean, $repo: ProjectCreateRepo, $runtime: PublicRuntime, $workspace_id: String) { projectCreate(input: { defaultEnvironmentName: $default_environment_name, description: $description, isMonorepo: $is_monorepo, isPublic: $is_public, name: $name, prDeploys: $pr_deploys, repo: $repo, runtime: $runtime, workspaceId: $workspace_id }) { base_environment: baseEnvironment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "default_environment_name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"default_environment_name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "description" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"description":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "is_monorepo" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"is_monorepo":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "is_public" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"is_public":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "pr_deploys" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"pr_deploys":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "repo" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"repo":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "runtime" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"runtime":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectDelete":{"result":{{ toJson (index (index . "data") "projectDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.project + x-stackql-protocol: graphql + invite_user: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=invite_user/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $email: String!, $link: String!) { projectInviteUser(id: $id, input: { email: $email, link: $link }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"email":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "link" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"link":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectInviteUser + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectInviteUser":{"result":{{ toJson (index (index . "data") "projectInviteUser") }}}}}{{- end -}}' + x-stackql-protocol: graphql + leave: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=leave/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectLeave(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectLeave + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectLeave":{"result":{{ toJson (index (index . "data") "projectLeave") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projects.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "projects" -}}{"data":{"projects":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + list_by_ids: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=list_by_ids/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.projectsByIds + x-stackql-protocol: graphql + override_base_environment: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=override_base_environment/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $base_environment_override_id: String) { baseEnvironmentOverride(id: $id, input: { baseEnvironmentOverrideId: $base_environment_override_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "base_environment_override_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"base_environment_override_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.baseEnvironmentOverride + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"baseEnvironmentOverride":{"result":{{ toJson (index (index . "data") "baseEnvironmentOverride") }}}}}{{- end -}}' + x-stackql-protocol: graphql + remove_feature_flag: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=remove_feature_flag/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flag: ActiveProjectFeatureFlag!, $project_id: String!) { projectFeatureFlagRemove(input: { flag: $flag, projectId: $project_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectFeatureFlagRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectFeatureFlagRemove":{"result":{{ toJson (index (index . "data") "projectFeatureFlagRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + schedule_delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=schedule_delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectScheduleDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectScheduleDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectScheduleDelete":{"result":{{ toJson (index (index . "data") "projectScheduleDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + schedule_delete_cancel: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=schedule_delete_cancel/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectScheduleDeleteCancel(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectScheduleDeleteCancel + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectScheduleDeleteCancel":{"result":{{ toJson (index (index . "data") "projectScheduleDeleteCancel") }}}}}{{- end -}}' + x-stackql-protocol: graphql + schedule_delete_force: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=schedule_delete_force/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { projectScheduleDeleteForce(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectScheduleDeleteForce + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectScheduleDeleteForce":{"result":{{ toJson (index (index . "data") "projectScheduleDeleteForce") }}}}}{{- end -}}' + x-stackql-protocol: graphql + transfer: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=transfer/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($workspace_id: String!, $project_id: String!) { projectTransfer(input: { workspaceId: $workspace_id }, projectId: $project_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectTransfer + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectTransfer":{"result":{{ toJson (index (index . "data") "projectTransfer") }}}}}{{- end -}}' + x-stackql-protocol: graphql + transfer_confirm: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=transfer_confirm/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($destination_workspace_id: String, $ownership_transfer_id: String!, $project_id: String!) { projectTransferConfirm(input: { destinationWorkspaceId: $destination_workspace_id, ownershipTransferId: $ownership_transfer_id, projectId: $project_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "destination_workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"destination_workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "ownership_transfer_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ownership_transfer_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectTransferConfirm + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectTransferConfirm":{"result":{{ toJson (index (index . "data") "projectTransferConfirm") }}}}}{{- end -}}' + x-stackql-protocol: graphql + transfer_initiate: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=transfer_initiate/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($member_id: String!, $project_id: String!) { projectTransferInitiate(input: { memberId: $member_id, projectId: $project_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "member_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"member_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectTransferInitiate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"projectTransferInitiate":{"result":{{ toJson (index (index . "data") "projectTransferInitiate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=projects&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $base_environment_id: String, $bot_pr_environments: Boolean, $description: String, $focused_pr_environments: Boolean, $is_public: Boolean, $name: String, $pr_deploys: Boolean, $tracing_enabled: Boolean, $tracing_sample_rate: Float) { projectUpdate(id: $id, input: { baseEnvironmentId: $base_environment_id, botPrEnvironments: $bot_pr_environments, description: $description, focusedPrEnvironments: $focused_pr_environments, isPublic: $is_public, name: $name, prDeploys: $pr_deploys, tracingEnabled: $tracing_enabled, tracingSampleRate: $tracing_sample_rate }) { base_environment: baseEnvironment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "base_environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"base_environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "bot_pr_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"bot_pr_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "description" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"description":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "focused_pr_environments" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"focused_pr_environments":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "is_public" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"is_public":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "pr_deploys" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"pr_deploys":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "tracing_enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"tracing_enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "tracing_sample_rate" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"tracing_sample_rate":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.projectUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/projects/methods/get' + - $ref: '#/components/x-stackQL-resources/projects/methods/list_by_ids' + - $ref: '#/components/x-stackQL-resources/projects/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/projects/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/projects/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/projects/methods/delete' + replace: [] + resource_access: + id: railway.projects.resource_access + name: resource_access + title: Resource Access + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=resource_access&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.resourceAccess + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/resource_access/methods/get' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/services.yaml b/providers/src/railway/v00.00.00000/services/services.yaml new file mode 100644 index 00000000..fd76a827 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/services.yaml @@ -0,0 +1,3277 @@ +openapi: 3.0.3 +info: + title: Services API + description: Services, per-environment service instances (build and deploy configuration, redeploy), resource limits, auto deploy status and edge configuration. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=function_runtimes&__method=get: + post: + operationId: function_runtimes_get + summary: Get information about a specific function runtime + description: Get information about a specific function runtime. Backed by the Railway GraphQL query functionRuntime. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.function_runtimes.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { functionRuntime(name: {{ .name }}) { image latest_version: latestVersion { image tag } name versions { image tag } } }' + x-stackql-protocol: graphql + parameters: + - name: name + in: query + required: true + schema: + type: string + enum: + - bun + responses: + '200': + description: One FunctionRuntime row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + functionRuntime: + $ref: '#/components/schemas/FunctionRuntime' + /graphql/v2?__resource=function_runtimes&__method=list: + post: + operationId: function_runtimes_list + summary: List available function runtimes + description: List available function runtimes. Backed by the Railway GraphQL query functionRuntimes. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.function_runtimes.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.functionRuntimes[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { functionRuntimes { image latest_version: latestVersion { image tag } name versions { image tag } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per FunctionRuntime. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + functionRuntimes: + type: array + items: + $ref: '#/components/schemas/FunctionRuntime' + /graphql/v2?__resource=service_edge_configs&__method=disable_cdn: + post: + operationId: service_edge_configs_disable_cdn + summary: Disables CDN for a service, soft-deleting the edge config + description: Disables CDN for a service, soft-deleting the edge config. Backed by the Railway GraphQL mutation disableServiceCdn. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + disableServiceCdn: + $ref: '#/components/schemas/DisableServiceCdnResult' + /graphql/v2?__resource=service_edge_configs&__method=enable_cdn: + post: + operationId: service_edge_configs_enable_cdn + summary: Enables CDN for a service, creating an edge config and attaching all live domains + description: Enables CDN for a service, creating an edge config and attaching all live domains. Backed by the Railway GraphQL mutation enableServiceCdn. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + config: + type: object + description: JSON object of GraphQL type EdgeConfigInput; keys keep the API's camelCase names. + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The EdgeConfig the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + enableServiceCdn: + $ref: '#/components/schemas/EdgeConfig' + /graphql/v2?__resource=service_edge_configs&__method=get: + post: + operationId: service_edge_configs_get + summary: Gets a EdgeConfig of a ServiceInstance + description: Gets a EdgeConfig of a ServiceInstance. Backed by the Railway GraphQL query serviceInstance.edgeConfig. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_edge_configs.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.serviceInstance.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { serviceInstance(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") { edgeConfig { caching { default_ttl_seconds: defaultTtlSeconds html_caching: htmlCaching mode purge_on_deploy: purgeOnDeploy } edge_rules: edgeRules enabled id overrides purge_epoch: purgeEpoch purge_epoch_by_kind: purgeEpochByKind tracing { enabled sample_rate: sampleRate } under_attack_mode_until: underAttackModeUntil } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One EdgeConfig row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstance: + type: object + properties: + edgeConfig: + $ref: '#/components/schemas/EdgeConfig' + /graphql/v2?__resource=service_edge_configs&__method=purge_cache: + post: + operationId: service_edge_configs_purge_cache + summary: Purges the CDN cache for a service + description: Purges the CDN cache for a service. Bumps the edge config's purge epoch so every edge node treats prior cached entries as stale on next request. Idempotent; returns true even if CDN is disabled for the service. Backed by the Railway GraphQL mutation purgeServiceCache. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - scope + - service_id + properties: + environment_id: + type: string + scope: + type: string + enum: + - ALL + - HTML + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + purgeServiceCache: + $ref: '#/components/schemas/PurgeServiceCacheResult' + /graphql/v2?__resource=service_edge_configs&__method=set_under_attack_mode: + post: + operationId: service_edge_configs_set_under_attack_mode + summary: Enables or disables Under Attack Mode for a service + description: Enables or disables Under Attack Mode for a service. While enabled, the edge serves a browser challenge to unverified visitors of the service's edge-routed domains; non-browser clients (APIs, webhooks) without a clearance cookie are rejected with a 429. Optionally time-boxed via durationSeconds, after which the mode disarms automatically. Backed by the Railway GraphQL mutation setServiceUnderAttackMode. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - enabled + - environment_id + - service_id + properties: + duration_seconds: + type: string + description: Integer passed as a string, for example '1'. + enabled: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The EdgeConfig the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + setServiceUnderAttackMode: + $ref: '#/components/schemas/EdgeConfig' + /graphql/v2?__resource=service_edge_configs&__method=update: + post: + operationId: service_edge_configs_update + summary: Updates the edge config (caching settings) for a service + description: Updates the edge config (caching settings) for a service. Backed by the Railway GraphQL mutation updateServiceEdgeConfig. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - config + - environment_id + - service_id + properties: + config: + type: object + description: JSON object of GraphQL type EdgeConfigInput; keys keep the API's camelCase names. + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The EdgeConfig the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + updateServiceEdgeConfig: + $ref: '#/components/schemas/EdgeConfig' + /graphql/v2?__resource=service_edge_configs&__method=update_rules: + post: + operationId: service_edge_configs_update_rules + summary: Replaces the service's edge rules (whole-section replace; null clears) + description: Replaces the service's edge rules (whole-section replace; null clears). Rules are boolean expressions over request attributes plus one action (block/allow/challenge/redirect/cache_override), evaluated at the edge before requests reach the service. The ruleset is validated server-side; invalid rulesets are rejected with per-rule diagnostics and nothing is written. Rules without an id get a server-assigned stable `rul_` id. Backed by the Railway GraphQL mutation updateServiceEdgeRules. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + edge_rules: + type: object + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The EdgeConfig the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + updateServiceEdgeRules: + $ref: '#/components/schemas/EdgeConfig' + /graphql/v2?__resource=service_edge_rule_diagnostics&__method=list: + post: + operationId: service_edge_rule_diagnostics_list + summary: Validates an edge ruleset without writing it — returns the same diagnostics updateServiceEdgeRules would reject with (empty list = valid) + description: Validates an edge ruleset without writing it — returns the same diagnostics updateServiceEdgeRules would reject with (empty list = valid). For live feedback in rule editors. Backed by the Railway GraphQL query validateServiceEdgeRules. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_edge_rule_diagnostics.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.validateServiceEdgeRules[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { validateServiceEdgeRules(input: { edgeRules: {{ .edge_rules }} environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}" }) { code message path } }' + x-stackql-protocol: graphql + parameters: + - name: edge_rules + in: query + required: true + description: 'GraphQL value literal, for example {key: "value"}.' + schema: + type: string + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per EdgeRuleDiagnostic. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + validateServiceEdgeRules: + type: array + items: + $ref: '#/components/schemas/EdgeRuleDiagnostic' + /graphql/v2?__resource=service_instance_auto_deploy&__method=get: + post: + operationId: service_instance_auto_deploy_get + summary: Returns the auto-deploy status for a service instance, including whether it can be enabled + description: Returns the auto-deploy status for a service instance, including whether it can be enabled. Backed by the Railway GraphQL query serviceInstanceAutoDeployStatus. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_instance_auto_deploy.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { serviceInstanceAutoDeployStatus(environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}" serviceId: "{{ .service_id }}") { can_enable: canEnable enabled reason } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One ServiceInstanceAutoDeployStatus row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceAutoDeployStatus: + $ref: '#/components/schemas/ServiceInstanceAutoDeployStatus' + /graphql/v2?__resource=service_instance_auto_deploy&__method=update: + post: + operationId: service_instance_auto_deploy_update + summary: Enables or disables auto-deploy for a service instance + description: Enables or disables auto-deploy for a service instance. Backed by the Railway GraphQL mutation serviceInstanceAutoDeployUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - enabled + - environment_id + - project_id + - service_id + properties: + enabled: + type: boolean + environment_id: + type: string + project_id: + type: string + service_id: + type: string + responses: + '200': + description: The ServiceInstanceAutoDeployUpdateResult the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceAutoDeployUpdate: + $ref: '#/components/schemas/ServiceInstanceAutoDeployUpdateResult' + /graphql/v2?__resource=service_instance_limit_overrides&__method=get: + post: + operationId: service_instance_limit_overrides_get + summary: Get the service instance resource limit overrides (null if no overrides set) + description: Get the service instance resource limit overrides (null if no overrides set). Backed by the Railway GraphQL query serviceInstanceLimitOverride. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_instance_limit_overrides.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.serviceInstanceLimitOverride[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { serviceInstanceLimitOverride(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceLimitOverride: + type: array + items: + $ref: '#/components/schemas/ServiceInstanceLimitOverrideResult' + /graphql/v2?__resource=service_instance_limits&__method=get: + post: + operationId: service_instance_limits_get + summary: Get the merged resource limits for a service instance (includes plan defaults) + description: Get the merged resource limits for a service instance (includes plan defaults). Backed by the Railway GraphQL query serviceInstanceLimits. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_instance_limits.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.serviceInstanceLimits[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { serviceInstanceLimits(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceLimits: + type: array + items: + $ref: '#/components/schemas/ServiceInstanceLimitsResult' + /graphql/v2?__resource=service_instance_limits&__method=update: + post: + operationId: service_instance_limits_update + summary: Update the resource limits for a service instance + description: Update the resource limits for a service instance. Backed by the Railway GraphQL mutation serviceInstanceLimitsUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + memory_gb: + type: number + description: Amount of memory in GB to allocate to the service instance. + service_id: + type: string + v_cp_us: + type: number + description: Number of vCPUs to allocate to the service instance. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceLimitsUpdate: + $ref: '#/components/schemas/ServiceInstanceLimitsUpdateResult' + /graphql/v2?__resource=service_instance_updatability&__method=get: + post: + operationId: service_instance_updatability_get + summary: Check if the upstream repo for a service has an update available + description: Check if the upstream repo for a service has an update available. Backed by the Railway GraphQL query serviceInstanceIsUpdatable. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_instance_updatability.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.serviceInstanceIsUpdatable[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { serviceInstanceIsUpdatable(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceIsUpdatable: + type: array + items: + $ref: '#/components/schemas/ServiceInstanceIsUpdatableResult' + /graphql/v2?__resource=service_instances&__method=clear_auto_update_snooze: + post: + operationId: service_instances_clear_auto_update_snooze + summary: Undo an active auto-update skip for a service instance, applied immediately (no config staging, no redeploy) + description: Undo an active auto-update skip for a service instance, applied immediately (no config staging, no redeploy). The recurring maintenance window and update policy are untouched — the next scheduled occurrence fires normally again. Backed by the Railway GraphQL mutation serviceInstanceAutoUpdateSnoozeClear. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceAutoUpdateSnoozeClear: + $ref: '#/components/schemas/ServiceInstanceAutoUpdateSnoozeClearResult' + /graphql/v2?__resource=service_instances&__method=deploy: + post: + operationId: service_instances_deploy + summary: Deploy a service instance + description: Deploy a service instance. Backed by the Railway GraphQL mutation serviceInstanceDeploy. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + commit_sha: + type: string + environment_id: + type: string + latest_commit: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceDeploy: + $ref: '#/components/schemas/ServiceInstanceDeployResult' + /graphql/v2?__resource=service_instances&__method=deploy_v2: + post: + operationId: service_instances_deploy_v2 + summary: Deploy a service instance + description: Deploy a service instance. Returns a deployment ID. Backed by the Railway GraphQL mutation serviceInstanceDeployV2. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + commit_sha: + type: string + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceDeployV2: + $ref: '#/components/schemas/ServiceInstanceDeployV2Result' + /graphql/v2?__resource=service_instances&__method=dismiss_vuln_remediation: + post: + operationId: service_instances_dismiss_vuln_remediation + summary: Dismiss a platform-armed database security update notice and stand down the scheduled redeploy + description: Dismiss a platform-armed database security update notice and stand down the scheduled redeploy. Backed by the Railway GraphQL mutation serviceInstanceVulnRemediationDismiss. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceVulnRemediationDismiss: + $ref: '#/components/schemas/ServiceInstanceVulnRemediationDismissResult' + /graphql/v2?__resource=service_instances&__method=generate_shell_token: + post: + operationId: service_instances_generate_shell_token + summary: Mints a 5-minute JWT for opening a browser WS session against tcp-proxy + description: Mints a 5-minute JWT for opening a browser WS session against tcp-proxy. Backed by the Railway GraphQL mutation generateShellToken. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - instance_id + - scope + properties: + environment_id: + type: string + instance_id: + type: string + kind: + type: string + port: + type: string + description: Integer passed as a string, for example '1'. + scope: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + generateShellToken: + $ref: '#/components/schemas/GenerateShellTokenResult' + /graphql/v2?__resource=service_instances&__method=get: + post: + operationId: service_instances_get + summary: Get a service instance belonging to a service and environment + description: Get a service instance belonging to a service and environment. Backed by the Railway GraphQL query serviceInstance. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_instances.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { serviceInstance(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") { active_deployments: activeDeployments { can_redeploy: canRedeploy can_rollback: canRollback created_at: createdAt deployment_stopped: deploymentStopped diagnosis environment_id: environmentId id project_id: projectId service_id: serviceId snapshot_id: snapshotId static_url: staticUrl status status_updated_at: statusUpdatedAt suggest_add_service_domain: suggestAddServiceDomain updated_at: updatedAt url } build_command: buildCommand builder created_at: createdAt cron_schedule: cronSchedule deleted_at: deletedAt dockerfile_path: dockerfilePath domains { custom_domains: customDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id is_railway_domain: isRailwayDomain project_id: projectId service_id: serviceId status { cdn_provider: cdnProvider certificate_error_message: certificateErrorMessage certificate_error_type: certificateErrorType certificate_retryable: certificateRetryable certificates { domain_names: domainNames expires_at: expiresAt fingerprint_sha256: fingerprintSha256 issued_at: issuedAt key_type: keyType } certificate_status: certificateStatus certificate_status_detailed: certificateStatusDetailed dns_records: dnsRecords { current_value: currentValue fqdn hostlabel purpose record_type: recordType required_value: requiredValue status zone } verification_dns_host: verificationDnsHost verification_token: verificationToken verified } sync_status: syncStatus target_port: targetPort updated_at: updatedAt } service_domains: serviceDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id new_domain_name: newDomainName new_host_label: newHostLabel project_id: projectId service_id: serviceId suffix sync_status: syncStatus target_port: targetPort updated_at: updatedAt } } draining_seconds: drainingSeconds edge_config: edgeConfig { enabled id purge_epoch: purgeEpoch under_attack_mode_until: underAttackModeUntil } environment_id: environmentId has_ever_deployed: hasEverDeployed healthcheck_path: healthcheckPath healthcheck_timeout: healthcheckTimeout id ipv6_egress_enabled: ipv6EgressEnabled is_updatable: isUpdatable latest_deployment: latestDeployment { can_redeploy: canRedeploy can_rollback: canRollback created_at: createdAt deployment_stopped: deploymentStopped diagnosis environment_id: environmentId id project_id: projectId service_id: serviceId snapshot_id: snapshotId static_url: staticUrl status status_updated_at: statusUpdatedAt suggest_add_service_domain: suggestAddServiceDomain updated_at: updatedAt url } next_cron_run_at: nextCronRunAt nixpacks_plan: nixpacksPlan num_replicas: numReplicas overlap_seconds: overlapSeconds pre_deploy_command: preDeployCommand pre_deploy_timeout_seconds: preDeployTimeoutSeconds railpack_info: railpackInfo railway_config_file: railwayConfigFile region resolved_file_config: resolvedFileConfig { commit_hash: commitHash config_file: configFile deployment_id: deploymentId repo resolved_at: resolvedAt } restart_policy_max_retries: restartPolicyMaxRetries restart_policy_type: restartPolicyType root_directory: rootDirectory service { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } service_id: serviceId service_name: serviceName sleep_application: sleepApplication source { image repo } start_command: startCommand updated_at: updatedAt upstream_url: upstreamUrl watch_patterns: watchPatterns } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One ServiceInstance row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstance: + $ref: '#/components/schemas/ServiceInstance' + /graphql/v2?__resource=service_instances&__method=list: + post: + operationId: service_instances_list + summary: Lists ServiceInstance objects of a Environment + description: Lists ServiceInstance objects of a Environment. Backed by the Railway GraphQL query environment.serviceInstances. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.service_instances.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environment.serviceInstances.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.environment.serviceInstances.pageInfo.endCursor + terminateOnJsonPath: $.data.environment.serviceInstances.pageInfo.hasNextPage + query: 'query { environment(id: "{{ .environment_id }}" {{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}) { serviceInstances(first: 100{{ .cursor }}) { edges { node { active_deployments: activeDeployments { can_redeploy: canRedeploy can_rollback: canRollback created_at: createdAt deployment_stopped: deploymentStopped diagnosis environment_id: environmentId id project_id: projectId service_id: serviceId snapshot_id: snapshotId static_url: staticUrl status status_updated_at: statusUpdatedAt suggest_add_service_domain: suggestAddServiceDomain updated_at: updatedAt url } build_command: buildCommand builder created_at: createdAt cron_schedule: cronSchedule deleted_at: deletedAt dockerfile_path: dockerfilePath domains { custom_domains: customDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id is_railway_domain: isRailwayDomain project_id: projectId service_id: serviceId status { cdn_provider: cdnProvider certificate_error_message: certificateErrorMessage certificate_error_type: certificateErrorType certificate_retryable: certificateRetryable certificates { domain_names: domainNames expires_at: expiresAt fingerprint_sha256: fingerprintSha256 issued_at: issuedAt key_type: keyType } certificate_status: certificateStatus certificate_status_detailed: certificateStatusDetailed dns_records: dnsRecords { current_value: currentValue fqdn hostlabel purpose record_type: recordType required_value: requiredValue status zone } verification_dns_host: verificationDnsHost verification_token: verificationToken verified } sync_status: syncStatus target_port: targetPort updated_at: updatedAt } service_domains: serviceDomains { created_at: createdAt deleted_at: deletedAt domain edge_id: edgeId environment_id: environmentId id new_domain_name: newDomainName new_host_label: newHostLabel project_id: projectId service_id: serviceId suffix sync_status: syncStatus target_port: targetPort updated_at: updatedAt } } draining_seconds: drainingSeconds edge_config: edgeConfig { enabled id purge_epoch: purgeEpoch under_attack_mode_until: underAttackModeUntil } environment_id: environmentId has_ever_deployed: hasEverDeployed healthcheck_path: healthcheckPath healthcheck_timeout: healthcheckTimeout id ipv6_egress_enabled: ipv6EgressEnabled is_updatable: isUpdatable latest_deployment: latestDeployment { can_redeploy: canRedeploy can_rollback: canRollback created_at: createdAt deployment_stopped: deploymentStopped diagnosis environment_id: environmentId id project_id: projectId service_id: serviceId snapshot_id: snapshotId static_url: staticUrl status status_updated_at: statusUpdatedAt suggest_add_service_domain: suggestAddServiceDomain updated_at: updatedAt url } next_cron_run_at: nextCronRunAt nixpacks_plan: nixpacksPlan num_replicas: numReplicas overlap_seconds: overlapSeconds pre_deploy_command: preDeployCommand pre_deploy_timeout_seconds: preDeployTimeoutSeconds railpack_info: railpackInfo railway_config_file: railwayConfigFile region resolved_file_config: resolvedFileConfig { commit_hash: commitHash config_file: configFile deployment_id: deploymentId repo resolved_at: resolvedAt } restart_policy_max_retries: restartPolicyMaxRetries restart_policy_type: restartPolicyType root_directory: rootDirectory service { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } service_id: serviceId service_name: serviceName sleep_application: sleepApplication source { image repo } start_command: startCommand updated_at: updatedAt upstream_url: upstreamUrl watch_patterns: watchPatterns } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per ServiceInstance. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environment: + type: object + properties: + serviceInstances: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/ServiceInstance' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=service_instances&__method=patch_vuln_now: + post: + operationId: service_instances_patch_vuln_now + summary: Immediately apply a platform-armed database security update (backup + redeploy) + description: Immediately apply a platform-armed database security update (backup + redeploy). Returns the new deployment id. Backed by the Railway GraphQL mutation serviceInstanceVulnRemediationPatchNow. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceVulnRemediationPatchNow: + $ref: '#/components/schemas/ServiceInstanceVulnRemediationPatchNowResult' + /graphql/v2?__resource=service_instances&__method=redeploy: + post: + operationId: service_instances_redeploy + summary: Redeploy a service instance + description: Redeploy a service instance. Backed by the Railway GraphQL mutation serviceInstanceRedeploy. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceRedeploy: + $ref: '#/components/schemas/ServiceInstanceRedeployResult' + /graphql/v2?__resource=service_instances&__method=snooze_auto_update: + post: + operationId: service_instances_snooze_auto_update + summary: Skip the next scheduled auto-update occurrence for a service instance, applied immediately (no config staging, no redeploy) + description: Skip the next scheduled auto-update occurrence for a service instance, applied immediately (no config staging, no redeploy). The recurring maintenance window and update policy are untouched — this only delays the next fire. Backed by the Railway GraphQL mutation serviceInstanceAutoUpdateSnooze. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - service_id + properties: + environment_id: + type: string + service_id: + type: string + snooze_days: + type: string + description: How many days to skip, from now (default 7 — covers any weekly schedule shape). Between 1 and 14. Integer passed as a string, for example '1'. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceAutoUpdateSnooze: + $ref: '#/components/schemas/ServiceInstanceAutoUpdateSnoozeResult' + /graphql/v2?__resource=service_instances&__method=update: + post: + operationId: service_instances_update + summary: Update a service instance + description: Update a service instance. Backed by the Railway GraphQL mutation serviceInstanceUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - service_id + properties: + environment_id: + type: string + description: '[Experimental] Environment ID. If the environment is a fork, the service will only be updated in it. Otherwise it will updated in all environments that are not forks of other environments.' + build_command: + type: string + builder: + type: string + enum: + - HEROKU + - NIXPACKS + - PAKETO + - RAILPACK + cron_schedule: + type: string + dockerfile_path: + type: string + draining_seconds: + type: integer + healthcheck_path: + type: string + healthcheck_timeout: + type: integer + ipv6_egress_enabled: + type: boolean + multi_region_config: + type: object + nixpacks_plan: + type: object + num_replicas: + type: integer + overlap_seconds: + type: integer + pre_deploy_command: + type: array + items: + type: string + pre_deploy_timeout_seconds: + type: integer + railway_config_file: + type: string + region: + type: string + registry_credentials: + type: object + description: JSON object of GraphQL type RegistryCredentialsInput; keys keep the API's camelCase names. + restart_policy_max_retries: + type: integer + restart_policy_type: + type: string + enum: + - ALWAYS + - NEVER + - ON_FAILURE + root_directory: + type: string + sleep_application: + type: boolean + source: + type: object + description: JSON object of GraphQL type ServiceSourceInput; keys keep the API's camelCase names. + start_command: + type: string + watch_patterns: + type: array + items: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceUpdate: + $ref: '#/components/schemas/ServiceInstanceUpdateResult' + /graphql/v2?__resource=service_instances&__method=update_auto_update_schedule: + post: + operationId: service_instances_update_auto_update_schedule + summary: Update the auto-update maintenance window for a service instance, applied immediately (no config staging, no redeploy) + description: Update the auto-update maintenance window for a service instance, applied immediately (no config staging, no redeploy). Only the schedule changes — the update policy is untouched. Backed by the Railway GraphQL mutation serviceInstanceAutoUpdateScheduleUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - schedule + - service_id + properties: + environment_id: + type: string + schedule: + type: array + items: + type: object + description: The full replacement set of weekly UTC maintenance windows (at least one). JSON array of objects of GraphQL type AutoUpdateScheduleWindowInput; keys keep the API's camelCase names. + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceInstanceAutoUpdateScheduleUpdate: + $ref: '#/components/schemas/ServiceInstanceAutoUpdateScheduleUpdateResult' + /graphql/v2?__resource=services&__method=add_feature_flag: + post: + operationId: services_add_feature_flag + summary: Add a feature flag for a service + description: Add a feature flag for a service. Backed by the Railway GraphQL mutation serviceFeatureFlagAdd. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flag + - service_id + properties: + flag: + type: string + enum: + - BUILDER_V4 + - COPY_VOLUME_TO_ENVIRONMENT + - PLACEHOLDER + - SKIPPED_BUILDS + - USE_DEPLOYMENT_VMS + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceFeatureFlagAdd: + $ref: '#/components/schemas/ServiceFeatureFlagAddResult' + /graphql/v2?__resource=services&__method=connect: + post: + operationId: services_connect + summary: Connect a service to a source + description: Connect a service to a source. Backed by the Railway GraphQL mutation serviceConnect. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + branch: + type: string + description: The branch to connect to. e.g. 'main'. + image: + type: string + description: Name of the Dockerhub or GHCR image to connect this service to. + repo: + type: string + description: The full name of the repo to connect to. e.g. 'railwayapp/starters'. + responses: + '200': + description: The Service the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceConnect: + $ref: '#/components/schemas/Service' + /graphql/v2?__resource=services&__method=create: + post: + operationId: services_create + summary: Creates a new service + description: Creates a new service. Backed by the Railway GraphQL mutation serviceCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + properties: + branch: + type: string + environment_id: + type: string + description: Environment ID. If the specified environment is a fork, the service will only be created in it. Otherwise it will created in all environments that are not forks of other environments. + icon: + type: string + name: + type: string + project_id: + type: string + registry_credentials: + type: object + description: JSON object of GraphQL type RegistryCredentialsInput; keys keep the API's camelCase names. + source: + type: object + description: JSON object of GraphQL type ServiceSourceInput; keys keep the API's camelCase names. + template_id: + type: string + description: Template ID. Required when templateServiceId is provided. + template_service_id: + type: string + description: Template service ID within the template's serializedConfig. Required when templateId is provided. + variables: + type: object + responses: + '200': + description: The Service the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceCreate: + $ref: '#/components/schemas/Service' + /graphql/v2?__resource=services&__method=delete: + post: + operationId: services_delete + summary: Deletes a service + description: Deletes a service. Backed by the Railway GraphQL mutation serviceDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + environment_id: + type: string + description: Environment ID. When set, the service is deleted only in that environment; the service itself is deleted once no instances remain in any environment. When omitted, the service is deleted in every environment that is not a fork of another environment. + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceDelete: + $ref: '#/components/schemas/ServiceDeleteResult' + /graphql/v2?__resource=services&__method=disconnect: + post: + operationId: services_disconnect + summary: Disconnect a service from a repo + description: Disconnect a service from a repo. Backed by the Railway GraphQL mutation serviceDisconnect. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The Service the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceDisconnect: + $ref: '#/components/schemas/Service' + /graphql/v2?__resource=services&__method=get: + post: + operationId: services_get + summary: Get a service by ID + description: Get a service by ID. Backed by the Railway GraphQL query service. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.services.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { service(id: "{{ .id }}") { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One Service row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + service: + $ref: '#/components/schemas/Service' + /graphql/v2?__resource=services&__method=list: + post: + operationId: services_list + summary: Lists Service objects of a Project + description: Lists Service objects of a Project. Backed by the Railway GraphQL query project.services. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.services.services.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.project.services.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.project.services.pageInfo.endCursor + terminateOnJsonPath: $.data.project.services.pageInfo.hasNextPage + query: 'query { project(id: "{{ .project_id }}") { services(first: 100{{ .cursor }}) { edges { node { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Service. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + project: + type: object + properties: + services: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Service' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=services&__method=remove_feature_flag: + post: + operationId: services_remove_feature_flag + summary: Remove a feature flag for a service + description: Remove a feature flag for a service. Backed by the Railway GraphQL mutation serviceFeatureFlagRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - flag + - service_id + properties: + flag: + type: string + enum: + - BUILDER_V4 + - COPY_VOLUME_TO_ENVIRONMENT + - PLACEHOLDER + - SKIPPED_BUILDS + - USE_DEPLOYMENT_VMS + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceFeatureFlagRemove: + $ref: '#/components/schemas/ServiceFeatureFlagRemoveResult' + /graphql/v2?__resource=services&__method=remove_upstream_url: + post: + operationId: services_remove_upstream_url + summary: Remove the upstream URL from all service instances for this service + description: Remove the upstream URL from all service instances for this service. Backed by the Railway GraphQL mutation serviceRemoveUpstreamUrl. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The Service the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceRemoveUpstreamUrl: + $ref: '#/components/schemas/Service' + /graphql/v2?__resource=services&__method=update: + post: + operationId: services_update + summary: Updates a service + description: Updates a service. Backed by the Railway GraphQL mutation serviceUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + auto_instrumentation_enabled: + type: boolean + description: Instrument the service's processes with eBPF (OBI) while its tracing is on. Reaches running containers within about a minute, no redeploy needed. + icon: + type: string + name: + type: string + tracing_enabled: + type: boolean + description: 'Tracing override for the service: true or false pins it, null follows the project default. Takes effect at the edge within seconds and in the app on the next deploy.' + responses: + '200': + description: The Service the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + serviceUpdate: + $ref: '#/components/schemas/Service' +components: + schemas: + DisableServiceCdnResult: + type: object + properties: + result: + type: boolean + description: Value returned by the disableServiceCdn mutation (Boolean!) + EdgeConfig: + type: object + properties: + caching: + type: object + properties: + default_ttl_seconds: + type: integer + html_caching: + type: string + mode: + type: string + purge_on_deploy: + type: string + enum: + - ALL + - HTML + - 'OFF' + description: EdgeCachingConfig object + edge_rules: + type: object + enabled: + type: boolean + id: + type: string + overrides: + type: object + purge_epoch: + type: integer + purge_epoch_by_kind: + type: object + tracing: + type: object + properties: + enabled: + type: boolean + sample_rate: + type: number + description: EdgeTracingConfig object + under_attack_mode_until: + type: integer + EdgeRuleDiagnostic: + type: object + properties: + code: + type: string + message: + type: string + path: + type: string + FunctionRuntime: + type: object + properties: + image: + type: string + description: The image of the function runtime + latest_version: + type: object + properties: + image: + type: string + tag: + type: string + description: The latest version of the function runtime + name: + type: string + enum: + - bun + description: The name of the function runtime + versions: + type: array + items: + type: object + properties: + image: + type: string + tag: + type: string + description: The versions of the function runtime + GenerateShellTokenResult: + type: object + properties: + result: + type: string + description: Value returned by the generateShellToken mutation (String!) + PurgeServiceCacheResult: + type: object + properties: + result: + type: boolean + description: Value returned by the purgeServiceCache mutation (Boolean!) + Service: + type: object + properties: + auto_instrumentation_enabled: + type: boolean + description: 'Best-effort automatic tracing: Railway instruments the service''s processes with eBPF (OBI) for supported runtimes, without code changes. Only active while the service''s tracing is on.' + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - BUILDER_V4 + - COPY_VOLUME_TO_ENVIRONMENT + - PLACEHOLDER + - SKIPPED_BUILDS + - USE_DEPLOYMENT_VMS + group_id: + type: string + has_hidden_registry_credentials_from_template: + type: boolean + description: Whether this service has hidden registry credentials from a template. When true, the credentials are stored in the template and used during deployment. + icon: + type: string + id: + type: string + is_restricted: + type: boolean + description: Whether this service has an active restriction that limits its capabilities. + name: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + template_id: + type: string + template_service_id: + type: string + template_thread_slug: + type: string + tracing_enabled: + type: boolean + description: 'The service''s tracing override: true or false pins it, null follows the project''s tracingEnabled.' + updated_at: + type: string + format: date-time + ServiceDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceDelete mutation (Boolean!) + ServiceFeatureFlagAddResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceFeatureFlagAdd mutation (Boolean!) + ServiceFeatureFlagRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceFeatureFlagRemove mutation (Boolean!) + ServiceInstance: + type: object + properties: + active_deployments: + type: array + items: + type: object + properties: + can_redeploy: + type: boolean + can_rollback: + type: boolean + created_at: + type: string + format: date-time + deployment_stopped: + type: boolean + description: Check if a deployment's instances have all stopped + diagnosis: + type: object + environment_id: + type: string + id: + type: string + project_id: + type: string + service_id: + type: string + snapshot_id: + type: string + static_url: + type: string + status: + type: string + enum: + - BUILDING + - CRASHED + - DEPLOYING + - FAILED + - INITIALIZING + - NEEDS_APPROVAL + - QUEUED + - REMOVED + - REMOVING + - SKIPPED + - SLEEPING + - SUCCESS + - WAITING + status_updated_at: + type: string + format: date-time + suggest_add_service_domain: + type: boolean + updated_at: + type: string + format: date-time + url: + type: string + description: All currently active (deployed and running) deployments for this service instance + build_command: + type: string + builder: + type: string + enum: + - HEROKU + - NIXPACKS + - PAKETO + - RAILPACK + created_at: + type: string + format: date-time + cron_schedule: + type: string + deleted_at: + type: string + format: date-time + dockerfile_path: + type: string + domains: + type: object + properties: + custom_domains: + type: array + items: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + domain: + type: string + edge_id: + type: string + environment_id: + type: string + id: + type: string + is_railway_domain: + type: boolean + project_id: + type: string + service_id: + type: string + status: + type: object + properties: + cdn_provider: + type: string + enum: + - DETECTED_CDN_PROVIDER_CLOUDFLARE + - DETECTED_CDN_PROVIDER_UNSPECIFIED + - UNRECOGNIZED + certificate_error_message: + type: string + description: Human-readable error message when certificate issuance fails + certificate_error_type: + type: string + enum: + - CERTIFICATE_ERROR_TYPE_AUTHORIZATION_FAILED + - CERTIFICATE_ERROR_TYPE_DNS_VALIDATION + - CERTIFICATE_ERROR_TYPE_INTERNAL + - CERTIFICATE_ERROR_TYPE_KEY_GENERATION + - CERTIFICATE_ERROR_TYPE_ORDER_CREATION + - CERTIFICATE_ERROR_TYPE_RATE_LIMIT + - CERTIFICATE_ERROR_TYPE_UNSPECIFIED + - UNRECOGNIZED + description: Structured error type for programmatic handling + certificate_retryable: + type: boolean + description: Whether the certificate issuance can be retried + certificates: + type: array + items: + type: object + properties: + domain_names: + type: array + items: + type: string + expires_at: + type: string + format: date-time + fingerprint_sha256: + type: string + issued_at: + type: string + format: date-time + key_type: + type: string + enum: + - KEY_TYPE_ECDSA + - KEY_TYPE_RSA_2048 + - KEY_TYPE_RSA_4096 + - KEY_TYPE_UNSPECIFIED + - UNRECOGNIZED + description: List of CertificatePublicData objects + certificate_status: + type: string + enum: + - CERTIFICATE_STATUS_TYPE_ISSUE_FAILED + - CERTIFICATE_STATUS_TYPE_ISSUING + - CERTIFICATE_STATUS_TYPE_UNSPECIFIED + - CERTIFICATE_STATUS_TYPE_VALID + - CERTIFICATE_STATUS_TYPE_VALIDATING_OWNERSHIP + - UNRECOGNIZED + certificate_status_detailed: + type: string + enum: + - CERTIFICATE_STATUS_TYPE_DETAILED_CLEANING_UP + - CERTIFICATE_STATUS_TYPE_DETAILED_COMPLETE + - CERTIFICATE_STATUS_TYPE_DETAILED_CREATING_ORDER + - CERTIFICATE_STATUS_TYPE_DETAILED_DOWNLOADING_CERTIFICATE + - CERTIFICATE_STATUS_TYPE_DETAILED_FAILED + - CERTIFICATE_STATUS_TYPE_DETAILED_FETCHING_AUTHORIZATIONS + - CERTIFICATE_STATUS_TYPE_DETAILED_FINALIZING_ORDER + - CERTIFICATE_STATUS_TYPE_DETAILED_GENERATING_KEYS + - CERTIFICATE_STATUS_TYPE_DETAILED_INITIATING_CHALLENGES + - CERTIFICATE_STATUS_TYPE_DETAILED_POLLING_AUTHORIZATIONS + - CERTIFICATE_STATUS_TYPE_DETAILED_PRESENTING_CHALLENGES + - CERTIFICATE_STATUS_TYPE_DETAILED_UNSPECIFIED + - UNRECOGNIZED + dns_records: + type: array + items: + type: object + properties: + current_value: + type: string + fqdn: + type: string + hostlabel: + type: string + purpose: + type: string + enum: + - DNS_RECORD_PURPOSE_ACME_DNS01_CHALLENGE + - DNS_RECORD_PURPOSE_TRAFFIC_ROUTE + - DNS_RECORD_PURPOSE_UNSPECIFIED + - UNRECOGNIZED + record_type: + type: string + enum: + - DNS_RECORD_TYPE_A + - DNS_RECORD_TYPE_CNAME + - DNS_RECORD_TYPE_NS + - DNS_RECORD_TYPE_TXT + - DNS_RECORD_TYPE_UNSPECIFIED + - UNRECOGNIZED + required_value: + type: string + status: + type: string + enum: + - DNS_RECORD_STATUS_PROPAGATED + - DNS_RECORD_STATUS_REQUIRES_UPDATE + - DNS_RECORD_STATUS_UNSPECIFIED + - UNRECOGNIZED + zone: + type: string + description: List of DNSRecords objects + verification_dns_host: + type: string + verification_token: + type: string + verified: + type: boolean + description: CustomDomainStatus object + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + target_port: + type: integer + updated_at: + type: string + format: date-time + description: List of CustomDomain objects + service_domains: + type: array + items: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + domain: + type: string + edge_id: + type: string + environment_id: + type: string + id: + type: string + new_domain_name: + type: string + new_host_label: + type: string + project_id: + type: string + service_id: + type: string + suffix: + type: string + sync_status: + type: string + enum: + - ACTIVE + - CREATING + - DELETED + - DELETING + - UNSPECIFIED + - UPDATING + target_port: + type: integer + updated_at: + type: string + format: date-time + description: List of ServiceDomain objects + description: AllDomains object + draining_seconds: + type: integer + edge_config: + type: object + properties: + enabled: + type: boolean + id: + type: string + purge_epoch: + type: integer + under_attack_mode_until: + type: integer + description: EdgeConfig object + environment_id: + type: string + has_ever_deployed: + type: boolean + description: Whether any deployment was ever created for this service instance, including deployments that have since been removed. Distinguishes a service that was torn down (all deployments removed) from one that has never deployed — latestDeployment and activeDeployments are null/empty for both. + healthcheck_path: + type: string + healthcheck_timeout: + type: integer + id: + type: string + ipv6_egress_enabled: + type: boolean + is_updatable: + type: boolean + latest_deployment: + type: object + properties: + can_redeploy: + type: boolean + can_rollback: + type: boolean + created_at: + type: string + format: date-time + deployment_stopped: + type: boolean + description: Check if a deployment's instances have all stopped + diagnosis: + type: object + environment_id: + type: string + id: + type: string + project_id: + type: string + service_id: + type: string + snapshot_id: + type: string + static_url: + type: string + status: + type: string + enum: + - BUILDING + - CRASHED + - DEPLOYING + - FAILED + - INITIALIZING + - NEEDS_APPROVAL + - QUEUED + - REMOVED + - REMOVING + - SKIPPED + - SLEEPING + - SUCCESS + - WAITING + status_updated_at: + type: string + format: date-time + suggest_add_service_domain: + type: boolean + updated_at: + type: string + format: date-time + url: + type: string + description: The most recent deployment for this service instance + next_cron_run_at: + type: string + format: date-time + nixpacks_plan: + type: object + num_replicas: + type: integer + overlap_seconds: + type: integer + pre_deploy_command: + type: object + pre_deploy_timeout_seconds: + type: integer + railpack_info: + type: object + railway_config_file: + type: string + region: + type: string + resolved_file_config: + type: object + properties: + commit_hash: + type: string + description: Commit the config was read from. + config_file: + type: string + description: Path of the config file that was read, or null when the repo has none. + deployment_id: + type: string + description: Deployment this config was read from. + repo: + type: string + resolved_at: + type: string + format: date-time + description: When that deployment was created. Surface this when it is older than the latest deployment, so a stale config is not presented as current. + description: Config read from the repo's config file, taken from the most recent deployment that actually read it. Null when no deployment has resolved a config file yet. An empty `fileManifest` is a real answer and means the repo has no config file — do not read this off the latest deployment instead, since a deployment whose snapshot never completed carries no file config at all and is not the same as a repo without one. + restart_policy_max_retries: + type: integer + restart_policy_type: + type: string + enum: + - ALWAYS + - NEVER + - ON_FAILURE + root_directory: + type: string + service: + type: object + properties: + auto_instrumentation_enabled: + type: boolean + description: 'Best-effort automatic tracing: Railway instruments the service''s processes with eBPF (OBI) for supported runtimes, without code changes. Only active while the service''s tracing is on.' + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - BUILDER_V4 + - COPY_VOLUME_TO_ENVIRONMENT + - PLACEHOLDER + - SKIPPED_BUILDS + - USE_DEPLOYMENT_VMS + group_id: + type: string + has_hidden_registry_credentials_from_template: + type: boolean + description: Whether this service has hidden registry credentials from a template. When true, the credentials are stored in the template and used during deployment. + icon: + type: string + id: + type: string + is_restricted: + type: boolean + description: Whether this service has an active restriction that limits its capabilities. + name: + type: string + project_id: + type: string + template_id: + type: string + template_service_id: + type: string + template_thread_slug: + type: string + tracing_enabled: + type: boolean + description: 'The service''s tracing override: true or false pins it, null follows the project''s tracingEnabled.' + updated_at: + type: string + format: date-time + description: Service object + service_id: + type: string + service_name: + type: string + sleep_application: + type: boolean + source: + type: object + properties: + image: + type: string + repo: + type: string + description: ServiceSource object + start_command: + type: string + updated_at: + type: string + format: date-time + upstream_url: + type: string + watch_patterns: + type: array + items: + type: string + ServiceInstanceAutoDeployStatus: + type: object + properties: + can_enable: + type: boolean + enabled: + type: boolean + reason: + type: string + ServiceInstanceAutoDeployUpdateResult: + type: object + properties: + enabled: + type: boolean + ServiceInstanceAutoUpdateScheduleUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceAutoUpdateScheduleUpdate mutation (Boolean!) + ServiceInstanceAutoUpdateSnoozeClearResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceAutoUpdateSnoozeClear mutation (Boolean!) + ServiceInstanceAutoUpdateSnoozeResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceAutoUpdateSnooze mutation (Boolean!) + ServiceInstanceDeployResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceDeploy mutation (Boolean!) + ServiceInstanceDeployV2Result: + type: object + properties: + result: + type: string + description: Value returned by the serviceInstanceDeployV2 mutation (String!) + ServiceInstanceIsUpdatableResult: + type: object + properties: + result: + type: boolean + description: serviceInstanceIsUpdatable value + ServiceInstanceLimitOverrideResult: + type: object + properties: + result: + type: object + description: serviceInstanceLimitOverride value + ServiceInstanceLimitsResult: + type: object + properties: + result: + type: object + description: serviceInstanceLimits value + ServiceInstanceLimitsUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceLimitsUpdate mutation (Boolean!) + ServiceInstanceRedeployResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceRedeploy mutation (Boolean!) + ServiceInstanceUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceUpdate mutation (Boolean!) + ServiceInstanceVulnRemediationDismissResult: + type: object + properties: + result: + type: boolean + description: Value returned by the serviceInstanceVulnRemediationDismiss mutation (Boolean!) + ServiceInstanceVulnRemediationPatchNowResult: + type: object + properties: + result: + type: string + description: Value returned by the serviceInstanceVulnRemediationPatchNow mutation (String!) + x-stackQL-resources: + function_runtimes: + id: railway.services.function_runtimes + name: function_runtimes + title: Function Runtimes + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=function_runtimes&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.functionRuntime + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=function_runtimes&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.functionRuntimes + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/function_runtimes/methods/get' + - $ref: '#/components/x-stackQL-resources/function_runtimes/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + service_edge_configs: + id: railway.services.service_edge_configs + name: service_edge_configs + title: Service Edge Configs + methods: + disable_cdn: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_configs&__method=disable_cdn/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!) { disableServiceCdn(input: { environmentId: $environment_id, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.disableServiceCdn + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"disableServiceCdn":{"result":{{ toJson (index (index . "data") "disableServiceCdn") }}}}}{{- end -}}' + x-stackql-protocol: graphql + enable_cdn: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_configs&__method=enable_cdn/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($config: EdgeConfigInput, $environment_id: String!, $service_id: String!) { enableServiceCdn(input: { config: $config, environmentId: $environment_id, serviceId: $service_id }) { caching { default_ttl_seconds: defaultTtlSeconds html_caching: htmlCaching mode purge_on_deploy: purgeOnDeploy } edge_rules: edgeRules enabled id overrides purge_epoch: purgeEpoch purge_epoch_by_kind: purgeEpochByKind tracing { enabled sample_rate: sampleRate } under_attack_mode_until: underAttackModeUntil } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "config" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"config":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.enableServiceCdn + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_configs&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.serviceInstance.edgeConfig + x-stackql-protocol: graphql + purge_cache: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_configs&__method=purge_cache/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $scope: PurgeCacheScope!, $service_id: String!) { purgeServiceCache(input: { environmentId: $environment_id, scope: $scope, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "scope" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"scope":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.purgeServiceCache + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"purgeServiceCache":{"result":{{ toJson (index (index . "data") "purgeServiceCache") }}}}}{{- end -}}' + x-stackql-protocol: graphql + set_under_attack_mode: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_configs&__method=set_under_attack_mode/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($duration_seconds: Int, $enabled: Boolean!, $environment_id: String!, $service_id: String!) { setServiceUnderAttackMode(input: { durationSeconds: $duration_seconds, enabled: $enabled, environmentId: $environment_id, serviceId: $service_id }) { caching { default_ttl_seconds: defaultTtlSeconds html_caching: htmlCaching mode purge_on_deploy: purgeOnDeploy } edge_rules: edgeRules enabled id overrides purge_epoch: purgeEpoch purge_epoch_by_kind: purgeEpochByKind tracing { enabled sample_rate: sampleRate } under_attack_mode_until: underAttackModeUntil } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "duration_seconds" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"duration_seconds":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.setServiceUnderAttackMode + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_configs&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($config: EdgeConfigInput!, $environment_id: String!, $service_id: String!) { updateServiceEdgeConfig(input: { config: $config, environmentId: $environment_id, serviceId: $service_id }) { caching { default_ttl_seconds: defaultTtlSeconds html_caching: htmlCaching mode purge_on_deploy: purgeOnDeploy } edge_rules: edgeRules enabled id overrides purge_epoch: purgeEpoch purge_epoch_by_kind: purgeEpochByKind tracing { enabled sample_rate: sampleRate } under_attack_mode_until: underAttackModeUntil } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "config" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"config":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.updateServiceEdgeConfig + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update_rules: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_configs&__method=update_rules/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($edge_rules: JSON, $environment_id: String!, $service_id: String!) { updateServiceEdgeRules(input: { edgeRules: $edge_rules, environmentId: $environment_id, serviceId: $service_id }) { caching { default_ttl_seconds: defaultTtlSeconds html_caching: htmlCaching mode purge_on_deploy: purgeOnDeploy } edge_rules: edgeRules enabled id overrides purge_epoch: purgeEpoch purge_epoch_by_kind: purgeEpochByKind tracing { enabled sample_rate: sampleRate } under_attack_mode_until: underAttackModeUntil } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "edge_rules" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"edge_rules":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.updateServiceEdgeRules + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_edge_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/service_edge_configs/methods/update' + delete: [] + replace: [] + service_edge_rule_diagnostics: + id: railway.services.service_edge_rule_diagnostics + name: service_edge_rule_diagnostics + title: Service Edge Rule Diagnostics + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_edge_rule_diagnostics&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.validateServiceEdgeRules + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_edge_rule_diagnostics/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + service_instance_auto_deploy: + id: railway.services.service_instance_auto_deploy + name: service_instance_auto_deploy + title: Service Instance Auto Deploy + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instance_auto_deploy&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.serviceInstanceAutoDeployStatus + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instance_auto_deploy&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($enabled: Boolean!, $environment_id: String!, $project_id: String!, $service_id: String!) { serviceInstanceAutoDeployUpdate(input: { enabled: $enabled, environmentId: $environment_id, projectId: $project_id, serviceId: $service_id }) { enabled } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceAutoDeployUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_instance_auto_deploy/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/service_instance_auto_deploy/methods/update' + delete: [] + replace: [] + service_instance_limit_overrides: + id: railway.services.service_instance_limit_overrides + name: service_instance_limit_overrides + title: Service Instance Limit Overrides + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instance_limit_overrides&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.serviceInstanceLimitOverride + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"serviceInstanceLimitOverride":[{"result":{{ toJson (index (index . "data") "serviceInstanceLimitOverride") }}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_instance_limit_overrides/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + service_instance_limits: + id: railway.services.service_instance_limits + name: service_instance_limits + title: Service Instance Limits + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instance_limits&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.serviceInstanceLimits + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"serviceInstanceLimits":[{"result":{{ toJson (index (index . "data") "serviceInstanceLimits") }}}]}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instance_limits&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $memory_gb: Float, $service_id: String!, $v_cp_us: Float) { serviceInstanceLimitsUpdate(input: { environmentId: $environment_id, memoryGB: $memory_gb, serviceId: $service_id, vCPUs: $v_cp_us }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "memory_gb" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"memory_gb":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "v_cp_us" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"v_cp_us":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceLimitsUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceLimitsUpdate":{"result":{{ toJson (index (index . "data") "serviceInstanceLimitsUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_instance_limits/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/service_instance_limits/methods/update' + delete: [] + replace: [] + service_instance_updatability: + id: railway.services.service_instance_updatability + name: service_instance_updatability + title: Service Instance Updatability + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instance_updatability&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.serviceInstanceIsUpdatable + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"serviceInstanceIsUpdatable":[{"result":{{ toJson (index (index . "data") "serviceInstanceIsUpdatable") }}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_instance_updatability/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + service_instances: + id: railway.services.service_instances + name: service_instances + title: Service Instances + methods: + clear_auto_update_snooze: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=clear_auto_update_snooze/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!) { serviceInstanceAutoUpdateSnoozeClear(environmentId: $environment_id, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceAutoUpdateSnoozeClear + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceAutoUpdateSnoozeClear":{"result":{{ toJson (index (index . "data") "serviceInstanceAutoUpdateSnoozeClear") }}}}}{{- end -}}' + x-stackql-protocol: graphql + deploy: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=deploy/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($commit_sha: String, $environment_id: String!, $latest_commit: Boolean, $service_id: String!) { serviceInstanceDeploy(commitSha: $commit_sha, environmentId: $environment_id, latestCommit: $latest_commit, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "commit_sha" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"commit_sha":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "latest_commit" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"latest_commit":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceDeploy + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceDeploy":{"result":{{ toJson (index (index . "data") "serviceInstanceDeploy") }}}}}{{- end -}}' + x-stackql-protocol: graphql + deploy_v2: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=deploy_v2/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($commit_sha: String, $environment_id: String!, $service_id: String!) { serviceInstanceDeployV2(commitSha: $commit_sha, environmentId: $environment_id, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "commit_sha" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"commit_sha":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceDeployV2 + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceDeployV2":{"result":{{ toJson (index (index . "data") "serviceInstanceDeployV2") }}}}}{{- end -}}' + x-stackql-protocol: graphql + dismiss_vuln_remediation: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=dismiss_vuln_remediation/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!) { serviceInstanceVulnRemediationDismiss(environmentId: $environment_id, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceVulnRemediationDismiss + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceVulnRemediationDismiss":{"result":{{ toJson (index (index . "data") "serviceInstanceVulnRemediationDismiss") }}}}}{{- end -}}' + x-stackql-protocol: graphql + generate_shell_token: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=generate_shell_token/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $instance_id: String!, $kind: String, $port: Int, $scope: String!, $service_id: String) { generateShellToken(input: { environmentId: $environment_id, instanceId: $instance_id, kind: $kind, port: $port, scope: $scope, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "kind" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"kind":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "port" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"port":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "scope" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"scope":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.generateShellToken + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"generateShellToken":{"result":{{ toJson (index (index . "data") "generateShellToken") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.serviceInstance + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environment.serviceInstances.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "environment" "serviceInstances" -}}{"data":{"environment":{"serviceInstances":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + patch_vuln_now: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=patch_vuln_now/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!) { serviceInstanceVulnRemediationPatchNow(environmentId: $environment_id, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceVulnRemediationPatchNow + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceVulnRemediationPatchNow":{"result":{{ toJson (index (index . "data") "serviceInstanceVulnRemediationPatchNow") }}}}}{{- end -}}' + x-stackql-protocol: graphql + redeploy: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=redeploy/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!) { serviceInstanceRedeploy(environmentId: $environment_id, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceRedeploy + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceRedeploy":{"result":{{ toJson (index (index . "data") "serviceInstanceRedeploy") }}}}}{{- end -}}' + x-stackql-protocol: graphql + snooze_auto_update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=snooze_auto_update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $service_id: String!, $snooze_days: Int) { serviceInstanceAutoUpdateSnooze(environmentId: $environment_id, serviceId: $service_id, snoozeDays: $snooze_days) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "snooze_days" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"snooze_days":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceAutoUpdateSnooze + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceAutoUpdateSnooze":{"result":{{ toJson (index (index . "data") "serviceInstanceAutoUpdateSnooze") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String, $build_command: String, $builder: Builder, $cron_schedule: String, $dockerfile_path: String, $draining_seconds: Int, $healthcheck_path: String, $healthcheck_timeout: Int, $ipv6_egress_enabled: Boolean, $multi_region_config: JSON, $nixpacks_plan: JSON, $num_replicas: Int, $overlap_seconds: Int, $pre_deploy_command: [String!], $pre_deploy_timeout_seconds: Int, $railway_config_file: String, $region: String, $registry_credentials: RegistryCredentialsInput, $restart_policy_max_retries: Int, $restart_policy_type: RestartPolicyType, $root_directory: String, $sleep_application: Boolean, $source: ServiceSourceInput, $start_command: String, $watch_patterns: [String!], $service_id: String!) { serviceInstanceUpdate(environmentId: $environment_id, input: { buildCommand: $build_command, builder: $builder, cronSchedule: $cron_schedule, dockerfilePath: $dockerfile_path, drainingSeconds: $draining_seconds, healthcheckPath: $healthcheck_path, healthcheckTimeout: $healthcheck_timeout, ipv6EgressEnabled: $ipv6_egress_enabled, multiRegionConfig: $multi_region_config, nixpacksPlan: $nixpacks_plan, numReplicas: $num_replicas, overlapSeconds: $overlap_seconds, preDeployCommand: $pre_deploy_command, preDeployTimeoutSeconds: $pre_deploy_timeout_seconds, railwayConfigFile: $railway_config_file, region: $region, registryCredentials: $registry_credentials, restartPolicyMaxRetries: $restart_policy_max_retries, restartPolicyType: $restart_policy_type, rootDirectory: $root_directory, sleepApplication: $sleep_application, source: $source, startCommand: $start_command, watchPatterns: $watch_patterns }, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "build_command" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"build_command":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "builder" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"builder":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "cron_schedule" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"cron_schedule":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "dockerfile_path" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"dockerfile_path":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "draining_seconds" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"draining_seconds":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "healthcheck_path" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"healthcheck_path":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "healthcheck_timeout" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"healthcheck_timeout":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "ipv6_egress_enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"ipv6_egress_enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "multi_region_config" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"multi_region_config":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "nixpacks_plan" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"nixpacks_plan":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "num_replicas" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"num_replicas":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "overlap_seconds" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"overlap_seconds":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "pre_deploy_command" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"pre_deploy_command":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "pre_deploy_timeout_seconds" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"pre_deploy_timeout_seconds":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "railway_config_file" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"railway_config_file":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "region" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"region":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "registry_credentials" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"registry_credentials":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "restart_policy_max_retries" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"restart_policy_max_retries":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "restart_policy_type" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"restart_policy_type":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_directory" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_directory":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "sleep_application" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"sleep_application":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "source" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "start_command" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"start_command":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "watch_patterns" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"watch_patterns":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceUpdate":{"result":{{ toJson (index (index . "data") "serviceInstanceUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update_auto_update_schedule: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=service_instances&__method=update_auto_update_schedule/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $schedule: [AutoUpdateScheduleWindowInput!]!, $service_id: String!) { serviceInstanceAutoUpdateScheduleUpdate(environmentId: $environment_id, schedule: $schedule, serviceId: $service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "schedule" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"schedule":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceInstanceAutoUpdateScheduleUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceInstanceAutoUpdateScheduleUpdate":{"result":{{ toJson (index (index . "data") "serviceInstanceAutoUpdateScheduleUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_instances/methods/get' + - $ref: '#/components/x-stackQL-resources/service_instances/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/service_instances/methods/update' + delete: [] + replace: [] + services: + id: railway.services.services + name: services + title: Services + methods: + add_feature_flag: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=add_feature_flag/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flag: ActiveServiceFeatureFlag!, $service_id: String!) { serviceFeatureFlagAdd(input: { flag: $flag, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceFeatureFlagAdd + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceFeatureFlagAdd":{"result":{{ toJson (index (index . "data") "serviceFeatureFlagAdd") }}}}}{{- end -}}' + x-stackql-protocol: graphql + connect: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=connect/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $branch: String, $image: String, $repo: String) { serviceConnect(id: $id, input: { branch: $branch, image: $image, repo: $repo }) { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "branch" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"branch":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "image" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"image":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "repo" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"repo":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceConnect + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($branch: String, $environment_id: String, $icon: String, $name: String, $project_id: String!, $registry_credentials: RegistryCredentialsInput, $source: ServiceSourceInput, $template_id: String, $template_service_id: String, $variables: EnvironmentVariables) { serviceCreate(input: { branch: $branch, environmentId: $environment_id, icon: $icon, name: $name, projectId: $project_id, registryCredentials: $registry_credentials, source: $source, templateId: $template_id, templateServiceId: $template_service_id, variables: $variables }) { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "branch" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"branch":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "icon" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"icon":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "registry_credentials" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"registry_credentials":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "source" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "template_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"template_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "template_service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"template_service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "variables" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"variables":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String, $id: String!) { serviceDelete(environmentId: $environment_id, id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceDelete":{"result":{{ toJson (index (index . "data") "serviceDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + disconnect: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=disconnect/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { serviceDisconnect(id: $id) { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceDisconnect + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.service + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.project.services.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "project" "services" -}}{"data":{"project":{"services":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + remove_feature_flag: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=remove_feature_flag/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($flag: ActiveServiceFeatureFlag!, $service_id: String!) { serviceFeatureFlagRemove(input: { flag: $flag, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "flag" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"flag":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceFeatureFlagRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"serviceFeatureFlagRemove":{"result":{{ toJson (index (index . "data") "serviceFeatureFlagRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + remove_upstream_url: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=remove_upstream_url/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { serviceRemoveUpstreamUrl(id: $id) { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceRemoveUpstreamUrl + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=services&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $auto_instrumentation_enabled: Boolean, $icon: String, $name: String, $tracing_enabled: Boolean) { serviceUpdate(id: $id, input: { autoInstrumentationEnabled: $auto_instrumentation_enabled, icon: $icon, name: $name, tracingEnabled: $tracing_enabled }) { auto_instrumentation_enabled: autoInstrumentationEnabled created_at: createdAt deleted_at: deletedAt feature_flags: featureFlags group_id: groupId has_hidden_registry_credentials_from_template: hasHiddenRegistryCredentialsFromTemplate icon id is_restricted: isRestricted name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId template_id: templateId template_service_id: templateServiceId template_thread_slug: templateThreadSlug tracing_enabled: tracingEnabled updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "auto_instrumentation_enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"auto_instrumentation_enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "icon" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"icon":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "tracing_enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"tracing_enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.serviceUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/services/methods/get' + - $ref: '#/components/x-stackQL-resources/services/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/services/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/services/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/services/methods/delete' + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/storage.yaml b/providers/src/railway/v00.00.00000/services/storage.yaml new file mode 100644 index 00000000..6c869cdf --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/storage.yaml @@ -0,0 +1,2476 @@ +openapi: 3.0.3 +info: + title: Storage API + description: Volumes, volume instances, backups and backup schedules, point-in-time recovery, and object storage buckets with their credentials. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=bucket_instances&__method=get: + post: + operationId: bucket_instances_get + summary: Get the S3-compatible credentials for a bucket + description: Get the S3-compatible credentials for a bucket. Backed by the Railway GraphQL query bucketInstanceDetails. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.bucket_instances.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { bucketInstanceDetails(bucketId: "{{ .bucket_id }}" environmentId: "{{ .environment_id }}") { object_count: objectCount size_bytes: sizeBytes } }' + x-stackql-protocol: graphql + parameters: + - name: bucket_id + in: query + required: true + schema: + type: string + - name: environment_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One BucketInstanceDetails row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + bucketInstanceDetails: + $ref: '#/components/schemas/BucketInstanceDetails' + /graphql/v2?__resource=bucket_s3_credentials&__method=list: + post: + operationId: bucket_s3_credentials_list + summary: Get the S3-compatible credentials for a bucket + description: Get the S3-compatible credentials for a bucket. Backed by the Railway GraphQL query bucketS3Credentials. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.bucket_s3_credentials.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.bucketS3Credentials[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { bucketS3Credentials(bucketId: "{{ .bucket_id }}" environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}") { access_key_id: accessKeyId bucket_name: bucketName created_at: createdAt endpoint region secret_access_key: secretAccessKey url_style: urlStyle } }' + x-stackql-protocol: graphql + parameters: + - name: bucket_id + in: query + required: true + schema: + type: string + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per BucketS3CompatibleCredentials. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + bucketS3Credentials: + type: array + items: + $ref: '#/components/schemas/BucketS3CompatibleCredentials' + /graphql/v2?__resource=bucket_s3_credentials&__method=reset: + post: + operationId: bucket_s3_credentials_reset + summary: Reset the credentials for a bucket in an environment + description: Reset the credentials for a bucket in an environment. Backed by the Railway GraphQL mutation bucketCredentialsReset. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - bucket_id + - environment_id + - project_id + properties: + bucket_id: + type: string + environment_id: + type: string + project_id: + type: string + redeploy_dependents: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + responses: + '200': + description: The BucketS3CompatibleCredentials the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + bucketCredentialsReset: + $ref: '#/components/schemas/BucketS3CompatibleCredentials' + /graphql/v2?__resource=buckets&__method=create: + post: + operationId: buckets_create + summary: Create a bucket in a project + description: Create a bucket in a project. Backed by the Railway GraphQL mutation bucketCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + properties: + environment_id: + type: string + description: '[unimplemented] The environment to deploy the bucket instances into. If `null`, the bucket will not be deployed to any environment. `undefined` will deploy to all environments.' + name: + type: string + description: The name of the bucket. + project_id: + type: string + description: The project to create the bucket in. + responses: + '200': + description: The Bucket the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + bucketCreate: + $ref: '#/components/schemas/Bucket' + /graphql/v2?__resource=buckets&__method=list: + post: + operationId: buckets_list + summary: Lists Bucket objects of a Project + description: Lists Bucket objects of a Project. Backed by the Railway GraphQL query project.buckets. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.buckets.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.project.buckets.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.project.buckets.pageInfo.endCursor + terminateOnJsonPath: $.data.project.buckets.pageInfo.hasNextPage + query: 'query { project(id: "{{ .project_id }}") { buckets(first: 100{{ .cursor }}) { edges { node { created_at: createdAt deleted_at: deletedAt group_id: groupId id name parent_service_id: parentServiceId project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Bucket. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + project: + type: object + properties: + buckets: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Bucket' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=buckets&__method=update: + post: + operationId: buckets_update + summary: Updates a bucket + description: Updates a bucket. Backed by the Railway GraphQL mutation bucketUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - name + properties: + id: + type: string + name: + type: string + responses: + '200': + description: The Bucket the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + bucketUpdate: + $ref: '#/components/schemas/Bucket' + /graphql/v2?__resource=mysql_pitr_restorable_windows&__method=get: + post: + operationId: mysql_pitr_restorable_windows_get + summary: 'The point-in-time window a MySQL service''s binlog archive can restore to, resolved from the archive bucket: the oldest full backup (floor), the newest shipped binlog (ceiling) and every full backup''s timestamp' + description: 'The point-in-time window a MySQL service''s binlog archive can restore to, resolved from the archive bucket: the oldest full backup (floor), the newest shipped binlog (ceiling) and every full backup''s timestamp. archiveConfigured is false when the service carries no complete BINLOG_ARCHIVE_* contract. Backed by the Railway GraphQL query mysqlPitrRestorableWindow.' + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.mysql_pitr_restorable_windows.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { mysqlPitrRestorableWindow(environmentId: "{{ .environment_id }}" serviceId: "{{ .service_id }}") { archive_configured: archiveConfigured ceiling_at: ceilingAt fetched_at: fetchedAt floor_at: floorAt full_backup_count: fullBackupCount full_backups_taken_at: fullBackupsTakenAt lineage_count: lineageCount listing_truncated: listingTruncated } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One MysqlPitrRestorableWindow row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + mysqlPitrRestorableWindow: + $ref: '#/components/schemas/MysqlPitrRestorableWindow' + /graphql/v2?__resource=pitr_ha_clusters&__method=disable_pitr: + post: + operationId: pitr_ha_clusters_disable_pitr + summary: Disables point-in-time recovery on an HA database cluster with the same rolling rollout as enable + description: Disables point-in-time recovery on an HA database cluster with the same rolling rollout as enable. The backup bucket is left intact, so existing backup history is preserved. Backed by the Railway GraphQL mutation disablePitrForHaCluster. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - root_service_id + properties: + environment_id: + type: string + description: Environment containing the cluster. + project_id: + type: string + description: Project containing the cluster (returned in payload). + root_service_id: + type: string + description: Root service of the HA Postgres cluster. + responses: + '200': + description: The TemplateDeployPayload the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + disablePitrForHaCluster: + $ref: '#/components/schemas/TemplateDeployPayload' + /graphql/v2?__resource=pitr_ha_clusters&__method=enable_pitr: + post: + operationId: pitr_ha_clusters_enable_pitr + summary: Enables point-in-time recovery on an HA database cluster (Postgres HA, MySQL HA) with a rolling, near-zero-downtime rollout across its members + description: Enables point-in-time recovery on an HA database cluster (Postgres HA, MySQL HA) with a rolling, near-zero-downtime rollout across its members. Safe to retry. Backed by the Railway GraphQL mutation enablePitrForHaCluster. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - root_service_id + properties: + environment_id: + type: string + description: Environment containing the cluster. + project_id: + type: string + description: Project containing the cluster (returned in payload). + root_service_id: + type: string + description: Root service of the HA Postgres cluster. + responses: + '200': + description: The TemplateDeployPayload the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + enablePitrForHaCluster: + $ref: '#/components/schemas/TemplateDeployPayload' + /graphql/v2?__resource=pitr_ha_clusters&__method=get_replication_health: + post: + operationId: pitr_ha_clusters_get_replication_health + summary: Live replication health for an HA database cluster (Postgres HA, MySQL HA) + description: Live replication health for an HA database cluster (Postgres HA, MySQL HA). Use it to gate the Enable/Disable PITR buttons so a rollout can't start while a member is too far behind to rejoin. Returns null when the service isn't an HA root. Backed by the Railway GraphQL query pitrHaClusterReplicationHealth. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.pitr_ha_clusters.get_replication_health + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { pitrHaClusterReplicationHealth(environmentId: "{{ .environment_id }}" rootServiceId: "{{ .root_service_id }}") { all_healthy: allHealthy checked_at: checkedAt environment_id: environmentId members { healthy is_leader: isLeader lag_mb: lagMb patroni_name: patroniName service_id: serviceId service_name: serviceName state } reachable root_service_id: rootServiceId } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: root_service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One PitrHaClusterReplicationHealth row. Live replication health of an HA database cluster's members. Used to gate the Enable/Disable PITR buttons on the same 'caught up' definition the rollout enforces. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + pitrHaClusterReplicationHealth: + $ref: '#/components/schemas/PitrHaClusterReplicationHealth' + /graphql/v2?__resource=pitr_ha_workflows&__method=cancel: + post: + operationId: pitr_ha_workflows_cancel + summary: Cancels an in-progress PITR enable/disable rollout on an HA database cluster and resets its progress so the UI re-reads from the live cluster + description: Cancels an in-progress PITR enable/disable rollout on an HA database cluster and resets its progress so the UI re-reads from the live cluster. No-ops when nothing is running. Backed by the Railway GraphQL mutation cancelPitrHaWorkflow. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - root_service_id + properties: + environment_id: + type: string + root_service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + cancelPitrHaWorkflow: + $ref: '#/components/schemas/CancelPitrHaWorkflowResult' + /graphql/v2?__resource=pitr_ha_workflows&__method=clear_progress: + post: + operationId: pitr_ha_workflows_clear_progress + summary: Clears the recorded progress of a finished PITR enable/disable rollout so the Backups page starts fresh + description: Clears the recorded progress of a finished PITR enable/disable rollout so the Backups page starts fresh. A rollout still in progress cannot be cleared. Backed by the Railway GraphQL mutation clearPitrHaWorkflowProgress. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - root_service_id + properties: + environment_id: + type: string + root_service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + clearPitrHaWorkflowProgress: + $ref: '#/components/schemas/ClearPitrHaWorkflowProgressResult' + /graphql/v2?__resource=pitr_ha_workflows&__method=get_progress: + post: + operationId: pitr_ha_workflows_get_progress + summary: One-shot read of the current progress of a PITR enable/disable rollout on an HA database cluster + description: One-shot read of the current progress of a PITR enable/disable rollout on an HA database cluster. Use it to rehydrate state on page load, then poll this field for updates. Returns null when no rollout has run recently. Backed by the Railway GraphQL query pitrHaWorkflowProgress. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.pitr_ha_workflows.get_progress + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { pitrHaWorkflowProgress(environmentId: "{{ .environment_id }}" rootServiceId: "{{ .root_service_id }}") { cluster_mutated: clusterMutated completed_at: completedAt current_member_service_id: currentMemberServiceId direction engine environment_id: environmentId error_message: errorMessage failed_at_phase: failedAtPhase members { is_leader: isLeader service_id: serviceId service_name: serviceName status } new_leader_service_id: newLeaderServiceId phase project_id: projectId root_service_id: rootServiceId started_at: startedAt updated_at: updatedAt workflow_id: workflowId } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: root_service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One PitrHaWorkflowProgress row. Progress of an in-flight or recently completed PITR enable/disable rollout on an HA database cluster. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + pitrHaWorkflowProgress: + $ref: '#/components/schemas/PitrHaWorkflowProgress' + /graphql/v2?__resource=volume_instance_backup_schedules&__method=list: + post: + operationId: volume_instance_backup_schedules_list + summary: List backups schedules of a volume instance + description: List backups schedules of a volume instance. Backed by the Railway GraphQL query volumeInstanceBackupScheduleList. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.volume_instance_backup_schedules.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.volumeInstanceBackupScheduleList[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { volumeInstanceBackupScheduleList(volumeInstanceId: "{{ .volume_instance_id }}") { created_at: createdAt cron id kind name retention_seconds: retentionSeconds } }' + x-stackql-protocol: graphql + parameters: + - name: volume_instance_id + in: query + required: true + description: The id of the volume instance to list the schedules of. + schema: + type: string + responses: + '200': + description: One row per VolumeInstanceBackupSchedule. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceBackupScheduleList: + type: array + items: + $ref: '#/components/schemas/VolumeInstanceBackupSchedule' + /graphql/v2?__resource=volume_instance_backup_schedules&__method=update: + post: + operationId: volume_instance_backup_schedules_update + summary: Manage schedule for backups of a volume instance + description: Manage schedule for backups of a volume instance. Backed by the Railway GraphQL mutation volumeInstanceBackupScheduleUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - kinds + - volume_instance_id + properties: + kinds: + type: array + items: + type: string + enum: + - DAILY + - MONTHLY + - WEEKLY + description: The frequency/retention of the backups. + volume_instance_id: + type: string + description: The id of the volume instance to create a backup of. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceBackupScheduleUpdate: + $ref: '#/components/schemas/VolumeInstanceBackupScheduleUpdateResult' + /graphql/v2?__resource=volume_instance_backups&__method=create: + post: + operationId: volume_instance_backups_create + summary: Create backup of a volume instance + description: Create backup of a volume instance. Backed by the Railway GraphQL mutation volumeInstanceBackupCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - volume_instance_id + properties: + name: + type: string + description: Optional name/label for the backup. Defaults to 'Manual' if not provided. + volume_instance_id: + type: string + description: The id of the volume instance to create a backup of. + responses: + '200': + description: The WorkflowId the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceBackupCreate: + $ref: '#/components/schemas/WorkflowId' + /graphql/v2?__resource=volume_instance_backups&__method=delete: + post: + operationId: volume_instance_backups_delete + summary: Deletes volume instance backup + description: Deletes volume instance backup. Backed by the Railway GraphQL mutation volumeInstanceBackupDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - volume_instance_backup_id + - volume_instance_id + properties: + volume_instance_backup_id: + type: string + description: The volume instance's backup id. + volume_instance_id: + type: string + description: The volume instance's id. + responses: + '200': + description: The WorkflowId the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceBackupDelete: + $ref: '#/components/schemas/WorkflowId' + /graphql/v2?__resource=volume_instance_backups&__method=list: + post: + operationId: volume_instance_backups_list + summary: List backups of a volume instance + description: List backups of a volume instance. Backed by the Railway GraphQL query volumeInstanceBackupList. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.volume_instance_backups.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.volumeInstanceBackupList[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { volumeInstanceBackupList(volumeInstanceId: "{{ .volume_instance_id }}") { created_at: createdAt creator_id: creatorId expires_at: expiresAt external_id: externalId id name referenced_mb: referencedMB schedule_id: scheduleId used_mb: usedMB volume_instance_size_mb: volumeInstanceSizeMB } }' + x-stackql-protocol: graphql + parameters: + - name: volume_instance_id + in: query + required: true + description: The id of the volume instance to list the backups of. + schema: + type: string + responses: + '200': + description: One row per VolumeInstanceBackup. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceBackupList: + type: array + items: + $ref: '#/components/schemas/VolumeInstanceBackup' + /graphql/v2?__resource=volume_instance_backups&__method=lock: + post: + operationId: volume_instance_backups_lock + summary: Removes backup expiration date + description: Removes backup expiration date. Backed by the Railway GraphQL mutation volumeInstanceBackupLock. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - volume_instance_backup_id + - volume_instance_id + properties: + volume_instance_backup_id: + type: string + description: The id of the backup to lock. + volume_instance_id: + type: string + description: The id of the volume instance to be restored from. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceBackupLock: + $ref: '#/components/schemas/VolumeInstanceBackupLockResult' + /graphql/v2?__resource=volume_instance_backups&__method=restore: + post: + operationId: volume_instance_backups_restore + summary: Restore a volume instance from a backup + description: Restore a volume instance from a backup. Backed by the Railway GraphQL mutation volumeInstanceBackupRestore. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - volume_instance_backup_id + - volume_instance_id + properties: + replica_service_ids: + type: array + items: + type: string + description: 'Optional: for HA cluster restores, service IDs of replicas that should also receive the backup.' + volume_instance_backup_id: + type: string + description: The id of the backup to be restored from. + volume_instance_id: + type: string + description: The id of the volume instance to be restored from. + wipe_service_ids: + type: array + items: + type: string + description: Service IDs whose volumes should be wiped (replaced with fresh empty volumes) as part of this restore. + responses: + '200': + description: The WorkflowId the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceBackupRestore: + $ref: '#/components/schemas/WorkflowId' + /graphql/v2?__resource=volume_instance_pitr_restore_estimates&__method=get: + post: + operationId: volume_instance_pitr_restore_estimates_get + summary: Estimated destination-volume scratch a PITR restore of this volume instance to a target would need, and whether it fits the workspace plan's max volume size + description: Estimated destination-volume scratch a PITR restore of this volume instance to a target would need, and whether it fits the workspace plan's max volume size. Read-only pre-check the restore dialog calls to warn before a restore that would fill the disk mid-replay; returns null when no estimate can be formed (non-pgBackRest source, incomplete archive creds, or a target before the earliest backup). Backed by the Railway GraphQL query volumeInstancePitrRestoreEstimate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.volume_instance_pitr_restore_estimates.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { volumeInstancePitrRestoreEstimate({{ if .source_repo_path }}sourceRepoPath: "{{ .source_repo_path }}" {{ end }}targetTimestamp: "{{ .target_timestamp }}" volumeInstanceId: "{{ .volume_instance_id }}") { base_backup_label: baseBackupLabel data_mb: dataMB estimated_scratch_mb: estimatedScratchMB likely_to_fit: likelyToFit plan_max_size_mb: planMaxSizeMB wal_mb: walMB } }' + x-stackql-protocol: graphql + parameters: + - name: source_repo_path + in: query + required: false + description: Multi-history picker's selected archive sub-prefix, matching the restore mutation's argument. Pass null for the source's current history. + schema: + type: string + - name: target_timestamp + in: query + required: true + description: Point-in-time target the estimate is computed for. + schema: + type: string + format: date-time + - name: volume_instance_id + in: query + required: true + description: The id of the source volume instance to restore from. + schema: + type: string + responses: + '200': + description: 'One PitrRestoreScratchEstimate row. Estimated destination-volume scratch a PITR restore to a target needs: the base backup''s data plus every WAL segment replayed from that backup to the target (Postgres holds replayed WAL in pg_wal faster than restartpoints recycle it). A conservative over-estimate for a non-blocking pre-restore warning — not a gate.' + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstancePitrRestoreEstimate: + $ref: '#/components/schemas/PitrRestoreScratchEstimate' + /graphql/v2?__resource=volume_instances&__method=get: + post: + operationId: volume_instances_get + summary: Get a single volume instance by id + description: Get a single volume instance by id. Backed by the Railway GraphQL query volumeInstance. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.volume_instances.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { volumeInstance(id: "{{ .id }}") { created_at: createdAt current_size_mb: currentSizeMB deleted_at: deletedAt environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId external_id: externalId id is_pending_deletion: isPendingDeletion mount_path: mountPath region service_id: serviceId size_mb: sizeMB state volume { created_at: createdAt id name project_id: projectId } volume_id: volumeId } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One VolumeInstance row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstance: + $ref: '#/components/schemas/VolumeInstance' + /graphql/v2?__resource=volume_instances&__method=list: + post: + operationId: volume_instances_list + summary: Lists VolumeInstance objects of a Environment + description: Lists VolumeInstance objects of a Environment. Backed by the Railway GraphQL query environment.volumeInstances. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.volume_instances.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environment.volumeInstances.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.environment.volumeInstances.pageInfo.endCursor + terminateOnJsonPath: $.data.environment.volumeInstances.pageInfo.hasNextPage + query: 'query { environment(id: "{{ .environment_id }}" {{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}) { volumeInstances(first: 100{{ .cursor }}) { edges { node { created_at: createdAt current_size_mb: currentSizeMB deleted_at: deletedAt environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId external_id: externalId id is_pending_deletion: isPendingDeletion mount_path: mountPath region service_id: serviceId size_mb: sizeMB state volume { created_at: createdAt id name project_id: projectId } volume_id: volumeId } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per VolumeInstance. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environment: + type: object + properties: + volumeInstances: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/VolumeInstance' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=volume_instances&__method=pitr_restore: + post: + operationId: volume_instances_pitr_restore + summary: Point-in-time restore + description: Point-in-time restore. Creates a brand-new database service in the project, recovered to the target timestamp from the source service's backup history. The source service stays online and untouched. Backed by the Railway GraphQL mutation volumeInstancePITRRestore. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - target_timestamp + - volume_instance_id + properties: + new_service_name: + type: string + description: Optional name for the new restored service. Defaults to '-restored-YYYYMMDD-HHMM'. + source_repo_path: + type: string + description: Opaque identifier for one archive history, from the multi-history picker when the source bucket holds more than one. It scopes both the restore-window pre-check and the restored fork's archive source, treating the selected history as frozen. Pass null to restore the source's current history. + target_timestamp: + type: string + format: date-time + description: Point-in-time target. Must be within the available restore window. + volume_instance_id: + type: string + description: The id of the volume instance to restore from. + responses: + '200': + description: The WorkflowId the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstancePITRRestore: + $ref: '#/components/schemas/WorkflowId' + /graphql/v2?__resource=volume_instances&__method=update: + post: + operationId: volume_instances_update + summary: Update a volume instance + description: Update a volume instance. If no environmentId is provided, all volume instances for the volume will be updated. Backed by the Railway GraphQL mutation volumeInstanceUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - volume_id + properties: + environment_id: + type: string + description: The environment of the volume instance to update. If null, all instances for the volume will be updated. + mount_path: + type: string + description: The mount path of the volume instance. If not provided, the mount path will not be updated. + service_id: + type: string + description: The service to attach the volume to. If not provided, the volume will be disconnected. + state: + type: string + enum: + - DELETED + - DELETING + - ERROR + - MIGRATING + - MIGRATION_PENDING + - READY + - RESTORING + - UPDATING + description: The state of the volume instance. If not provided, the state will not be updated. + volume_id: + type: string + description: The id of the volume to update. + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeInstanceUpdate: + $ref: '#/components/schemas/VolumeInstanceUpdateResult' + /graphql/v2?__resource=volumes&__method=create: + post: + operationId: volumes_create + summary: Create a persistent volume in a project + description: Create a persistent volume in a project. Backed by the Railway GraphQL mutation volumeCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - mount_path + - project_id + properties: + environment_id: + type: string + description: The environment to deploy the volume instances into. If `null`, the volume will not be deployed to any environment. `undefined` will deploy to all environments. + mount_path: + type: string + description: The path in the container to mount the volume to. + project_id: + type: string + description: The project to create the volume in. + region: + type: string + description: The region to create the volume instances in. If not provided, the default region will be used. + service_id: + type: string + description: The service to attach the volume to. If not provided, the volume will be disconnected. + responses: + '200': + description: The Volume the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeCreate: + $ref: '#/components/schemas/Volume' + /graphql/v2?__resource=volumes&__method=delete: + post: + operationId: volumes_delete + summary: Delete a persistent volume in a project + description: Delete a persistent volume in a project. Backed by the Railway GraphQL mutation volumeDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - volume_id + properties: + volume_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeDelete: + $ref: '#/components/schemas/VolumeDeleteResult' + /graphql/v2?__resource=volumes&__method=list: + post: + operationId: volumes_list + summary: Lists Volume objects of a Project + description: Lists Volume objects of a Project. Backed by the Railway GraphQL query project.volumes. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.volumes.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.project.volumes.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.project.volumes.pageInfo.endCursor + terminateOnJsonPath: $.data.project.volumes.pageInfo.hasNextPage + query: 'query { project(id: "{{ .project_id }}") { volumes(first: 100{{ .cursor }}) { edges { node { created_at: createdAt id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Volume. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + project: + type: object + properties: + volumes: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Volume' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=volumes&__method=update: + post: + operationId: volumes_update + summary: Update a persistent volume in a project + description: Update a persistent volume in a project. Backed by the Railway GraphQL mutation volumeUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - volume_id + properties: + name: + type: string + description: The name of the volume. + volume_id: + type: string + responses: + '200': + description: The Volume the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + volumeUpdate: + $ref: '#/components/schemas/Volume' + /graphql/v2?__resource=workflow_status&__method=get: + post: + operationId: workflow_status_get + summary: Gets the status of a workflow + description: Gets the status of a workflow. Backed by the Railway GraphQL query workflowStatus. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.storage.workflow_status.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workflowStatus(workflowId: "{{ .workflow_id }}") { error status } }' + x-stackql-protocol: graphql + parameters: + - name: workflow_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One WorkflowResult row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workflowStatus: + $ref: '#/components/schemas/WorkflowResult' +components: + schemas: + Bucket: + type: object + properties: + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + group_id: + type: string + id: + type: string + name: + type: string + parent_service_id: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + updated_at: + type: string + format: date-time + BucketInstanceDetails: + type: object + properties: + object_count: + type: string + size_bytes: + type: string + BucketS3CompatibleCredentials: + type: object + properties: + access_key_id: + type: string + bucket_name: + type: string + created_at: + type: string + format: date-time + endpoint: + type: string + region: + type: string + secret_access_key: + type: string + url_style: + type: string + CancelPitrHaWorkflowResult: + type: object + properties: + result: + type: boolean + description: Value returned by the cancelPitrHaWorkflow mutation (Boolean!) + ClearPitrHaWorkflowProgressResult: + type: object + properties: + result: + type: boolean + description: Value returned by the clearPitrHaWorkflowProgress mutation (Boolean!) + MysqlPitrRestorableWindow: + type: object + properties: + archive_configured: + type: boolean + ceiling_at: + type: string + fetched_at: + type: string + floor_at: + type: string + full_backup_count: + type: integer + full_backups_taken_at: + type: array + items: + type: string + lineage_count: + type: integer + listing_truncated: + type: boolean + PitrHaClusterReplicationHealth: + type: object + properties: + all_healthy: + type: boolean + checked_at: + type: string + environment_id: + type: string + members: + type: array + items: + type: object + properties: + healthy: + type: boolean + is_leader: + type: boolean + lag_mb: + type: integer + patroni_name: + type: string + service_id: + type: string + service_name: + type: string + state: + type: string + description: List of PitrHaMemberReplicationHealth objects + reachable: + type: boolean + root_service_id: + type: string + PitrHaWorkflowProgress: + type: object + properties: + cluster_mutated: + type: boolean + completed_at: + type: string + current_member_service_id: + type: string + direction: + type: string + enum: + - DISABLE + - ENABLE + engine: + type: string + environment_id: + type: string + error_message: + type: string + failed_at_phase: + type: string + enum: + - CREATING_BUCKET + - DONE + - FAILED + - PATCHING_DCS + - PLANNING + - REMOVING_VARIABLES + - ROLLING_EX_LEADER + - ROLLING_REPLICAS + - SWITCHING_OVER + - VERIFYING + - WRITING_VARIABLES + members: + type: array + items: + type: object + properties: + is_leader: + type: boolean + service_id: + type: string + service_name: + type: string + status: + type: string + enum: + - HEALTHY + - PENDING + - RESTARTING + - SKIPPED + description: List of PitrHaWorkflowMemberProgress objects + new_leader_service_id: + type: string + phase: + type: string + enum: + - CREATING_BUCKET + - DONE + - FAILED + - PATCHING_DCS + - PLANNING + - REMOVING_VARIABLES + - ROLLING_EX_LEADER + - ROLLING_REPLICAS + - SWITCHING_OVER + - VERIFYING + - WRITING_VARIABLES + project_id: + type: string + root_service_id: + type: string + started_at: + type: string + updated_at: + type: string + workflow_id: + type: string + PitrRestoreScratchEstimate: + type: object + properties: + base_backup_label: + type: string + data_mb: + type: integer + estimated_scratch_mb: + type: integer + likely_to_fit: + type: boolean + plan_max_size_mb: + type: integer + wal_mb: + type: integer + TemplateDeployPayload: + type: object + properties: + operation_id: + type: string + project_id: + type: string + workflow_id: + type: string + Volume: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + name: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + VolumeDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the volumeDelete mutation (Boolean!) + VolumeInstance: + type: object + properties: + created_at: + type: string + format: date-time + current_size_mb: + type: number + deleted_at: + type: string + format: date-time + environment: + type: object + properties: + can_access: + type: boolean + config_etag: + type: string + description: Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + id: + type: string + is_ephemeral: + type: boolean + name: + type: string + project_id: + type: string + unmerged_changes_count: + type: integer + updated_at: + type: string + format: date-time + description: Environment object + environment_id: + type: string + external_id: + type: string + id: + type: string + is_pending_deletion: + type: boolean + mount_path: + type: string + region: + type: string + service_id: + type: string + size_mb: + type: integer + state: + type: string + enum: + - DELETED + - DELETING + - ERROR + - MIGRATING + - MIGRATION_PENDING + - READY + - RESTORING + - UPDATING + volume: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + name: + type: string + project_id: + type: string + description: Volume object + volume_id: + type: string + VolumeInstanceBackup: + type: object + properties: + created_at: + type: string + format: date-time + creator_id: + type: string + expires_at: + type: string + format: date-time + external_id: + type: string + id: + type: string + name: + type: string + referenced_mb: + type: integer + schedule_id: + type: string + used_mb: + type: integer + volume_instance_size_mb: + type: integer + VolumeInstanceBackupLockResult: + type: object + properties: + result: + type: boolean + description: Value returned by the volumeInstanceBackupLock mutation (Boolean!) + VolumeInstanceBackupSchedule: + type: object + properties: + created_at: + type: string + format: date-time + cron: + type: string + id: + type: string + kind: + type: string + enum: + - DAILY + - MONTHLY + - WEEKLY + name: + type: string + retention_seconds: + type: integer + VolumeInstanceBackupScheduleUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the volumeInstanceBackupScheduleUpdate mutation (Boolean!) + VolumeInstanceUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the volumeInstanceUpdate mutation (Boolean!) + WorkflowId: + type: object + properties: + archive_continuity_unverified_reason: + type: string + description: Why MySQL archive continuity could not be verified. The restore remains allowed and its image performs the authoritative replay check. + archive_continuity_verified: + type: boolean + description: For MySQL PITR restores, whether archive continuity was verified before the workflow started. + workflow_id: + type: string + WorkflowResult: + type: object + properties: + error: + type: string + status: + type: string + enum: + - Complete + - Error + - NotFound + - Running + x-stackQL-resources: + bucket_instances: + id: railway.storage.bucket_instances + name: bucket_instances + title: Bucket Instances + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=bucket_instances&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.bucketInstanceDetails + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/bucket_instances/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + bucket_s3_credentials: + id: railway.storage.bucket_s3_credentials + name: bucket_s3_credentials + title: Bucket S3 Credentials + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=bucket_s3_credentials&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.bucketS3Credentials + x-stackql-protocol: graphql + reset: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=bucket_s3_credentials&__method=reset/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($bucket_id: String!, $environment_id: String!, $project_id: String!, $redeploy_dependents: Boolean) { bucketCredentialsReset(bucketId: $bucket_id, environmentId: $environment_id, projectId: $project_id, redeployDependents: $redeploy_dependents) { access_key_id: accessKeyId bucket_name: bucketName created_at: createdAt endpoint region secret_access_key: secretAccessKey url_style: urlStyle } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "bucket_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"bucket_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "redeploy_dependents" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"redeploy_dependents":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.bucketCredentialsReset + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/bucket_s3_credentials/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + buckets: + id: railway.storage.buckets + name: buckets + title: Buckets + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=buckets&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String, $name: String, $project_id: String!) { bucketCreate(input: { environmentId: $environment_id, name: $name, projectId: $project_id }) { created_at: createdAt deleted_at: deletedAt group_id: groupId id name parent_service_id: parentServiceId project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.bucketCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=buckets&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.project.buckets.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "project" "buckets" -}}{"data":{"project":{"buckets":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=buckets&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $name: String!) { bucketUpdate(id: $id, input: { name: $name }) { created_at: createdAt deleted_at: deletedAt group_id: groupId id name parent_service_id: parentServiceId project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.bucketUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/buckets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/buckets/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/buckets/methods/update' + delete: [] + replace: [] + mysql_pitr_restorable_windows: + id: railway.storage.mysql_pitr_restorable_windows + name: mysql_pitr_restorable_windows + title: Mysql Pitr Restorable Windows + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=mysql_pitr_restorable_windows&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.mysqlPitrRestorableWindow + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/mysql_pitr_restorable_windows/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + pitr_ha_clusters: + id: railway.storage.pitr_ha_clusters + name: pitr_ha_clusters + title: Pitr Ha Clusters + methods: + disable_pitr: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=pitr_ha_clusters&__method=disable_pitr/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $project_id: String!, $root_service_id: String!) { disablePitrForHaCluster(input: { environmentId: $environment_id, projectId: $project_id, rootServiceId: $root_service_id }) { operation_id: operationId project_id: projectId workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.disablePitrForHaCluster + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + enable_pitr: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=pitr_ha_clusters&__method=enable_pitr/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $project_id: String!, $root_service_id: String!) { enablePitrForHaCluster(input: { environmentId: $environment_id, projectId: $project_id, rootServiceId: $root_service_id }) { operation_id: operationId project_id: projectId workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.enablePitrForHaCluster + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get_replication_health: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=pitr_ha_clusters&__method=get_replication_health/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.pitrHaClusterReplicationHealth + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pitr_ha_clusters/methods/get_replication_health' + insert: [] + update: [] + delete: [] + replace: [] + pitr_ha_workflows: + id: railway.storage.pitr_ha_workflows + name: pitr_ha_workflows + title: Pitr Ha Workflows + methods: + cancel: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=pitr_ha_workflows&__method=cancel/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $root_service_id: String!) { cancelPitrHaWorkflow(environmentId: $environment_id, rootServiceId: $root_service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.cancelPitrHaWorkflow + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"cancelPitrHaWorkflow":{"result":{{ toJson (index (index . "data") "cancelPitrHaWorkflow") }}}}}{{- end -}}' + x-stackql-protocol: graphql + clear_progress: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=pitr_ha_workflows&__method=clear_progress/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $root_service_id: String!) { clearPitrHaWorkflowProgress(environmentId: $environment_id, rootServiceId: $root_service_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.clearPitrHaWorkflowProgress + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"clearPitrHaWorkflowProgress":{"result":{{ toJson (index (index . "data") "clearPitrHaWorkflowProgress") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get_progress: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=pitr_ha_workflows&__method=get_progress/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.pitrHaWorkflowProgress + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pitr_ha_workflows/methods/get_progress' + insert: [] + update: [] + delete: [] + replace: [] + volume_instance_backup_schedules: + id: railway.storage.volume_instance_backup_schedules + name: volume_instance_backup_schedules + title: Volume Instance Backup Schedules + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_backup_schedules&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.volumeInstanceBackupScheduleList + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_backup_schedules&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($kinds: [VolumeInstanceBackupScheduleKind!]!, $volume_instance_id: String!) { volumeInstanceBackupScheduleUpdate(kinds: $kinds, volumeInstanceId: $volume_instance_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "kinds" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"kinds":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "volume_instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeInstanceBackupScheduleUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"volumeInstanceBackupScheduleUpdate":{"result":{{ toJson (index (index . "data") "volumeInstanceBackupScheduleUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/volume_instance_backup_schedules/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/volume_instance_backup_schedules/methods/update' + delete: [] + replace: [] + volume_instance_backups: + id: railway.storage.volume_instance_backups + name: volume_instance_backups + title: Volume Instance Backups + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_backups&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String, $volume_instance_id: String!) { volumeInstanceBackupCreate(name: $name, volumeInstanceId: $volume_instance_id) { archive_continuity_unverified_reason: archiveContinuityUnverifiedReason archive_continuity_verified: archiveContinuityVerified workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeInstanceBackupCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_backups&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($volume_instance_backup_id: String!, $volume_instance_id: String!) { volumeInstanceBackupDelete(volumeInstanceBackupId: $volume_instance_backup_id, volumeInstanceId: $volume_instance_id) { archive_continuity_unverified_reason: archiveContinuityUnverifiedReason archive_continuity_verified: archiveContinuityVerified workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "volume_instance_backup_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_backup_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeInstanceBackupDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_backups&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.volumeInstanceBackupList + x-stackql-protocol: graphql + lock: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_backups&__method=lock/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($volume_instance_backup_id: String!, $volume_instance_id: String!) { volumeInstanceBackupLock(volumeInstanceBackupId: $volume_instance_backup_id, volumeInstanceId: $volume_instance_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "volume_instance_backup_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_backup_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeInstanceBackupLock + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"volumeInstanceBackupLock":{"result":{{ toJson (index (index . "data") "volumeInstanceBackupLock") }}}}}{{- end -}}' + x-stackql-protocol: graphql + restore: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_backups&__method=restore/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($replica_service_ids: [String!], $volume_instance_backup_id: String!, $volume_instance_id: String!, $wipe_service_ids: [String!]) { volumeInstanceBackupRestore(replicaServiceIds: $replica_service_ids, volumeInstanceBackupId: $volume_instance_backup_id, volumeInstanceId: $volume_instance_id, wipeServiceIds: $wipe_service_ids) { archive_continuity_unverified_reason: archiveContinuityUnverifiedReason archive_continuity_verified: archiveContinuityVerified workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "replica_service_ids" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"replica_service_ids":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "volume_instance_backup_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_backup_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "wipe_service_ids" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"wipe_service_ids":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeInstanceBackupRestore + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/volume_instance_backups/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/volume_instance_backups/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/volume_instance_backups/methods/delete' + replace: [] + volume_instance_pitr_restore_estimates: + id: railway.storage.volume_instance_pitr_restore_estimates + name: volume_instance_pitr_restore_estimates + title: Volume Instance Pitr Restore Estimates + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instance_pitr_restore_estimates&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.volumeInstancePitrRestoreEstimate + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/volume_instance_pitr_restore_estimates/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + volume_instances: + id: railway.storage.volume_instances + name: volume_instances + title: Volume Instances + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instances&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.volumeInstance + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instances&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environment.volumeInstances.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "environment" "volumeInstances" -}}{"data":{"environment":{"volumeInstances":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + pitr_restore: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instances&__method=pitr_restore/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($new_service_name: String, $source_repo_path: String, $target_timestamp: DateTime!, $volume_instance_id: String!) { volumeInstancePITRRestore(newServiceName: $new_service_name, sourceRepoPath: $source_repo_path, targetTimestamp: $target_timestamp, volumeInstanceId: $volume_instance_id) { archive_continuity_unverified_reason: archiveContinuityUnverifiedReason archive_continuity_verified: archiveContinuityVerified workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "new_service_name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"new_service_name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "source_repo_path" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source_repo_path":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "target_timestamp" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"target_timestamp":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_instance_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_instance_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeInstancePITRRestore + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volume_instances&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String, $mount_path: String, $service_id: String, $state: VolumeState, $volume_id: String!) { volumeInstanceUpdate(environmentId: $environment_id, input: { mountPath: $mount_path, serviceId: $service_id, state: $state }, volumeId: $volume_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "mount_path" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"mount_path":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "state" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"state":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeInstanceUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"volumeInstanceUpdate":{"result":{{ toJson (index (index . "data") "volumeInstanceUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/volume_instances/methods/get' + - $ref: '#/components/x-stackQL-resources/volume_instances/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/volume_instances/methods/update' + delete: [] + replace: [] + volumes: + id: railway.storage.volumes + name: volumes + title: Volumes + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volumes&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String, $mount_path: String!, $project_id: String!, $region: String, $service_id: String) { volumeCreate(input: { environmentId: $environment_id, mountPath: $mount_path, projectId: $project_id, region: $region, serviceId: $service_id }) { created_at: createdAt id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "mount_path" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"mount_path":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "region" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"region":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volumes&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($volume_id: String!) { volumeDelete(volumeId: $volume_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "volume_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"volumeDelete":{"result":{{ toJson (index (index . "data") "volumeDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volumes&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.project.volumes.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "project" "volumes" -}}{"data":{"project":{"volumes":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=volumes&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String, $volume_id: String!) { volumeUpdate(input: { name: $name }, volumeId: $volume_id) { created_at: createdAt id name project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.volumeUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/volumes/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/volumes/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/volumes/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/volumes/methods/delete' + replace: [] + workflow_status: + id: railway.storage.workflow_status + name: workflow_status + title: Workflow Status + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workflow_status&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workflowStatus + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workflow_status/methods/get' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/templates.yaml b/providers/src/railway/v00.00.00000/services/templates.yaml new file mode 100644 index 00000000..9993d364 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/templates.yaml @@ -0,0 +1,1360 @@ +openapi: 3.0.3 +info: + title: Templates API + description: 'Templates: search, details, services, metrics, deployment, publishing and workspace templates.' + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=template_counts&__method=get: + post: + operationId: template_counts_get + summary: Count all published templates + description: Count all published templates. Backed by the Railway GraphQL query templatesCount. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.template_counts.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.templatesCount[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: query { templatesCount } + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row carrying the value as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templatesCount: + type: array + items: + $ref: '#/components/schemas/TemplatesCountResult' + /graphql/v2?__resource=template_metrics&__method=get: + post: + operationId: template_metrics_get + summary: Get the metrics for a template + description: Get the metrics for a template. Backed by the Railway GraphQL query templateMetrics. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.template_metrics.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { templateMetrics(id: "{{ .id }}") { active_deployments: activeDeployments deployments_last90_days: deploymentsLast90Days earnings_last30_days: earningsLast30Days earnings_last90_days: earningsLast90Days eligible_for_support_bonus: eligibleForSupportBonus support_health: supportHealth template_health: templateHealth total_deployments: totalDeployments total_earnings: totalEarnings } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: One TemplateMetrics row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateMetrics: + $ref: '#/components/schemas/TemplateMetrics' + /graphql/v2?__resource=template_search&__method=list: + post: + operationId: template_search_list + summary: Search published templates using the backend-ranked template search index + description: Search published templates using the backend-ranked template search index. Backed by the Railway GraphQL query templateSearch. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.template_search.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.templateSearch.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.templateSearch.pageInfo.endCursor + terminateOnJsonPath: $.data.templateSearch.pageInfo.hasNextPage + query: 'query { templateSearch(first: 100{{ .cursor }} {{ if .category }}category: "{{ .category }}" {{ end }}query: "{{ .query }}" {{ if .verified }}verified: {{ .verified }} {{ end }}) { edges { node { code creator_name: creatorName deployment_count: deploymentCount description health_score: healthScore id image is_verified: isVerified name } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: category + in: query + required: false + description: If set, only templates in this category will be returned. + schema: + type: string + - name: query + in: query + required: true + description: Search term to filter templates. Empty query returns browse-style results. + schema: + type: string + - name: verified + in: query + required: false + description: If set, only templates matching this verification state will be returned. + schema: + type: boolean + responses: + '200': + description: One row per TemplateSearchResult. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateSearch: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/TemplateSearchResult' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=template_services&__method=list: + post: + operationId: template_services_list + summary: Lists TemplateService objects of a Template + description: Lists TemplateService objects of a Template. Backed by the Railway GraphQL query template.services. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.template_services.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.template.services.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.template.services.pageInfo.endCursor + terminateOnJsonPath: $.data.template.services.pageInfo.hasNextPage + query: 'query { template(code: "{{ .code }}" {{ if .template_id }}id: "{{ .template_id }}" {{ end }}{{ if .owner }}owner: "{{ .owner }}" {{ end }}{{ if .repo }}repo: "{{ .repo }}" {{ end }}) { services(first: 100{{ .cursor }}) { edges { node { config created_at: createdAt id template_id: templateId updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: code + in: query + required: true + schema: + type: string + - name: template_id + in: query + required: false + schema: + type: string + - name: owner + in: query + required: false + schema: + type: string + - name: repo + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per TemplateService. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + template: + type: object + properties: + services: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/TemplateService' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=templates&__method=clone: + post: + operationId: templates_clone + summary: Duplicates an existing template + description: Duplicates an existing template. Backed by the Railway GraphQL mutation templateClone. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + properties: + code: + type: string + workspace_id: + type: string + responses: + '200': + description: The Template the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateClone: + $ref: '#/components/schemas/Template' + /graphql/v2?__resource=templates&__method=delete: + post: + operationId: templates_delete + summary: Deletes a template + description: Deletes a template. Backed by the Railway GraphQL mutation templateDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateDelete: + $ref: '#/components/schemas/TemplateDeleteResult' + /graphql/v2?__resource=templates&__method=deploy_v2: + post: + operationId: templates_deploy_v2 + summary: Deploys a template using the serialized template config + description: Deploys a template using the serialized template config. Backed by the Railway GraphQL mutation templateDeployV2. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - serialized_config + - template_id + properties: + environment_id: + type: string + existing_root_service_id: + type: string + description: Use an existing service as the cluster root instead of creating a new one. A live cluster edge is resolved to the root it fronts. Used for HA cluster conversion where an existing postgres becomes the primary. + project_id: + type: string + serialized_config: + type: object + stage_only: + type: string + enum: + - 'true' + - 'false' + description: If true, create resources and patch but don't deploy. Returns patchId for later commit. Boolean passed as a string, for example 'true'. + template_id: + type: string + workspace_id: + type: string + responses: + '200': + description: The TemplateDeployPayload the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateDeployV2: + $ref: '#/components/schemas/TemplateDeployPayload' + /graphql/v2?__resource=templates&__method=eject_service_source: + post: + operationId: templates_eject_service_source + summary: Ejects a service from the template and creates a new repo in the provided org + description: Ejects a service from the template and creates a new repo in the provided org. Backed by the Railway GraphQL mutation templateServiceSourceEject. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + - repo_name + - repo_owner + - service_ids + - upstream_url + properties: + project_id: + type: string + repo_name: + type: string + repo_owner: + type: string + service_ids: + type: array + items: + type: string + description: Provide multiple serviceIds when ejecting services from a monorepo. + upstream_url: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateServiceSourceEject: + $ref: '#/components/schemas/TemplateServiceSourceEjectResult' + /graphql/v2?__resource=templates&__method=generate: + post: + operationId: templates_generate + summary: Generate a template for a project + description: Generate a template for a project. Backed by the Railway GraphQL mutation templateGenerate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - project_id + properties: + environment_id: + type: string + project_id: + type: string + responses: + '200': + description: The Template the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateGenerate: + $ref: '#/components/schemas/Template' + /graphql/v2?__resource=templates&__method=get: + post: + operationId: templates_get + summary: Get a template by code or ID or GitHub owner and repo + description: Get a template by code or ID or GitHub owner and repo. Backed by the Railway GraphQL query template. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.templates.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { template(code: "{{ .code }}" {{ if .id }}id: "{{ .id }}" {{ end }}{{ if .owner }}owner: "{{ .owner }}" {{ end }}{{ if .repo }}repo: "{{ .repo }}" {{ end }}) { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: code + in: query + required: true + schema: + type: string + - name: id + in: query + required: false + schema: + type: string + - name: owner + in: query + required: false + schema: + type: string + - name: repo + in: query + required: false + schema: + type: string + responses: + '200': + description: One Template row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + template: + $ref: '#/components/schemas/Template' + /graphql/v2?__resource=templates&__method=get_source_for_project: + post: + operationId: templates_get_source_for_project + summary: Get the source template for a project + description: Get the source template for a project. Backed by the Railway GraphQL query templateSourceForProject. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.templates.get_source_for_project + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { templateSourceForProject(projectId: "{{ .project_id }}") { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One Template row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateSourceForProject: + $ref: '#/components/schemas/Template' + /graphql/v2?__resource=templates&__method=list: + post: + operationId: templates_list + summary: Get all published templates + description: Get all published templates. Backed by the Railway GraphQL query templates. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.templates.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.templates.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.templates.pageInfo.endCursor + terminateOnJsonPath: $.data.templates.pageInfo.hasNextPage + query: 'query { templates(first: 100{{ .cursor }} {{ if .recommended }}recommended: {{ .recommended }} {{ end }}{{ if .verified }}verified: {{ .verified }} {{ end }}) { edges { node { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: recommended + in: query + required: false + description: If set to true, only recommended templates will be returned. + schema: + type: boolean + - name: verified + in: query + required: false + description: If set to true, only verified templates will be returned. + schema: + type: boolean + responses: + '200': + description: One row per Template. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templates: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Template' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=templates&__method=publish: + post: + operationId: templates_publish + summary: Publishes a template + description: Publishes a template. Backed by the Railway GraphQL mutation templatePublish. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - category + - description + - readme + properties: + id: + type: string + category: + type: string + demo_project_id: + type: string + description: + type: string + image: + type: string + readme: + type: string + workspace_id: + type: string + responses: + '200': + description: The Template the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templatePublish: + $ref: '#/components/schemas/Template' + /graphql/v2?__resource=templates&__method=revert: + post: + operationId: templates_revert + summary: Reverts an HA cluster to standalone mode using template metadata to derive variables to remove + description: Reverts an HA cluster to standalone mode using template metadata to derive variables to remove. Backed by the Railway GraphQL mutation templateRevert. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - root_service_id + - template_code + properties: + environment_id: + type: string + description: The environment ID containing the cluster. + group_id: + type: string + description: The group ID to delete when reverting. + project_id: + type: string + description: The project ID containing the cluster. + root_service_id: + type: string + description: The root service ID of the HA cluster to revert. + stage_only: + type: string + enum: + - 'true' + - 'false' + description: If true, stage changes instead of deploying. Returns patchId. Boolean passed as a string, for example 'true'. + template_code: + type: string + description: The template code to revert (e.g., 'ha-postgres'). + responses: + '200': + description: The TemplateDeployPayload the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateRevert: + $ref: '#/components/schemas/TemplateDeployPayload' + /graphql/v2?__resource=templates&__method=unpublish: + post: + operationId: templates_unpublish + summary: Unpublishes a template + description: Unpublishes a template. Backed by the Railway GraphQL mutation templateUnpublish. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateUnpublish: + $ref: '#/components/schemas/TemplateUnpublishResult' + /graphql/v2?__resource=templates&__method=update_volume: + post: + operationId: templates_update_volume + summary: Sets the default size (in MB) for a volume mount in a template's config + description: 'Sets the default size (in MB) for a volume mount in a template''s config. New volumes created when the template is deployed are provisioned at this size, clamped to the deployer''s plan maximum. Pass sizeMB: null to clear the pre-size and fall back to the plan default. Editing a template requires maintainer access. Backed by the Railway GraphQL mutation templateVolumeUpdate.' + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - service_id + - template_id + - volume_id + properties: + service_id: + type: string + size_mb: + type: string + description: Integer passed as a string, for example '1'. + template_id: + type: string + volume_id: + type: string + responses: + '200': + description: The Template the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + templateVolumeUpdate: + $ref: '#/components/schemas/Template' + /graphql/v2?__resource=workspace_templates&__method=list: + post: + operationId: workspace_templates_list + summary: Get all templates for a workspace + description: Get all templates for a workspace. Backed by the Railway GraphQL query workspaceTemplates. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.templates.workspace_templates.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspaceTemplates.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.workspaceTemplates.pageInfo.endCursor + terminateOnJsonPath: $.data.workspaceTemplates.pageInfo.hasNextPage + query: 'query { workspaceTemplates(first: 100{{ .cursor }} workspaceId: "{{ .workspace_id }}") { edges { node { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per Template. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceTemplates: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Template' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string +components: + schemas: + Template: + type: object + properties: + active_projects: + type: integer + canvas_config: + type: object + category: + type: string + code: + type: string + community_thread_slug: + type: string + created_at: + type: string + format: date-time + creator: + type: object + properties: + avatar: + type: string + has_public_profile: + type: boolean + name: + type: string + username: + type: string + description: TemplateCreator object + demo_project_id: + type: string + description: + type: string + guides: + type: object + properties: + post: + type: string + video: + type: string + description: TemplateGuide object + health: + type: number + id: + type: string + image: + type: string + is_approved: + type: boolean + is_v2_template: + type: boolean + is_verified: + type: boolean + languages: + type: array + items: + type: string + maintainer: + type: object + properties: + avatar: + type: string + id: + type: string + name: + type: string + description: MaintainerWorkspace object + name: + type: string + projects: + type: integer + publishing_restriction_id: + type: string + description: 'The active restriction stopping this workspace publishing templates, so a restricted author can be sent to the page that explains it and takes the appeal. Null when publishing is not restricted, and for anyone but the template''s owner: the `template` query is public, and whether a workspace is under an abuse restriction is not.' + readme: + type: string + recent_projects: + type: integer + serialized_config: + type: object + similar_templates: + type: array + items: + type: object + properties: + code: + type: string + created_at: + type: string + format: date-time + deploys: + type: integer + description: + type: string + health: + type: number + image: + type: string + name: + type: string + user_id: + type: string + workspace_id: + type: string + description: List of SimilarTemplate objects + status: + type: string + enum: + - HIDDEN + - PUBLISHED + - UNPUBLISHED + support_health_metrics: + type: object + tags: + type: array + items: + type: string + total_payout: + type: number + updated_at: + type: string + format: date-time + workspace_id: + type: string + TemplateDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the templateDelete mutation (Boolean!) + TemplateDeployPayload: + type: object + properties: + operation_id: + type: string + project_id: + type: string + workflow_id: + type: string + TemplateMetrics: + type: object + properties: + active_deployments: + type: integer + deployments_last90_days: + type: integer + earnings_last30_days: + type: number + earnings_last90_days: + type: number + eligible_for_support_bonus: + type: boolean + support_health: + type: number + template_health: + type: number + total_deployments: + type: integer + total_earnings: + type: number + TemplatesCountResult: + type: object + properties: + result: + type: integer + description: templatesCount value + TemplateSearchResult: + type: object + properties: + code: + type: string + creator_name: + type: string + deployment_count: + type: integer + description: + type: string + health_score: + type: number + id: + type: string + image: + type: string + is_verified: + type: boolean + name: + type: string + TemplateService: + type: object + properties: + config: + type: object + created_at: + type: string + format: date-time + id: + type: string + template_id: + type: string + updated_at: + type: string + format: date-time + TemplateServiceSourceEjectResult: + type: object + properties: + result: + type: boolean + description: Value returned by the templateServiceSourceEject mutation (Boolean!) + TemplateUnpublishResult: + type: object + properties: + result: + type: boolean + description: Value returned by the templateUnpublish mutation (Boolean!) + x-stackQL-resources: + template_counts: + id: railway.templates.template_counts + name: template_counts + title: Template Counts + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=template_counts&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.templatesCount + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"templatesCount":[{"result":{{ toJson (index (index . "data") "templatesCount") }}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/template_counts/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + template_metrics: + id: railway.templates.template_metrics + name: template_metrics + title: Template Metrics + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=template_metrics&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.templateMetrics + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/template_metrics/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + template_search: + id: railway.templates.template_search + name: template_search + title: Template Search + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=template_search&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.templateSearch.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "templateSearch" -}}{"data":{"templateSearch":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/template_search/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + template_services: + id: railway.templates.template_services + name: template_services + title: Template Services + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=template_services&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.template.services.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "template" "services" -}}{"data":{"template":{"services":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/template_services/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + templates: + id: railway.templates.templates + name: templates + title: Templates + methods: + clone: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=clone/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($code: String!, $workspace_id: String) { templateClone(input: { code: $code, workspaceId: $workspace_id }) { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "code" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"code":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateClone + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $workspace_id: String) { templateDelete(id: $id, input: { workspaceId: $workspace_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"templateDelete":{"result":{{ toJson (index (index . "data") "templateDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + deploy_v2: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=deploy_v2/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String, $existing_root_service_id: String, $project_id: String, $serialized_config: SerializedTemplateConfig!, $stage_only: Boolean, $template_id: String!, $workspace_id: String) { templateDeployV2(input: { environmentId: $environment_id, existingRootServiceId: $existing_root_service_id, projectId: $project_id, serializedConfig: $serialized_config, stageOnly: $stage_only, templateId: $template_id, workspaceId: $workspace_id }) { operation_id: operationId project_id: projectId workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "existing_root_service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"existing_root_service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "serialized_config" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"serialized_config":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "stage_only" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"stage_only":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "template_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"template_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateDeployV2 + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + eject_service_source: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=eject_service_source/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($project_id: String!, $repo_name: String!, $repo_owner: String!, $service_ids: [String!]!, $upstream_url: String!) { templateServiceSourceEject(input: { projectId: $project_id, repoName: $repo_name, repoOwner: $repo_owner, serviceIds: $service_ids, upstreamUrl: $upstream_url }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "repo_name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"repo_name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "repo_owner" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"repo_owner":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_ids" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_ids":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "upstream_url" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"upstream_url":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateServiceSourceEject + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"templateServiceSourceEject":{"result":{{ toJson (index (index . "data") "templateServiceSourceEject") }}}}}{{- end -}}' + x-stackql-protocol: graphql + generate: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=generate/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String, $project_id: String!) { templateGenerate(input: { environmentId: $environment_id, projectId: $project_id }) { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateGenerate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.template + x-stackql-protocol: graphql + get_source_for_project: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=get_source_for_project/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.templateSourceForProject + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.templates.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "templates" -}}{"data":{"templates":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + publish: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=publish/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $category: String!, $demo_project_id: String, $description: String!, $image: String, $readme: String!, $workspace_id: String) { templatePublish(id: $id, input: { category: $category, demoProjectId: $demo_project_id, description: $description, image: $image, readme: $readme, workspaceId: $workspace_id }) { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "category" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"category":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "demo_project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"demo_project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "description" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"description":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "image" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"image":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "readme" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"readme":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templatePublish + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + revert: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=revert/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $group_id: String, $project_id: String!, $root_service_id: String!, $stage_only: Boolean, $template_code: String!) { templateRevert(input: { environmentId: $environment_id, groupId: $group_id, projectId: $project_id, rootServiceId: $root_service_id, stageOnly: $stage_only, templateCode: $template_code }) { operation_id: operationId project_id: projectId workflow_id: workflowId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "group_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"group_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "root_service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"root_service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "stage_only" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"stage_only":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "template_code" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"template_code":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateRevert + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + unpublish: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=unpublish/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { templateUnpublish(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateUnpublish + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"templateUnpublish":{"result":{{ toJson (index (index . "data") "templateUnpublish") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update_volume: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=templates&__method=update_volume/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($service_id: String!, $size_mb: Int, $template_id: String!, $volume_id: String!) { templateVolumeUpdate(serviceId: $service_id, sizeMB: $size_mb, templateId: $template_id, volumeId: $volume_id) { active_projects: activeProjects canvas_config: canvasConfig category code community_thread_slug: communityThreadSlug created_at: createdAt creator { avatar has_public_profile: hasPublicProfile name username } demo_project_id: demoProjectId description guides { post video } health id image is_approved: isApproved is_v2_template: isV2Template is_verified: isVerified languages maintainer { avatar id name } name projects publishing_restriction_id: publishingRestrictionId readme recent_projects: recentProjects serialized_config: serializedConfig similar_templates: similarTemplates { code created_at: createdAt deploys description health image name user_id: userId workspace_id: workspaceId } status support_health_metrics: supportHealthMetrics tags total_payout: totalPayout updated_at: updatedAt workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "size_mb" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"size_mb":{{ if eq (kindOf $v) "string" }}{{ toInt $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "template_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"template_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "volume_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"volume_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.templateVolumeUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/templates/methods/get' + - $ref: '#/components/x-stackQL-resources/templates/methods/get_source_for_project' + - $ref: '#/components/x-stackQL-resources/templates/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/templates/methods/delete' + replace: [] + workspace_templates: + id: railway.templates.workspace_templates + name: workspace_templates + title: Workspace Templates + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_templates&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspaceTemplates.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "workspaceTemplates" -}}{"data":{"workspaceTemplates":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspace_templates/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/variables.yaml b/providers/src/railway/v00.00.00000/services/variables.yaml new file mode 100644 index 00000000..1a4a8ca2 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/variables.yaml @@ -0,0 +1,568 @@ +openapi: 3.0.3 +info: + title: Variables API + description: 'Service and shared environment variables: rendered values, variable metadata, upsert and delete.' + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=environment_variables&__method=list: + post: + operationId: environment_variables_list + summary: Lists Variable objects of a Environment + description: Lists Variable objects of a Environment. Backed by the Railway GraphQL query environment.variables. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.variables.environment_variables.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.environment.variables.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.environment.variables.pageInfo.endCursor + terminateOnJsonPath: $.data.environment.variables.pageInfo.hasNextPage + query: 'query { environment(id: "{{ .environment_id }}" {{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}) { variables(first: 100{{ .cursor }}) { edges { node { created_at: createdAt environment_id: environmentId id is_sealed: isSealed name references_: references service_id: serviceId updated_at: updatedAt } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per Variable. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + environment: + type: object + properties: + variables: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/Variable' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=variables_for_service_deployment&__method=list: + post: + operationId: variables_for_service_deployment_list + summary: All rendered variables that are required for a service deployment + description: All rendered variables that are required for a service deployment. Backed by the Railway GraphQL query variablesForServiceDeployment. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.variables.variables_for_service_deployment.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.variablesForServiceDeployment[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { variablesForServiceDeployment(environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}" serviceId: "{{ .service_id }}") }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per entry of the map. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + variablesForServiceDeployment: + type: array + items: + $ref: '#/components/schemas/EnvironmentVariablesEntry' + /graphql/v2?__resource=variables&__method=configure_shared: + post: + operationId: variables_configure_shared + summary: Configure a shared variable + description: Configure a shared variable. Backed by the Railway GraphQL mutation sharedVariableConfigure. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - disabled_service_ids + - enabled_service_ids + - environment_id + - name + - project_id + properties: + disabled_service_ids: + type: array + items: + type: string + enabled_service_ids: + type: array + items: + type: string + environment_id: + type: string + name: + type: string + project_id: + type: string + responses: + '200': + description: The Variable the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + sharedVariableConfigure: + $ref: '#/components/schemas/Variable' + /graphql/v2?__resource=variables&__method=delete: + post: + operationId: variables_delete + summary: Deletes a variable + description: Deletes a variable. Backed by the Railway GraphQL mutation variableDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - name + - project_id + properties: + environment_id: + type: string + name: + type: string + project_id: + type: string + service_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + variableDelete: + $ref: '#/components/schemas/VariableDeleteResult' + /graphql/v2?__resource=variables&__method=list: + post: + operationId: variables_list + summary: All variables by pluginId or serviceId + description: All variables by pluginId or serviceId. If neither are provided, all shared variables are returned. Backed by the Railway GraphQL query variables. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.variables.variables.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.variables[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { variables(environmentId: "{{ .environment_id }}" projectId: "{{ .project_id }}" {{ if .service_id }}serviceId: "{{ .service_id }}" {{ end }}{{ if .unrendered }}unrendered: {{ .unrendered }} {{ end }}) }' + x-stackql-protocol: graphql + parameters: + - name: environment_id + in: query + required: true + schema: + type: string + - name: project_id + in: query + required: true + schema: + type: string + - name: service_id + in: query + required: false + description: Provide a serviceId to get all variables for a specific service. + schema: + type: string + - name: unrendered + in: query + required: false + schema: + type: boolean + responses: + '200': + description: One row per entry of the map. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + variables: + type: array + items: + $ref: '#/components/schemas/EnvironmentVariablesEntry' + /graphql/v2?__resource=variables&__method=upsert: + post: + operationId: variables_upsert + summary: Upserts a variable + description: Upserts a variable. Backed by the Railway GraphQL mutation variableUpsert. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - name + - project_id + - value + properties: + environment_id: + type: string + name: + type: string + project_id: + type: string + service_id: + type: string + skip_deploys: + type: boolean + description: Skip deploys for affected services. + value: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + variableUpsert: + $ref: '#/components/schemas/VariableUpsertResult' + /graphql/v2?__resource=variables&__method=upsert_collection: + post: + operationId: variables_upsert_collection + summary: Upserts a collection of variables + description: Upserts a collection of variables. Backed by the Railway GraphQL mutation variableCollectionUpsert. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - environment_id + - project_id + - variables + properties: + environment_id: + type: string + project_id: + type: string + replace_: + type: boolean + description: When set to true, removes all existing variables before upserting the new collection. + service_id: + type: string + skip_deploys: + type: boolean + description: Skip deploys for affected services. + variables: + type: object + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + variableCollectionUpsert: + $ref: '#/components/schemas/VariableCollectionUpsertResult' +components: + schemas: + EnvironmentVariablesEntry: + type: object + properties: + name: + type: string + description: Entry name + value: + type: string + description: Entry value + Variable: + type: object + properties: + created_at: + type: string + format: date-time + environment_id: + type: string + id: + type: string + is_sealed: + type: boolean + name: + type: string + references_: + type: array + items: + type: string + service_id: + type: string + updated_at: + type: string + format: date-time + VariableCollectionUpsertResult: + type: object + properties: + result: + type: boolean + description: Value returned by the variableCollectionUpsert mutation (Boolean!) + VariableDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the variableDelete mutation (Boolean!) + VariableUpsertResult: + type: object + properties: + result: + type: boolean + description: Value returned by the variableUpsert mutation (Boolean!) + x-stackQL-resources: + environment_variables: + id: railway.variables.environment_variables + name: environment_variables + title: Environment Variables + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=environment_variables&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.environment.variables.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "environment" "variables" -}}{"data":{"environment":{"variables":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environment_variables/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + variables: + id: railway.variables.variables + name: variables + title: Variables + methods: + configure_shared: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=variables&__method=configure_shared/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($disabled_service_ids: [String!]!, $enabled_service_ids: [String!]!, $environment_id: String!, $name: String!, $project_id: String!) { sharedVariableConfigure(input: { disabledServiceIds: $disabled_service_ids, enabledServiceIds: $enabled_service_ids, environmentId: $environment_id, name: $name, projectId: $project_id }) { created_at: createdAt environment_id: environmentId id is_sealed: isSealed name references_: references service_id: serviceId updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "disabled_service_ids" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"disabled_service_ids":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "enabled_service_ids" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"enabled_service_ids":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.sharedVariableConfigure + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=variables&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $name: String!, $project_id: String!, $service_id: String) { variableDelete(input: { environmentId: $environment_id, name: $name, projectId: $project_id, serviceId: $service_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.variableDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"variableDelete":{"result":{{ toJson (index (index . "data") "variableDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=variables&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.variables + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"variables":[{{- $s := separator "," -}}{{- range $k, $v := index (index . "data") "variables" -}}{{ call $s }}{"name":{{ toJson $k }},"value":{{ toJson $v }}}{{- end -}}]}}' + x-stackql-protocol: graphql + upsert: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=variables&__method=upsert/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $name: String!, $project_id: String!, $service_id: String, $skip_deploys: Boolean, $value: String!) { variableUpsert(input: { environmentId: $environment_id, name: $name, projectId: $project_id, serviceId: $service_id, skipDeploys: $skip_deploys, value: $value }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "skip_deploys" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"skip_deploys":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "value" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"value":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.variableUpsert + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"variableUpsert":{"result":{{ toJson (index (index . "data") "variableUpsert") }}}}}{{- end -}}' + x-stackql-protocol: graphql + upsert_collection: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=variables&__method=upsert_collection/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($environment_id: String!, $project_id: String!, $replace_: Boolean, $service_id: String, $skip_deploys: Boolean, $variables: EnvironmentVariables!) { variableCollectionUpsert(input: { environmentId: $environment_id, projectId: $project_id, replace: $replace_, serviceId: $service_id, skipDeploys: $skip_deploys, variables: $variables }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "environment_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"environment_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "replace_" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"replace_":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "service_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"service_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "skip_deploys" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"skip_deploys":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "variables" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"variables":{{ if eq (kindOf $v) "string" }}{{ $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.variableCollectionUpsert + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"variableCollectionUpsert":{"result":{{ toJson (index (index . "data") "variableCollectionUpsert") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/variables/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/variables/methods/upsert' + - $ref: '#/components/x-stackQL-resources/variables/methods/upsert_collection' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/variables/methods/delete' + replace: [] + variables_for_service_deployment: + id: railway.variables.variables_for_service_deployment + name: variables_for_service_deployment + title: Variables For Service Deployment + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=variables_for_service_deployment&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.variablesForServiceDeployment + transform: + type: golang_template_json_v0.3.0 + body: '{"data":{"variablesForServiceDeployment":[{{- $s := separator "," -}}{{- range $k, $v := index (index . "data") "variablesForServiceDeployment" -}}{{ call $s }}{"name":{{ toJson $k }},"value":{{ toJson $v }}}{{- end -}}]}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/variables_for_service_deployment/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/railway/v00.00.00000/services/workspaces.yaml b/providers/src/railway/v00.00.00000/services/workspaces.yaml new file mode 100644 index 00000000..adcbb4f0 --- /dev/null +++ b/providers/src/railway/v00.00.00000/services/workspaces.yaml @@ -0,0 +1,3935 @@ +openapi: 3.0.3 +info: + title: Workspaces API + description: Workspaces, members, access groups, identity providers, trusted domains, policies, audit logs and compliance agreements. + version: v00.00.00000 +servers: + - url: https://backboard.railway.com +paths: + /graphql/v2?__resource=access_group_members&__method=add: + post: + operationId: access_group_members_add + summary: Add a workspace member to an access group + description: Add a workspace member to an access group. Backed by the Railway GraphQL mutation accessGroupMemberAdd. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - access_group_id + - user_id + properties: + access_group_id: + type: string + user_id: + type: string + responses: + '200': + description: The AccessGroupMember the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + accessGroupMemberAdd: + $ref: '#/components/schemas/AccessGroupMember' + /graphql/v2?__resource=access_group_members&__method=remove: + post: + operationId: access_group_members_remove + summary: Remove a member from an access group + description: Remove a member from an access group. Backed by the Railway GraphQL mutation accessGroupMemberRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - access_group_id + - user_id + properties: + access_group_id: + type: string + user_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + accessGroupMemberRemove: + $ref: '#/components/schemas/AccessGroupMemberRemoveResult' + /graphql/v2?__resource=access_group_projects&__method=attach: + post: + operationId: access_group_projects_attach + summary: Attach a project to an access group + description: Attach a project to an access group. Backed by the Railway GraphQL mutation accessGroupProjectAttach. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - access_group_id + - project_id + properties: + access_group_id: + type: string + project_id: + type: string + responses: + '200': + description: The AccessGroupProject the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + accessGroupProjectAttach: + $ref: '#/components/schemas/AccessGroupProject' + /graphql/v2?__resource=access_group_projects&__method=detach: + post: + operationId: access_group_projects_detach + summary: Detach a project from an access group + description: Detach a project from an access group. Backed by the Railway GraphQL mutation accessGroupProjectDetach. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - access_group_id + - project_id + properties: + access_group_id: + type: string + project_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + accessGroupProjectDetach: + $ref: '#/components/schemas/AccessGroupProjectDetachResult' + /graphql/v2?__resource=access_groups&__method=create: + post: + operationId: access_groups_create + summary: Create an access group in a workspace + description: Create an access group in a workspace. Backed by the Railway GraphQL mutation accessGroupCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - role + - workspace_id + properties: + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + workspace_id: + type: string + responses: + '200': + description: The AccessGroup the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + accessGroupCreate: + $ref: '#/components/schemas/AccessGroup' + /graphql/v2?__resource=access_groups&__method=delete: + post: + operationId: access_groups_delete + summary: Delete an access group + description: Delete an access group. Backed by the Railway GraphQL mutation accessGroupDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + accessGroupDelete: + $ref: '#/components/schemas/AccessGroupDeleteResult' + /graphql/v2?__resource=access_groups&__method=list: + post: + operationId: access_groups_list + summary: Lists AccessGroup objects of a Workspace + description: Lists AccessGroup objects of a Workspace. Backed by the Railway GraphQL query workspace.accessGroups. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.access_groups.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspace.accessGroups.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.workspace.accessGroups.pageInfo.endCursor + terminateOnJsonPath: $.data.workspace.accessGroups.pageInfo.hasNextPage + query: 'query { workspace(workspaceId: "{{ .workspace_id }}") { accessGroups(first: 100{{ .cursor }}) { edges { node { created_at: createdAt id name role source updated_at: updatedAt workspace { adoption_level: adoptionLevel avatar created_at: createdAt discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id name plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per AccessGroup. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspace: + type: object + properties: + accessGroups: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/AccessGroup' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=access_groups&__method=update: + post: + operationId: access_groups_update + summary: Update an access group's name or role + description: Update an access group's name or role. Backed by the Railway GraphQL mutation accessGroupUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + responses: + '200': + description: The AccessGroup the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + accessGroupUpdate: + $ref: '#/components/schemas/AccessGroup' + /graphql/v2?__resource=audit_log_event_types&__method=list: + post: + operationId: audit_log_event_types_list + summary: Get a list of all audit log event types and their description + description: Get a list of all audit log event types and their description. Backed by the Railway GraphQL query auditLogEventTypeInfo. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.audit_log_event_types.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.auditLogEventTypeInfo[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { auditLogEventTypeInfo { description event_type: eventType } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per AuditLogEventTypeInfo. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + auditLogEventTypeInfo: + type: array + items: + $ref: '#/components/schemas/AuditLogEventTypeInfo' + /graphql/v2?__resource=audit_logs&__method=get: + post: + operationId: audit_logs_get + summary: Get an audit log by ID + description: Get an audit log by ID. Backed by the Railway GraphQL query auditLog. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.audit_logs.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { auditLog(id: "{{ .id }}" workspaceId: "{{ .workspace_id }}") { context created_at: createdAt environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId event_type: eventType id payload project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId workspace_id: workspaceId } }' + x-stackql-protocol: graphql + parameters: + - name: id + in: query + required: true + description: The ID of the audit log entry. + schema: + type: string + - name: workspace_id + in: query + required: true + description: The ID of the workspace. + schema: + type: string + responses: + '200': + description: One AuditLog row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + auditLog: + $ref: '#/components/schemas/AuditLog' + /graphql/v2?__resource=audit_logs&__method=list: + post: + operationId: audit_logs_list + summary: Gets audit logs for a workspace + description: Gets audit logs for a workspace. Backed by the Railway GraphQL query auditLogs. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.audit_logs.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.auditLogs.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.auditLogs.pageInfo.endCursor + terminateOnJsonPath: $.data.auditLogs.pageInfo.hasNextPage + query: 'query { auditLogs(first: 100{{ .cursor }} {{ if or .end_date .environment_id .event_types .project_id .start_date }}filter: { {{ if .end_date }}endDate: "{{ .end_date }}" {{ end }}{{ if .environment_id }}environmentId: "{{ .environment_id }}" {{ end }}{{ if .event_types }}eventTypes: {{ .event_types }} {{ end }}{{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}{{ if .start_date }}startDate: "{{ .start_date }}" {{ end }}} {{ end }}{{ if .sort }}sort: {{ .sort }} {{ end }}workspaceId: "{{ .workspace_id }}") { edges { node { context created_at: createdAt environment { can_access: canAccess config_etag: configEtag created_at: createdAt deleted_at: deletedAt id is_ephemeral: isEphemeral name project_id: projectId unmerged_changes_count: unmergedChangesCount updated_at: updatedAt } environment_id: environmentId event_type: eventType id payload project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: end_date + in: query + required: false + description: Filter events created on or before this date. + schema: + type: string + format: date-time + - name: environment_id + in: query + required: false + description: Filter events for a single environment. + schema: + type: string + - name: event_types + in: query + required: false + description: List of event types to filter by. GraphQL list literal, for example ["a", "b"]. + schema: + type: string + - name: project_id + in: query + required: false + description: Filter events for a single project. + schema: + type: string + - name: start_date + in: query + required: false + description: Filter events created on or after this date. + schema: + type: string + format: date-time + - name: sort + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per AuditLog. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + auditLogs: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/AuditLog' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=compliance_agreements&__method=get: + post: + operationId: compliance_agreements_get + summary: Get compliance agreements for a workspace including HIPAA BAA and GDPR DPA status + description: Get compliance agreements for a workspace including HIPAA BAA and GDPR DPA status. Backed by the Railway GraphQL query complianceAgreements. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.compliance_agreements.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { complianceAgreements(workspaceId: "{{ .workspace_id }}") { has_baa: hasBAA has_dpa: hasDPA } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One ComplianceAgreementsInfo row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + complianceAgreements: + $ref: '#/components/schemas/ComplianceAgreementsInfo' + /graphql/v2?__resource=external_workspaces&__method=list: + post: + operationId: external_workspaces_list + summary: Get the workspaces the user doesn't belong to, but needs access (like when invited to a project) + description: Get the workspaces the user doesn't belong to, but needs access (like when invited to a project). Backed by the Railway GraphQL query externalWorkspaces. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.external_workspaces.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.externalWorkspaces[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { externalWorkspaces{{ if or .project_id }}({{ if .project_id }}projectId: "{{ .project_id }}" {{ end }}){{ end }} { avatar ban_reason: banReason created_at: createdAt current_session_has_access: currentSessionHasAccess customer_id: customerId customer_state: customerState discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_saml: hasSAML id is_trialing: isTrialing name plan preferred_region: preferredRegion projects { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } redacted_due_to2fa_pending: redactedDueTo2FAPending subscription_plan_limit: subscriptionPlanLimit team_id: teamId } }' + x-stackql-protocol: graphql + parameters: + - name: project_id + in: query + required: false + schema: + type: string + responses: + '200': + description: One row per ExternalWorkspace. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + externalWorkspaces: + type: array + items: + $ref: '#/components/schemas/ExternalWorkspace' + /graphql/v2?__resource=referral_info&__method=get: + post: + operationId: referral_info_get + summary: Gets the ReferralInfo for the authenticated user + description: Gets the ReferralInfo for the authenticated user. Backed by the Railway GraphQL query referralInfo. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.referral_info.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { referralInfo(workspaceId: "{{ .workspace_id }}") { code id referral_stats: referralStats { credited pending } status } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One ReferralInfo row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + referralInfo: + $ref: '#/components/schemas/ReferralInfo' + /graphql/v2?__resource=referral_info&__method=update: + post: + operationId: referral_info_update + summary: Updates the ReferralInfo for the authenticated user + description: Updates the ReferralInfo for the authenticated user. Backed by the Railway GraphQL mutation referralInfoUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + - workspace_id + properties: + code: + type: string + workspace_id: + type: string + responses: + '200': + description: The ReferralInfo the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + referralInfoUpdate: + $ref: '#/components/schemas/ReferralInfo' + /graphql/v2?__resource=trusted_domains&__method=create: + post: + operationId: trusted_domains_create + summary: Create a new trusted domain for this workspace + description: Create a new trusted domain for this workspace. Backed by the Railway GraphQL mutation trustedDomainCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - domain_name + - role + - workspace_id + properties: + domain_name: + type: string + role: + type: string + workspace_id: + type: string + responses: + '200': + description: The TrustedDomain the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + trustedDomainCreate: + $ref: '#/components/schemas/TrustedDomain' + /graphql/v2?__resource=trusted_domains&__method=delete: + post: + operationId: trusted_domains_delete + summary: Delete a trusted domain + description: Delete a trusted domain. Backed by the Railway GraphQL mutation trustedDomainDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + trustedDomainDelete: + $ref: '#/components/schemas/TrustedDomainDeleteResult' + /graphql/v2?__resource=trusted_domains&__method=list: + post: + operationId: trusted_domains_list + summary: Get all trusted domains for a workspace + description: Get all trusted domains for a workspace. Backed by the Railway GraphQL query trustedDomains. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.trusted_domains.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.trustedDomains.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.trustedDomains.pageInfo.endCursor + terminateOnJsonPath: $.data.trustedDomains.pageInfo.hasNextPage + query: 'query { trustedDomains(first: 100{{ .cursor }} workspaceId: "{{ .workspace_id }}") { edges { node { domain_name: domainName id role status verification_data: verificationData { dns_host: dnsHost token } verification_type: verificationType workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per TrustedDomain. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + trustedDomains: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/TrustedDomain' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=trusted_domains&__method=retrigger_verification: + post: + operationId: trusted_domains_retrigger_verification + summary: Retrigger verification for a failed trusted domain + description: Retrigger verification for a failed trusted domain. Backed by the Railway GraphQL mutation trustedDomainRetriggerVerification. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The TrustedDomain the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + trustedDomainRetriggerVerification: + $ref: '#/components/schemas/TrustedDomain' + /graphql/v2?__resource=trusted_domains&__method=update: + post: + operationId: trusted_domains_update + summary: Update the role of a trusted domain + description: Update the role of a trusted domain. Backed by the Railway GraphQL mutation trustedDomainUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + - role + properties: + id: + type: string + role: + type: string + responses: + '200': + description: The TrustedDomain the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + trustedDomainUpdate: + $ref: '#/components/schemas/TrustedDomain' + /graphql/v2?__resource=workspace_identity_providers&__method=list: + post: + operationId: workspace_identity_providers_list + summary: Gets all identity providers of a workspace + description: Gets all identity providers of a workspace. Backed by the Railway GraphQL query workspaceIdentityProviders. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspace_identity_providers.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspaceIdentityProviders.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.workspaceIdentityProviders.pageInfo.endCursor + terminateOnJsonPath: $.data.workspaceIdentityProviders.pageInfo.hasNextPage + query: 'query { workspaceIdentityProviders(first: 100{{ .cursor }} workspaceId: "{{ .workspace_id }}") { edges { node { connection { created_at: createdAt provider status updated_at: updatedAt } created_at: createdAt enforcement_enabled_at: enforcementEnabledAt id updated_at: updatedAt workspace { adoption_level: adoptionLevel avatar created_at: createdAt discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id name plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } workspace_id: workspaceId } } pageInfo { hasNextPage endCursor } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per WorkspaceIdentityProvider. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceIdentityProviders: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/WorkspaceIdentityProvider' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=workspace_members&__method=invite: + post: + operationId: workspace_members_invite + summary: Invite a user by email to a workspace + description: Invite a user by email to a workspace. Backed by the Railway GraphQL mutation workspaceUserInvite. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + - email + - workspace_id + properties: + code: + type: string + email: + type: string + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceUserInvite: + $ref: '#/components/schemas/WorkspaceUserInviteResult' + /graphql/v2?__resource=workspace_members&__method=list: + post: + operationId: workspace_members_list + summary: Lists WorkspaceMember objects of a Workspace + description: Lists WorkspaceMember objects of a Workspace. Backed by the Railway GraphQL query workspace.members. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspace_members.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspace.members[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workspace(workspaceId: "{{ .workspace_id }}") { members { avatar email feature_flags: featureFlags id name role two_factor_auth_enabled: twoFactorAuthEnabled } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per WorkspaceMember. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspace: + type: object + properties: + members: + type: array + items: + $ref: '#/components/schemas/WorkspaceMember' + /graphql/v2?__resource=workspace_members&__method=remove: + post: + operationId: workspace_members_remove + summary: Remove a user from a workspace + description: Remove a user from a workspace. Backed by the Railway GraphQL mutation workspaceUserRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - user_id + - workspace_id + properties: + user_id: + type: string + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceUserRemove: + $ref: '#/components/schemas/WorkspaceUserRemoveResult' + /graphql/v2?__resource=workspace_members&__method=update: + post: + operationId: workspace_members_update + summary: Changes a user workspace permissions + description: Changes a user workspace permissions. Backed by the Railway GraphQL mutation workspacePermissionChange. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - role + - user_id + - workspace_id + properties: + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + user_id: + type: string + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspacePermissionChange: + $ref: '#/components/schemas/WorkspacePermissionChangeResult' + /graphql/v2?__resource=workspace_policies&__method=get: + post: + operationId: workspace_policies_get + summary: Get the policies for a workspace + description: Get the policies for a workspace. Backed by the Railway GraphQL query workspacePolicy. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspace_policies.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workspacePolicy(workspaceId: "{{ .workspace_id }}") { id restrict_deploys_to_allowed_sources: restrictDeploysToAllowedSources restrict_public_tcp_proxies: restrictPublicTcpProxies restrict_railway_domain_generation: restrictRailwayDomainGeneration } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One WorkspacePolicy row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspacePolicy: + $ref: '#/components/schemas/WorkspacePolicy' + /graphql/v2?__resource=workspace_policies&__method=update: + post: + operationId: workspace_policies_update + summary: Enable or disable a workspace policy + description: Enable or disable a workspace policy. Enterprise workspaces only. Backed by the Railway GraphQL mutation workspacePolicyItemUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - input_enabled + - input_policy + - workspace_id + properties: + enabled: + type: boolean + input_enabled: + type: boolean + input_policy: + type: string + enum: + - RESTRICT_DEPLOYS_TO_ALLOWED_SOURCES + - RESTRICT_PUBLIC_TCP_PROXIES + - RESTRICT_RAILWAY_DOMAIN_GENERATION + policy: + type: string + enum: + - RESTRICT_DEPLOYS_TO_ALLOWED_SOURCES + - RESTRICT_PUBLIC_TCP_PROXIES + - RESTRICT_RAILWAY_DOMAIN_GENERATION + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspacePolicyItemUpdate: + $ref: '#/components/schemas/WorkspacePolicyItemUpdateResult' + /graphql/v2?__resource=workspace_policy_deploy_sources&__method=add: + post: + operationId: workspace_policy_deploy_sources_add + summary: Add a deploy source to a workspace policy allowlist + description: Add a deploy source to a workspace policy allowlist. Backed by the Railway GraphQL mutation workspacePolicyDeploySourceAllowlistAdd. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - source_id + - source_type + - workspace_id + properties: + source_id: + type: string + source_type: + type: string + enum: + - GITHUB_ORG + workspace_id: + type: string + responses: + '200': + description: The WorkspacePolicyDeploySourceAllowlist the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspacePolicyDeploySourceAllowlistAdd: + $ref: '#/components/schemas/WorkspacePolicyDeploySourceAllowlist' + /graphql/v2?__resource=workspace_policy_deploy_sources&__method=list: + post: + operationId: workspace_policy_deploy_sources_list + summary: Lists WorkspacePolicyDeploySourceAllowlist objects of a WorkspacePolicy + description: Lists WorkspacePolicyDeploySourceAllowlist objects of a WorkspacePolicy. Backed by the Railway GraphQL query workspacePolicy.deploySourceAllowlist. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspace_policy_deploy_sources.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspacePolicy.deploySourceAllowlist.nodes[*] + cursor: + strategy: page_info + jsonPath: $.data.workspacePolicy.deploySourceAllowlist.pageInfo.endCursor + terminateOnJsonPath: $.data.workspacePolicy.deploySourceAllowlist.pageInfo.hasNextPage + query: 'query { workspacePolicy(workspaceId: "{{ .workspace_id }}") { deploySourceAllowlist(first: 100{{ .cursor }}) { edges { node { added_by: addedBy { agreed_fair_use: agreedFairUse avatar created_at: createdAt email feature_flags: featureFlags flags github_provider_id: githubProviderId github_username: githubUsername has2fa: has2FA has_passkeys: hasPasskeys id is_admin: isAdmin is_conductor: isConductor is_verified: isVerified last_login: lastLogin name registration_status: registrationStatus risk_level: riskLevel terms_agreed_on: termsAgreedOn username } created_at: createdAt id source_icon: sourceIcon source_id: sourceId source_name: sourceName source_type: sourceType } } pageInfo { hasNextPage endCursor } } } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per WorkspacePolicyDeploySourceAllowlist. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspacePolicy: + type: object + properties: + deploySourceAllowlist: + type: object + properties: + nodes: + type: array + items: + $ref: '#/components/schemas/WorkspacePolicyDeploySourceAllowlist' + pageInfo: + type: object + properties: + hasNextPage: + type: boolean + endCursor: + type: string + /graphql/v2?__resource=workspace_policy_deploy_sources&__method=remove: + post: + operationId: workspace_policy_deploy_sources_remove + summary: Remove a deploy source from a workspace policy allowlist + description: Remove a deploy source from a workspace policy allowlist. Backed by the Railway GraphQL mutation workspacePolicyDeploySourceAllowlistRemove. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspacePolicyDeploySourceAllowlistRemove: + $ref: '#/components/schemas/WorkspacePolicyDeploySourceAllowlistRemoveResult' + /graphql/v2?__resource=workspace_policy_selectable_deploy_sources&__method=list: + post: + operationId: workspace_policy_selectable_deploy_sources_list + summary: List deploy sources that can be added to a workspace policy + description: List deploy sources that can be added to a workspace policy. Backed by the Railway GraphQL query workspacePolicySelectableDeploySources. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspace_policy_selectable_deploy_sources.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.workspacePolicySelectableDeploySources[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workspacePolicySelectableDeploySources(sourceType: {{ .source_type }} workspaceId: "{{ .workspace_id }}") { source_icon: sourceIcon source_id: sourceId source_name: sourceName source_type: sourceType } }' + x-stackql-protocol: graphql + parameters: + - name: source_type + in: query + required: true + schema: + type: string + enum: + - GITHUB_ORG + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One row per WorkspacePolicySelectableDeploySource. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspacePolicySelectableDeploySources: + type: array + items: + $ref: '#/components/schemas/WorkspacePolicySelectableDeploySource' + /graphql/v2?__resource=workspaces&__method=create_invite_code: + post: + operationId: workspaces_create_invite_code + summary: Get an invite code for a workspace and role + description: Get an invite code for a workspace and role. Backed by the Railway GraphQL mutation workspaceInviteCodeCreate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - role + - workspace_id + properties: + role: + type: string + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceInviteCodeCreate: + $ref: '#/components/schemas/WorkspaceInviteCodeCreateResult' + /graphql/v2?__resource=workspaces&__method=delete: + post: + operationId: workspaces_delete + summary: Delete a workspace and all data associated with it + description: Delete a workspace and all data associated with it. Backed by the Railway GraphQL mutation workspaceDelete. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceDelete: + $ref: '#/components/schemas/WorkspaceDeleteResult' + /graphql/v2?__resource=workspaces&__method=get: + post: + operationId: workspaces_get + summary: Get the workspace + description: Get the workspace. Backed by the Railway GraphQL query workspace. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspaces.get + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workspace(workspaceId: "{{ .workspace_id }}") { adoption_history: adoptionHistory { adoption_level: adoptionLevel created_at: createdAt delta_level: deltaLevel id matched_icp_email: matchedIcpEmail monthly_estimated_usage: monthlyEstimatedUsage num_config_file: numConfigFile num_cron_schedule: numCronSchedule num_deploys: numDeploys num_envs: numEnvs num_failed_deploys: numFailedDeploys num_healthcheck: numHealthcheck num_icon_config: numIconConfig num_region: numRegion num_replicas: numReplicas num_root_directory: numRootDirectory num_seats: numSeats num_services: numServices num_variables: numVariables num_watch_patterns: numWatchPatterns total_cores: totalCores total_disk: totalDisk total_network: totalNetwork updated_at: updatedAt } adoption_level: adoptionLevel api_token_rate_limit: apiTokenRateLimit { remaining_points: remainingPoints resets_at: resetsAt } avatar created_at: createdAt customer { applied_credits: appliedCredits billing_email: billingEmail credit_balance: creditBalance current_usage: currentUsage default_payment_method_id: defaultPaymentMethodId has_exhausted_free_plan: hasExhaustedFreePlan id is_prepaying: isPrepaying is_trialing: isTrialing is_usage_subscriber: isUsageSubscriber is_withdrawing_to_credits: isWithdrawingToCredits remaining_usage_credit_balance: remainingUsageCreditBalance state stripe_customer_id: stripeCustomerId supported_withdrawal_platforms: supportedWithdrawalPlatforms trial_days_remaining: trialDaysRemaining } discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id members { avatar email feature_flags: featureFlags id name role two_factor_auth_enabled: twoFactorAuthEnabled } name partner_profile: partnerProfile { category description slug type website } plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending referred_users: referredUsers { code id status } restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } }' + x-stackql-protocol: graphql + parameters: + - name: workspace_id + in: query + required: true + schema: + type: string + responses: + '200': + description: One Workspace row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspace: + $ref: '#/components/schemas/Workspace' + /graphql/v2?__resource=workspaces&__method=get_by_code: + post: + operationId: workspaces_get_by_code + summary: Find a workspace by invite code + description: Find a workspace by invite code. Backed by the Railway GraphQL query workspaceByCode. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspaces.get_by_code + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.* + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { workspaceByCode(code: "{{ .code }}") { adoption_history: adoptionHistory { adoption_level: adoptionLevel created_at: createdAt delta_level: deltaLevel id matched_icp_email: matchedIcpEmail monthly_estimated_usage: monthlyEstimatedUsage num_config_file: numConfigFile num_cron_schedule: numCronSchedule num_deploys: numDeploys num_envs: numEnvs num_failed_deploys: numFailedDeploys num_healthcheck: numHealthcheck num_icon_config: numIconConfig num_region: numRegion num_replicas: numReplicas num_root_directory: numRootDirectory num_seats: numSeats num_services: numServices num_variables: numVariables num_watch_patterns: numWatchPatterns total_cores: totalCores total_disk: totalDisk total_network: totalNetwork updated_at: updatedAt } adoption_level: adoptionLevel api_token_rate_limit: apiTokenRateLimit { remaining_points: remainingPoints resets_at: resetsAt } avatar created_at: createdAt customer { applied_credits: appliedCredits billing_email: billingEmail credit_balance: creditBalance current_usage: currentUsage default_payment_method_id: defaultPaymentMethodId has_exhausted_free_plan: hasExhaustedFreePlan id is_prepaying: isPrepaying is_trialing: isTrialing is_usage_subscriber: isUsageSubscriber is_withdrawing_to_credits: isWithdrawingToCredits remaining_usage_credit_balance: remainingUsageCreditBalance state stripe_customer_id: stripeCustomerId supported_withdrawal_platforms: supportedWithdrawalPlatforms trial_days_remaining: trialDaysRemaining } discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id members { avatar email feature_flags: featureFlags id name role two_factor_auth_enabled: twoFactorAuthEnabled } name partner_profile: partnerProfile { category description slug type website } plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending referred_users: referredUsers { code id status } restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } }' + x-stackql-protocol: graphql + parameters: + - name: code + in: query + required: true + schema: + type: string + responses: + '200': + description: One Workspace row. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceByCode: + $ref: '#/components/schemas/Workspace' + /graphql/v2?__resource=workspaces&__method=leave: + post: + operationId: workspaces_leave + summary: Leave a workspace + description: Leave a workspace. Backed by the Railway GraphQL mutation workspaceLeave. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceLeave: + $ref: '#/components/schemas/WorkspaceLeaveResult' + /graphql/v2?__resource=workspaces&__method=list: + post: + operationId: workspaces_list + summary: Workspaces user is member of + description: Workspaces user is member of. Backed by the Railway GraphQL query me.workspaces. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackQL-graphQL: + id: railway.workspaces.workspaces.list + url: https://backboard.railway.com/graphql/v2 + httpVerb: POST + responseSelection: + jsonPath: $.data.me.workspaces[*] + cursor: + jsonPath: $.stackql_gql_get_sentinel + query: 'query { me { workspaces { adoption_history: adoptionHistory { adoption_level: adoptionLevel created_at: createdAt delta_level: deltaLevel id matched_icp_email: matchedIcpEmail monthly_estimated_usage: monthlyEstimatedUsage num_config_file: numConfigFile num_cron_schedule: numCronSchedule num_deploys: numDeploys num_envs: numEnvs num_failed_deploys: numFailedDeploys num_healthcheck: numHealthcheck num_icon_config: numIconConfig num_region: numRegion num_replicas: numReplicas num_root_directory: numRootDirectory num_seats: numSeats num_services: numServices num_variables: numVariables num_watch_patterns: numWatchPatterns total_cores: totalCores total_disk: totalDisk total_network: totalNetwork updated_at: updatedAt } adoption_level: adoptionLevel api_token_rate_limit: apiTokenRateLimit { remaining_points: remainingPoints resets_at: resetsAt } avatar created_at: createdAt customer { applied_credits: appliedCredits billing_email: billingEmail credit_balance: creditBalance current_usage: currentUsage default_payment_method_id: defaultPaymentMethodId has_exhausted_free_plan: hasExhaustedFreePlan id is_prepaying: isPrepaying is_trialing: isTrialing is_usage_subscriber: isUsageSubscriber is_withdrawing_to_credits: isWithdrawingToCredits remaining_usage_credit_balance: remainingUsageCreditBalance state stripe_customer_id: stripeCustomerId supported_withdrawal_platforms: supportedWithdrawalPlatforms trial_days_remaining: trialDaysRemaining } discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id members { avatar email feature_flags: featureFlags id name role two_factor_auth_enabled: twoFactorAuthEnabled } name partner_profile: partnerProfile { category description slug type website } plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending referred_users: referredUsers { code id status } restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } } }' + x-stackql-protocol: graphql + parameters: [] + responses: + '200': + description: One row per Workspace. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + me: + type: object + properties: + workspaces: + type: array + items: + $ref: '#/components/schemas/Workspace' + /graphql/v2?__resource=workspaces&__method=set_restrict_project_visibility_to_groups: + post: + operationId: workspaces_set_restrict_project_visibility_to_groups + summary: Control whether non-admin project visibility is restricted to access groups and direct project permissions + description: Control whether non-admin project visibility is restricted to access groups and direct project permissions. Backed by the Railway GraphQL mutation workspaceSetRestrictProjectVisibilityToGroups. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - enabled + - workspace_id + properties: + enabled: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceSetRestrictProjectVisibilityToGroups: + $ref: '#/components/schemas/WorkspaceSetRestrictProjectVisibilityToGroupsResult' + /graphql/v2?__resource=workspaces&__method=update: + post: + operationId: workspaces_update + summary: Update a workspace by id + description: Update a workspace by id. Backed by the Railway GraphQL mutation workspaceUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + avatar: + type: string + name: + type: string + preferred_region: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceUpdate: + $ref: '#/components/schemas/WorkspaceUpdateResult' + /graphql/v2?__resource=workspaces&__method=update_two_factor_enforcement: + post: + operationId: workspaces_update_two_factor_enforcement + summary: Enable or disable 2FA enforcement for a workspace + description: Enable or disable 2FA enforcement for a workspace. Backed by the Railway GraphQL mutation workspaceTwoFactorEnforcementUpdate. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - enabled + - workspace_id + properties: + enabled: + type: string + enum: + - 'true' + - 'false' + description: Boolean passed as a string, for example 'true'. + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceTwoFactorEnforcementUpdate: + $ref: '#/components/schemas/WorkspaceTwoFactorEnforcementUpdateResult' + /graphql/v2?__resource=workspaces&__method=upsert_slack_channel: + post: + operationId: workspaces_upsert_slack_channel + summary: Generate a Slack channel for a workspace + description: Generate a Slack channel for a workspace. Backed by the Railway GraphQL mutation workspaceUpsertSlackChannel. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceUpsertSlackChannel: + $ref: '#/components/schemas/WorkspaceUpsertSlackChannelResult' + /graphql/v2?__resource=workspaces&__method=upsert_slack_channel_for_workspace: + post: + operationId: workspaces_upsert_slack_channel_for_workspace + summary: Generate a Slack channel for a workspace + description: Generate a Slack channel for a workspace. Backed by the Railway GraphQL mutation upsertSlackChannel. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - workspace_id + properties: + workspace_id: + type: string + responses: + '200': + description: The value the mutation returns, as the result column. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + upsertSlackChannel: + $ref: '#/components/schemas/UpsertSlackChannelResult' + /graphql/v2?__resource=workspaces&__method=use_invite_code: + post: + operationId: workspaces_use_invite_code + summary: Use an invite code to join a workspace + description: Use an invite code to join a workspace. Backed by the Railway GraphQL mutation workspaceInviteCodeUse. + externalDocs: + description: Railway public API documentation + url: https://docs.railway.com/integrations/api + x-stackql-protocol: graphql + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + properties: + code: + type: string + responses: + '200': + description: The Workspace the mutation returns. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + workspaceInviteCodeUse: + $ref: '#/components/schemas/Workspace' +components: + schemas: + AccessGroup: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + source: + type: string + enum: + - MANUAL + updated_at: + type: string + format: date-time + workspace: + type: object + properties: + adoption_level: + type: number + avatar: + type: string + created_at: + type: string + format: date-time + discord_role: + type: string + has2fa_enforcement: + type: boolean + description: Whether 2FA enforcement is enabled for this workspace. + has_automatic_diagnosis: + type: boolean + description: Whether automatic deployment diagnosis is enabled for this workspace. + has_guardrails_access: + type: boolean + description: Whether this workspace has access to guardrails policies. + has_hipaa_baa: + type: boolean + description: Whether this workspace has a signed HIPAA Business Associate Agreement, from either the legacy hasBAA flag or the HIPAA_BAA spend commitment feature. + has_saml: + type: boolean + id: + type: string + name: + type: string + plan: + type: string + enum: + - FREE + - HOBBY + - PRO + preferred_region: + type: string + project_count: + type: integer + description: Total number of projects in this workspace. Used by the dashboard to show an exact count without paginating through every project. + redacted_due_to2fa_pending: + type: boolean + description: Whether the current user's access is redacted due to pending 2FA requirement. Returns true if the user is a workspace member, workspace has 2FA enforcement enabled, and the current user needs to enable 2FA. + restrict_project_visibility_to_groups: + type: boolean + slack_channel_id: + type: string + subscription_plan_limit: + type: object + updated_at: + type: string + format: date-time + users_without2fa: + type: array + items: + type: string + description: Get a list of user emails in the workspace who do not have verified 2FA enabled. Returns an empty array if all users have 2FA enabled. + description: Workspace object + workspace_id: + type: string + AccessGroupDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the accessGroupDelete mutation (Boolean!) + AccessGroupMember: + type: object + properties: + access_group: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + source: + type: string + enum: + - MANUAL + updated_at: + type: string + format: date-time + workspace_id: + type: string + description: AccessGroup object + access_group_id: + type: string + created_at: + type: string + format: date-time + id: + type: string + updated_at: + type: string + format: date-time + user: + type: object + properties: + agreed_fair_use: + type: boolean + avatar: + type: string + created_at: + type: string + format: date-time + email: + type: string + feature_flags: + type: array + items: + type: string + enum: + - ACTIVITY_FEED_HISTORY + - AGENT_BOOTSTRAPS + - AGENT_BYOK + - AGENT_BYOK_ANTHROPIC + - AGENT_BYOK_CHATGPT + - AGENT_BYOK_FIREWORKS + - AGENT_BYOK_OPENAI + - AGENT_BYOK_OPENROUTER + - AGENT_CONNECTORS + - AGENT_TASKS + - BOT_CLOUD_AGENTS + - CHAT_SANDBOX + - CLOUD_AGENTS + - CLOUD_AGENT_BUILDER + - CLOUD_AGENT_CHAT + - CS_MCP_EXPRESS + - EMAIL_FORWARDING + - HA_FOR_MONGO + - IN_DASHBOARD_SUPPORT + - MAGIC_CONFIG + - MYSQL_PITR + - PRIORITY_BOARDING + - RAILWAY_AGENT_DASHBOARD + - RAILWAY_AGENT_FEED + - TRACING + - USAGE_INSIGHTS + - VM_STORAGE_TRACES + flags: + type: array + items: + type: string + enum: + - BETA + github_provider_id: + type: string + github_username: + type: string + has2fa: + type: boolean + has_passkeys: + type: boolean + id: + type: string + is_admin: + type: boolean + is_conductor: + type: boolean + is_verified: + type: boolean + last_login: + type: string + format: date-time + name: + type: string + registration_status: + type: string + enum: + - ONBOARDED + - REGISTERED + - WAITLISTED + risk_level: + type: number + terms_agreed_on: + type: string + format: date-time + username: + type: string + description: User object + user_id: + type: string + AccessGroupMemberRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the accessGroupMemberRemove mutation (Boolean!) + AccessGroupProject: + type: object + properties: + access_group: + type: object + properties: + created_at: + type: string + format: date-time + id: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + source: + type: string + enum: + - MANUAL + updated_at: + type: string + format: date-time + workspace_id: + type: string + description: AccessGroup object + access_group_id: + type: string + created_at: + type: string + format: date-time + id: + type: string + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + updated_at: + type: string + format: date-time + AccessGroupProjectDetachResult: + type: object + properties: + result: + type: boolean + description: Value returned by the accessGroupProjectDetach mutation (Boolean!) + AuditLog: + type: object + properties: + context: + type: object + created_at: + type: string + format: date-time + environment: + type: object + properties: + can_access: + type: boolean + config_etag: + type: string + description: Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + id: + type: string + is_ephemeral: + type: boolean + name: + type: string + project_id: + type: string + unmerged_changes_count: + type: integer + updated_at: + type: string + format: date-time + description: Environment object + environment_id: + type: string + event_type: + type: string + id: + type: string + payload: + type: object + project: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: Project object + project_id: + type: string + workspace_id: + type: string + AuditLogEventTypeInfo: + type: object + properties: + description: + type: string + event_type: + type: string + ComplianceAgreementsInfo: + type: object + properties: + has_baa: + type: boolean + description: Whether the workspace has a signed Business Associate Agreement (HIPAA) + has_dpa: + type: boolean + description: Whether the workspace has a Data Processing Agreement (GDPR) + ExternalWorkspace: + type: object + properties: + avatar: + type: string + ban_reason: + type: string + created_at: + type: string + format: date-time + current_session_has_access: + type: boolean + customer_id: + type: string + customer_state: + type: string + enum: + - ACTIVE + - CANCELLED + - INACTIVE + - PAST_DUE + - UNPAID + discord_role: + type: string + has2fa_enforcement: + type: boolean + has_automatic_diagnosis: + type: boolean + has_guardrails_access: + type: boolean + has_saml: + type: boolean + id: + type: string + is_trialing: + type: boolean + name: + type: string + plan: + type: string + enum: + - FREE + - HOBBY + - PRO + preferred_region: + type: string + projects: + type: array + items: + type: object + properties: + base_environment_id: + type: string + bot_pr_environments: + type: boolean + created_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + description: + type: string + expired_at: + type: string + format: date-time + feature_flags: + type: array + items: + type: string + enum: + - PLACEHOLDER + - RBS_VOLUMES + focused_pr_environments: + type: boolean + id: + type: string + is_public: + type: boolean + is_temp_project: + type: boolean + name: + type: string + pr_deploys: + type: boolean + primary_environment_id: + type: string + description: The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. + subscription_plan_limit: + type: object + subscription_type: + type: string + enum: + - free + - hobby + - pro + - trial + tracing_enabled: + type: boolean + description: Whether the project's services are traced by default. A service can override it with its own tracingEnabled. + tracing_sample_rate: + type: number + description: Fraction of client-facing requests the edge traces, 0..1. Null uses Railway's default. + updated_at: + type: string + format: date-time + viewer_role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + description: Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. + workspace_id: + type: string + description: List of Project objects + redacted_due_to2fa_pending: + type: boolean + subscription_plan_limit: + type: object + team_id: + type: string + ReferralInfo: + type: object + properties: + code: + type: string + id: + type: string + referral_stats: + type: object + properties: + credited: + type: integer + pending: + type: integer + description: ReferralStats object + status: + type: string + TrustedDomain: + type: object + properties: + domain_name: + type: string + id: + type: string + role: + type: string + status: + type: string + enum: + - FAILED + - PENDING + - VERIFIED + verification_data: + type: object + properties: + dns_host: + type: string + token: + type: string + description: TrustedDomainVerificationData object + verification_type: + type: string + workspace_id: + type: string + TrustedDomainDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the trustedDomainDelete mutation (Boolean!) + UpsertSlackChannelResult: + type: object + properties: + result: + type: boolean + description: Value returned by the upsertSlackChannel mutation (Boolean!) + Workspace: + type: object + properties: + adoption_history: + type: array + items: + type: object + properties: + adoption_level: + type: number + created_at: + type: string + format: date-time + delta_level: + type: number + id: + type: string + matched_icp_email: + type: string + monthly_estimated_usage: + type: number + num_config_file: + type: integer + num_cron_schedule: + type: integer + num_deploys: + type: integer + num_envs: + type: integer + num_failed_deploys: + type: integer + num_healthcheck: + type: integer + num_icon_config: + type: integer + num_region: + type: integer + num_replicas: + type: integer + num_root_directory: + type: integer + num_seats: + type: integer + num_services: + type: integer + num_variables: + type: integer + num_watch_patterns: + type: integer + total_cores: + type: number + total_disk: + type: number + total_network: + type: number + updated_at: + type: string + format: date-time + description: List of AdoptionInfo objects + adoption_level: + type: number + api_token_rate_limit: + type: object + properties: + remaining_points: + type: integer + resets_at: + type: string + description: ApiTokenRateLimit object + avatar: + type: string + created_at: + type: string + format: date-time + customer: + type: object + properties: + applied_credits: + type: number + description: The total amount of credits that have been applied during the current billing period. + billing_email: + type: string + credit_balance: + type: number + description: The total amount of unused credits for the customer. + current_usage: + type: number + description: The current usage for the customer. This value is cached and may not be up to date. + default_payment_method_id: + type: string + has_exhausted_free_plan: + type: boolean + id: + type: string + is_prepaying: + type: boolean + is_trialing: + type: boolean + is_usage_subscriber: + type: boolean + is_withdrawing_to_credits: + type: boolean + remaining_usage_credit_balance: + type: number + state: + type: string + enum: + - ACTIVE + - CANCELLED + - INACTIVE + - PAST_DUE + - UNPAID + stripe_customer_id: + type: string + supported_withdrawal_platforms: + type: array + items: + type: string + enum: + - BMAC + - GITHUB + - PAYPAL + - STRIPE_CONNECT + trial_days_remaining: + type: integer + description: Customer object + discord_role: + type: string + has2fa_enforcement: + type: boolean + description: Whether 2FA enforcement is enabled for this workspace. + has_automatic_diagnosis: + type: boolean + description: Whether automatic deployment diagnosis is enabled for this workspace. + has_guardrails_access: + type: boolean + description: Whether this workspace has access to guardrails policies. + has_hipaa_baa: + type: boolean + description: Whether this workspace has a signed HIPAA Business Associate Agreement, from either the legacy hasBAA flag or the HIPAA_BAA spend commitment feature. + has_saml: + type: boolean + id: + type: string + members: + type: array + items: + type: object + properties: + avatar: + type: string + email: + type: string + feature_flags: + type: array + items: + type: string + enum: + - ACTIVITY_FEED_HISTORY + - AGENT_BOOTSTRAPS + - AGENT_BYOK + - AGENT_BYOK_ANTHROPIC + - AGENT_BYOK_CHATGPT + - AGENT_BYOK_FIREWORKS + - AGENT_BYOK_OPENAI + - AGENT_BYOK_OPENROUTER + - AGENT_CONNECTORS + - AGENT_TASKS + - BOT_CLOUD_AGENTS + - CHAT_SANDBOX + - CLOUD_AGENTS + - CLOUD_AGENT_BUILDER + - CLOUD_AGENT_CHAT + - CS_MCP_EXPRESS + - EMAIL_FORWARDING + - HA_FOR_MONGO + - IN_DASHBOARD_SUPPORT + - MAGIC_CONFIG + - MYSQL_PITR + - PRIORITY_BOARDING + - RAILWAY_AGENT_DASHBOARD + - RAILWAY_AGENT_FEED + - TRACING + - USAGE_INSIGHTS + - VM_STORAGE_TRACES + description: Only retrieved if requested by an admin + id: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + two_factor_auth_enabled: + type: boolean + description: Only retrieved if requested by an admin + description: List of WorkspaceMember objects + name: + type: string + partner_profile: + type: object + properties: + category: + type: string + description: + type: string + slug: + type: string + type: + type: string + enum: + - BASIC_PARTNER + - LIMITED_PARTNER + - TEMPLATE_MAINTAINER + website: + type: string + description: PartnerProfile object + plan: + type: string + enum: + - FREE + - HOBBY + - PRO + preferred_region: + type: string + project_count: + type: integer + description: Total number of projects in this workspace. Used by the dashboard to show an exact count without paginating through every project. + redacted_due_to2fa_pending: + type: boolean + description: Whether the current user's access is redacted due to pending 2FA requirement. Returns true if the user is a workspace member, workspace has 2FA enforcement enabled, and the current user needs to enable 2FA. + referred_users: + type: array + items: + type: object + properties: + code: + type: string + id: + type: string + status: + type: string + enum: + - REFEREE_CREDITED + - REFERRER_CREDITED + - REGISTERED + description: List of ReferralUser objects + restrict_project_visibility_to_groups: + type: boolean + slack_channel_id: + type: string + subscription_plan_limit: + type: object + updated_at: + type: string + format: date-time + users_without2fa: + type: array + items: + type: string + description: Get a list of user emails in the workspace who do not have verified 2FA enabled. Returns an empty array if all users have 2FA enabled. + WorkspaceDeleteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceDelete mutation (Boolean!) + WorkspaceIdentityProvider: + type: object + properties: + connection: + type: object + properties: + created_at: + type: string + format: date-time + provider: + type: string + status: + type: string + enum: + - ACTIVE + - DRAFT + - INACTIVE + - PENDING + - VALIDATING + updated_at: + type: string + format: date-time + description: WorkspaceIdPConnection object + created_at: + type: string + format: date-time + enforcement_enabled_at: + type: string + format: date-time + id: + type: string + updated_at: + type: string + format: date-time + workspace: + type: object + properties: + adoption_level: + type: number + avatar: + type: string + created_at: + type: string + format: date-time + discord_role: + type: string + has2fa_enforcement: + type: boolean + description: Whether 2FA enforcement is enabled for this workspace. + has_automatic_diagnosis: + type: boolean + description: Whether automatic deployment diagnosis is enabled for this workspace. + has_guardrails_access: + type: boolean + description: Whether this workspace has access to guardrails policies. + has_hipaa_baa: + type: boolean + description: Whether this workspace has a signed HIPAA Business Associate Agreement, from either the legacy hasBAA flag or the HIPAA_BAA spend commitment feature. + has_saml: + type: boolean + id: + type: string + name: + type: string + plan: + type: string + enum: + - FREE + - HOBBY + - PRO + preferred_region: + type: string + project_count: + type: integer + description: Total number of projects in this workspace. Used by the dashboard to show an exact count without paginating through every project. + redacted_due_to2fa_pending: + type: boolean + description: Whether the current user's access is redacted due to pending 2FA requirement. Returns true if the user is a workspace member, workspace has 2FA enforcement enabled, and the current user needs to enable 2FA. + restrict_project_visibility_to_groups: + type: boolean + slack_channel_id: + type: string + subscription_plan_limit: + type: object + updated_at: + type: string + format: date-time + users_without2fa: + type: array + items: + type: string + description: Get a list of user emails in the workspace who do not have verified 2FA enabled. Returns an empty array if all users have 2FA enabled. + description: Workspace object + workspace_id: + type: string + WorkspaceInviteCodeCreateResult: + type: object + properties: + result: + type: string + description: Value returned by the workspaceInviteCodeCreate mutation (String!) + WorkspaceLeaveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceLeave mutation (Boolean!) + WorkspaceMember: + type: object + properties: + avatar: + type: string + email: + type: string + feature_flags: + type: array + items: + type: string + enum: + - ACTIVITY_FEED_HISTORY + - AGENT_BOOTSTRAPS + - AGENT_BYOK + - AGENT_BYOK_ANTHROPIC + - AGENT_BYOK_CHATGPT + - AGENT_BYOK_FIREWORKS + - AGENT_BYOK_OPENAI + - AGENT_BYOK_OPENROUTER + - AGENT_CONNECTORS + - AGENT_TASKS + - BOT_CLOUD_AGENTS + - CHAT_SANDBOX + - CLOUD_AGENTS + - CLOUD_AGENT_BUILDER + - CLOUD_AGENT_CHAT + - CS_MCP_EXPRESS + - EMAIL_FORWARDING + - HA_FOR_MONGO + - IN_DASHBOARD_SUPPORT + - MAGIC_CONFIG + - MYSQL_PITR + - PRIORITY_BOARDING + - RAILWAY_AGENT_DASHBOARD + - RAILWAY_AGENT_FEED + - TRACING + - USAGE_INSIGHTS + - VM_STORAGE_TRACES + description: Only retrieved if requested by an admin + id: + type: string + name: + type: string + role: + type: string + enum: + - ADMIN + - MEMBER + - VIEWER + two_factor_auth_enabled: + type: boolean + description: Only retrieved if requested by an admin + WorkspacePermissionChangeResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspacePermissionChange mutation (Boolean!) + WorkspacePolicy: + type: object + properties: + id: + type: string + restrict_deploys_to_allowed_sources: + type: boolean + restrict_public_tcp_proxies: + type: boolean + restrict_railway_domain_generation: + type: boolean + WorkspacePolicyDeploySourceAllowlist: + type: object + properties: + added_by: + type: object + properties: + agreed_fair_use: + type: boolean + avatar: + type: string + created_at: + type: string + format: date-time + email: + type: string + feature_flags: + type: array + items: + type: string + enum: + - ACTIVITY_FEED_HISTORY + - AGENT_BOOTSTRAPS + - AGENT_BYOK + - AGENT_BYOK_ANTHROPIC + - AGENT_BYOK_CHATGPT + - AGENT_BYOK_FIREWORKS + - AGENT_BYOK_OPENAI + - AGENT_BYOK_OPENROUTER + - AGENT_CONNECTORS + - AGENT_TASKS + - BOT_CLOUD_AGENTS + - CHAT_SANDBOX + - CLOUD_AGENTS + - CLOUD_AGENT_BUILDER + - CLOUD_AGENT_CHAT + - CS_MCP_EXPRESS + - EMAIL_FORWARDING + - HA_FOR_MONGO + - IN_DASHBOARD_SUPPORT + - MAGIC_CONFIG + - MYSQL_PITR + - PRIORITY_BOARDING + - RAILWAY_AGENT_DASHBOARD + - RAILWAY_AGENT_FEED + - TRACING + - USAGE_INSIGHTS + - VM_STORAGE_TRACES + flags: + type: array + items: + type: string + enum: + - BETA + github_provider_id: + type: string + github_username: + type: string + has2fa: + type: boolean + has_passkeys: + type: boolean + id: + type: string + is_admin: + type: boolean + is_conductor: + type: boolean + is_verified: + type: boolean + last_login: + type: string + format: date-time + name: + type: string + registration_status: + type: string + enum: + - ONBOARDED + - REGISTERED + - WAITLISTED + risk_level: + type: number + terms_agreed_on: + type: string + format: date-time + username: + type: string + description: User object + created_at: + type: string + format: date-time + id: + type: string + source_icon: + type: string + source_id: + type: string + source_name: + type: string + source_type: + type: string + enum: + - GITHUB_ORG + WorkspacePolicyDeploySourceAllowlistRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspacePolicyDeploySourceAllowlistRemove mutation (Boolean!) + WorkspacePolicyItemUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspacePolicyItemUpdate mutation (Boolean!) + WorkspacePolicySelectableDeploySource: + type: object + properties: + source_icon: + type: string + source_id: + type: string + source_name: + type: string + source_type: + type: string + enum: + - GITHUB_ORG + WorkspaceSetRestrictProjectVisibilityToGroupsResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceSetRestrictProjectVisibilityToGroups mutation (Boolean!) + WorkspaceTwoFactorEnforcementUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceTwoFactorEnforcementUpdate mutation (Boolean!) + WorkspaceUpdateResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceUpdate mutation (Boolean!) + WorkspaceUpsertSlackChannelResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceUpsertSlackChannel mutation (Boolean!) + WorkspaceUserInviteResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceUserInvite mutation (Boolean!) + WorkspaceUserRemoveResult: + type: object + properties: + result: + type: boolean + description: Value returned by the workspaceUserRemove mutation (Boolean!) + x-stackQL-resources: + access_group_members: + id: railway.workspaces.access_group_members + name: access_group_members + title: Access Group Members + methods: + add: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_group_members&__method=add/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($access_group_id: String!, $user_id: String!) { accessGroupMemberAdd(input: { accessGroupId: $access_group_id, userId: $user_id }) { access_group: accessGroup { created_at: createdAt id name role source updated_at: updatedAt workspace_id: workspaceId } access_group_id: accessGroupId created_at: createdAt id updated_at: updatedAt user { agreed_fair_use: agreedFairUse avatar created_at: createdAt email feature_flags: featureFlags flags github_provider_id: githubProviderId github_username: githubUsername has2fa: has2FA has_passkeys: hasPasskeys id is_admin: isAdmin is_conductor: isConductor is_verified: isVerified last_login: lastLogin name registration_status: registrationStatus risk_level: riskLevel terms_agreed_on: termsAgreedOn username } user_id: userId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "access_group_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"access_group_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.accessGroupMemberAdd + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + remove: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_group_members&__method=remove/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($access_group_id: String!, $user_id: String!) { accessGroupMemberRemove(input: { accessGroupId: $access_group_id, userId: $user_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "access_group_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"access_group_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.accessGroupMemberRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"accessGroupMemberRemove":{"result":{{ toJson (index (index . "data") "accessGroupMemberRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/access_group_members/methods/add' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/access_group_members/methods/remove' + replace: [] + access_group_projects: + id: railway.workspaces.access_group_projects + name: access_group_projects + title: Access Group Projects + methods: + attach: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_group_projects&__method=attach/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($access_group_id: String!, $project_id: String!) { accessGroupProjectAttach(input: { accessGroupId: $access_group_id, projectId: $project_id }) { access_group: accessGroup { created_at: createdAt id name role source updated_at: updatedAt workspace_id: workspaceId } access_group_id: accessGroupId created_at: createdAt id project { base_environment_id: baseEnvironmentId bot_pr_environments: botPrEnvironments created_at: createdAt deleted_at: deletedAt description expired_at: expiredAt feature_flags: featureFlags focused_pr_environments: focusedPrEnvironments id is_public: isPublic is_temp_project: isTempProject name pr_deploys: prDeploys primary_environment_id: primaryEnvironmentId subscription_plan_limit: subscriptionPlanLimit subscription_type: subscriptionType tracing_enabled: tracingEnabled tracing_sample_rate: tracingSampleRate updated_at: updatedAt viewer_role: viewerRole workspace_id: workspaceId } project_id: projectId updated_at: updatedAt } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "access_group_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"access_group_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.accessGroupProjectAttach + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + detach: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_group_projects&__method=detach/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($access_group_id: String!, $project_id: String!) { accessGroupProjectDetach(input: { accessGroupId: $access_group_id, projectId: $project_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "access_group_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"access_group_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "project_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"project_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.accessGroupProjectDetach + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"accessGroupProjectDetach":{"result":{{ toJson (index (index . "data") "accessGroupProjectDetach") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/access_group_projects/methods/attach' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/access_group_projects/methods/detach' + replace: [] + access_groups: + id: railway.workspaces.access_groups + name: access_groups + title: Access Groups + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_groups&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($name: String!, $role: ProjectRole!, $workspace_id: String!) { accessGroupCreate(input: { name: $name, role: $role, workspaceId: $workspace_id }) { created_at: createdAt id name role source updated_at: updatedAt workspace { adoption_level: adoptionLevel avatar created_at: createdAt discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id name plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.accessGroupCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_groups&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { accessGroupDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.accessGroupDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"accessGroupDelete":{"result":{{ toJson (index (index . "data") "accessGroupDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_groups&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspace.accessGroups.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "workspace" "accessGroups" -}}{"data":{"workspace":{"accessGroups":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=access_groups&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $name: String, $role: ProjectRole) { accessGroupUpdate(id: $id, input: { name: $name, role: $role }) { created_at: createdAt id name role source updated_at: updatedAt workspace { adoption_level: adoptionLevel avatar created_at: createdAt discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id name plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.accessGroupUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/access_groups/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/access_groups/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/access_groups/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/access_groups/methods/delete' + replace: [] + audit_log_event_types: + id: railway.workspaces.audit_log_event_types + name: audit_log_event_types + title: Audit Log Event Types + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=audit_log_event_types&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.auditLogEventTypeInfo + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/audit_log_event_types/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + audit_logs: + id: railway.workspaces.audit_logs + name: audit_logs + title: Audit Logs + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=audit_logs&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.auditLog + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=audit_logs&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.auditLogs.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "auditLogs" -}}{"data":{"auditLogs":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/audit_logs/methods/get' + - $ref: '#/components/x-stackQL-resources/audit_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + compliance_agreements: + id: railway.workspaces.compliance_agreements + name: compliance_agreements + title: Compliance Agreements + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=compliance_agreements&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.complianceAgreements + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/compliance_agreements/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + external_workspaces: + id: railway.workspaces.external_workspaces + name: external_workspaces + title: External Workspaces + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=external_workspaces&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.externalWorkspaces + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/external_workspaces/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + referral_info: + id: railway.workspaces.referral_info + name: referral_info + title: Referral Info + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=referral_info&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.referralInfo + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=referral_info&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($code: String!, $workspace_id: String!) { referralInfoUpdate(input: { code: $code, workspaceId: $workspace_id }) { code id referral_stats: referralStats { credited pending } status } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "code" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"code":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.referralInfoUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/referral_info/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/referral_info/methods/update' + delete: [] + replace: [] + trusted_domains: + id: railway.workspaces.trusted_domains + name: trusted_domains + title: Trusted Domains + methods: + create: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=trusted_domains&__method=create/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($domain_name: String!, $role: String!, $workspace_id: String!) { trustedDomainCreate(input: { domainName: $domain_name, role: $role, workspaceId: $workspace_id }) { domain_name: domainName id role status verification_data: verificationData { dns_host: dnsHost token } verification_type: verificationType workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "domain_name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"domain_name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.trustedDomainCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=trusted_domains&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { trustedDomainDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.trustedDomainDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"trustedDomainDelete":{"result":{{ toJson (index (index . "data") "trustedDomainDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=trusted_domains&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.trustedDomains.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "trustedDomains" -}}{"data":{"trustedDomains":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + retrigger_verification: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=trusted_domains&__method=retrigger_verification/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { trustedDomainRetriggerVerification(id: $id) { domain_name: domainName id role status verification_data: verificationData { dns_host: dnsHost token } verification_type: verificationType workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.trustedDomainRetriggerVerification + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=trusted_domains&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $role: String!) { trustedDomainUpdate(input: { id: $id, role: $role }) { domain_name: domainName id role status verification_data: verificationData { dns_host: dnsHost token } verification_type: verificationType workspace_id: workspaceId } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.trustedDomainUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/delete' + replace: [] + workspace_identity_providers: + id: railway.workspaces.workspace_identity_providers + name: workspace_identity_providers + title: Workspace Identity Providers + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_identity_providers&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspaceIdentityProviders.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "workspaceIdentityProviders" -}}{"data":{"workspaceIdentityProviders":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }} }' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspace_identity_providers/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + workspace_members: + id: railway.workspaces.workspace_members + name: workspace_members + title: Workspace Members + methods: + invite: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_members&__method=invite/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($code: String!, $email: String!, $workspace_id: String!) { workspaceUserInvite(input: { code: $code, email: $email }, workspaceId: $workspace_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "code" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"code":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "email" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"email":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceUserInvite + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceUserInvite":{"result":{{ toJson (index (index . "data") "workspaceUserInvite") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_members&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspace.members + x-stackql-protocol: graphql + remove: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_members&__method=remove/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($user_id: String!, $workspace_id: String!) { workspaceUserRemove(input: { userId: $user_id }, workspaceId: $workspace_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceUserRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceUserRemove":{"result":{{ toJson (index (index . "data") "workspaceUserRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_members&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($role: TeamRole!, $user_id: String!, $workspace_id: String!) { workspacePermissionChange(input: { role: $role, userId: $user_id, workspaceId: $workspace_id }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "user_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"user_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspacePermissionChange + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspacePermissionChange":{"result":{{ toJson (index (index . "data") "workspacePermissionChange") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspace_members/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/workspace_members/methods/invite' + update: + - $ref: '#/components/x-stackQL-resources/workspace_members/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/workspace_members/methods/remove' + replace: [] + workspace_policies: + id: railway.workspaces.workspace_policies + name: workspace_policies + title: Workspace Policies + methods: + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_policies&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspacePolicy + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_policies&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($enabled: Boolean, $input_enabled: Boolean!, $input_policy: WorkspacePolicyName!, $policy: WorkspacePolicyName, $workspace_id: String!) { workspacePolicyItemUpdate(enabled: $enabled, input: { enabled: $input_enabled, policy: $input_policy }, policy: $policy, workspaceId: $workspace_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "input_enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"input_enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "input_policy" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"input_policy":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "policy" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"policy":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspacePolicyItemUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspacePolicyItemUpdate":{"result":{{ toJson (index (index . "data") "workspacePolicyItemUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspace_policies/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/workspace_policies/methods/update' + delete: [] + replace: [] + workspace_policy_deploy_sources: + id: railway.workspaces.workspace_policy_deploy_sources + name: workspace_policy_deploy_sources + title: Workspace Policy Deploy Sources + methods: + add: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_policy_deploy_sources&__method=add/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($source_id: String!, $source_type: WorkspacePolicyDeploySourceType!, $workspace_id: String!) { workspacePolicyDeploySourceAllowlistAdd(sourceId: $source_id, sourceType: $source_type, workspaceId: $workspace_id) { added_by: addedBy { agreed_fair_use: agreedFairUse avatar created_at: createdAt email feature_flags: featureFlags flags github_provider_id: githubProviderId github_username: githubUsername has2fa: has2FA has_passkeys: hasPasskeys id is_admin: isAdmin is_conductor: isConductor is_verified: isVerified last_login: lastLogin name registration_status: registrationStatus risk_level: riskLevel terms_agreed_on: termsAgreedOn username } created_at: createdAt id source_icon: sourceIcon source_id: sourceId source_name: sourceName source_type: sourceType } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "source_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "source_type" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"source_type":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspacePolicyDeploySourceAllowlistAdd + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_policy_deploy_sources&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspacePolicy.deploySourceAllowlist.nodes + transform: + type: golang_template_json_v0.3.0 + body: '{{- $c := index . "data" "workspacePolicy" "deploySourceAllowlist" -}}{"data":{"workspacePolicy":{"deploySourceAllowlist":{"nodes":[{{- $s := separator "," -}}{{- range $e := index $c "edges" -}}{{ call $s }}{{ toJson (index $e "node") }}{{- end -}}],"pageInfo":{{ toJson (index $c "pageInfo") }} }}} }' + x-stackql-protocol: graphql + remove: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_policy_deploy_sources&__method=remove/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { workspacePolicyDeploySourceAllowlistRemove(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspacePolicyDeploySourceAllowlistRemove + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspacePolicyDeploySourceAllowlistRemove":{"result":{{ toJson (index (index . "data") "workspacePolicyDeploySourceAllowlistRemove") }}}}}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspace_policy_deploy_sources/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/workspace_policy_deploy_sources/methods/add' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/workspace_policy_deploy_sources/methods/remove' + replace: [] + workspace_policy_selectable_deploy_sources: + id: railway.workspaces.workspace_policy_selectable_deploy_sources + name: workspace_policy_selectable_deploy_sources + title: Workspace Policy Selectable Deploy Sources + methods: + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspace_policy_selectable_deploy_sources&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspacePolicySelectableDeploySources + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspace_policy_selectable_deploy_sources/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + workspaces: + id: railway.workspaces.workspaces + name: workspaces + title: Workspaces + methods: + create_invite_code: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=create_invite_code/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($role: String!, $workspace_id: String!) { workspaceInviteCodeCreate(input: { role: $role }, workspaceId: $workspace_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "role" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"role":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceInviteCodeCreate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceInviteCodeCreate":{"result":{{ toJson (index (index . "data") "workspaceInviteCodeCreate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + delete: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=delete/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { workspaceDelete(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceDelete + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceDelete":{"result":{{ toJson (index (index . "data") "workspaceDelete") }}}}}{{- end -}}' + x-stackql-protocol: graphql + get: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=get/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspace + x-stackql-protocol: graphql + get_by_code: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=get_by_code/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.workspaceByCode + x-stackql-protocol: graphql + leave: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=leave/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { workspaceLeave(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceLeave + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceLeave":{"result":{{ toJson (index (index . "data") "workspaceLeave") }}}}}{{- end -}}' + x-stackql-protocol: graphql + list: + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=list/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.me.workspaces + x-stackql-protocol: graphql + set_restrict_project_visibility_to_groups: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=set_restrict_project_visibility_to_groups/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($enabled: Boolean!, $workspace_id: String!) { workspaceSetRestrictProjectVisibilityToGroups(enabled: $enabled, workspaceId: $workspace_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceSetRestrictProjectVisibilityToGroups + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceSetRestrictProjectVisibilityToGroups":{"result":{{ toJson (index (index . "data") "workspaceSetRestrictProjectVisibilityToGroups") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=update/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!, $avatar: String, $name: String, $preferred_region: String) { workspaceUpdate(id: $id, input: { avatar: $avatar, name: $name, preferredRegion: $preferred_region }) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "avatar" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"avatar":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "name" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"name":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- $v = index . "preferred_region" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"preferred_region":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceUpdate":{"result":{{ toJson (index (index . "data") "workspaceUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + update_two_factor_enforcement: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=update_two_factor_enforcement/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($enabled: Boolean!, $workspace_id: String!) { workspaceTwoFactorEnforcementUpdate(enabled: $enabled, workspaceId: $workspace_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "enabled" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"enabled":{{ if eq (kindOf $v) "string" }}{{ toBool $v }}{{ else }}{{ toJson $v }}{{ end }}{{- end -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceTwoFactorEnforcementUpdate + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceTwoFactorEnforcementUpdate":{"result":{{ toJson (index (index . "data") "workspaceTwoFactorEnforcementUpdate") }}}}}{{- end -}}' + x-stackql-protocol: graphql + upsert_slack_channel: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=upsert_slack_channel/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($id: String!) { workspaceUpsertSlackChannel(id: $id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceUpsertSlackChannel + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"workspaceUpsertSlackChannel":{"result":{{ toJson (index (index . "data") "workspaceUpsertSlackChannel") }}}}}{{- end -}}' + x-stackql-protocol: graphql + upsert_slack_channel_for_workspace: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=upsert_slack_channel_for_workspace/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($workspace_id: String!) { upsertSlackChannel(workspaceId: $workspace_id) }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "workspace_id" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"workspace_id":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.upsertSlackChannel + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{"data":{"upsertSlackChannel":{"result":{{ toJson (index (index . "data") "upsertSlackChannel") }}}}}{{- end -}}' + x-stackql-protocol: graphql + use_invite_code: + config: + requestTranslate: + algorithm: drop_double_underscore_params + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1graphql~1v2?__resource=workspaces&__method=use_invite_code/post' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{"query":"mutation($code: String!) { workspaceInviteCodeUse(code: $code) { adoption_history: adoptionHistory { adoption_level: adoptionLevel created_at: createdAt delta_level: deltaLevel id matched_icp_email: matchedIcpEmail monthly_estimated_usage: monthlyEstimatedUsage num_config_file: numConfigFile num_cron_schedule: numCronSchedule num_deploys: numDeploys num_envs: numEnvs num_failed_deploys: numFailedDeploys num_healthcheck: numHealthcheck num_icon_config: numIconConfig num_region: numRegion num_replicas: numReplicas num_root_directory: numRootDirectory num_seats: numSeats num_services: numServices num_variables: numVariables num_watch_patterns: numWatchPatterns total_cores: totalCores total_disk: totalDisk total_network: totalNetwork updated_at: updatedAt } adoption_level: adoptionLevel api_token_rate_limit: apiTokenRateLimit { remaining_points: remainingPoints resets_at: resetsAt } avatar created_at: createdAt customer { applied_credits: appliedCredits billing_email: billingEmail credit_balance: creditBalance current_usage: currentUsage default_payment_method_id: defaultPaymentMethodId has_exhausted_free_plan: hasExhaustedFreePlan id is_prepaying: isPrepaying is_trialing: isTrialing is_usage_subscriber: isUsageSubscriber is_withdrawing_to_credits: isWithdrawingToCredits remaining_usage_credit_balance: remainingUsageCreditBalance state stripe_customer_id: stripeCustomerId supported_withdrawal_platforms: supportedWithdrawalPlatforms trial_days_remaining: trialDaysRemaining } discord_role: discordRole has2fa_enforcement: has2FAEnforcement has_automatic_diagnosis: hasAutomaticDiagnosis has_guardrails_access: hasGuardrailsAccess has_hipaa_baa: hasHipaaBAA has_saml: hasSAML id members { avatar email feature_flags: featureFlags id name role two_factor_auth_enabled: twoFactorAuthEnabled } name partner_profile: partnerProfile { category description slug type website } plan preferred_region: preferredRegion project_count: projectCount redacted_due_to2fa_pending: redactedDueTo2FAPending referred_users: referredUsers { code id status } restrict_project_visibility_to_groups: restrictProjectVisibilityToGroups slack_channel_id: slackChannelId subscription_plan_limit: subscriptionPlanLimit updated_at: updatedAt users_without2fa: usersWithout2FA } }","variables":{ {{- $s := separator "," -}}{{- $v := "" -}}{{- $v = index . "code" -}}{{- if ne (kindOf $v) "invalid" -}}{{ call $s }}"code":{{ if eq (kindOf $v) "string" }}{{ toJson $v }}{{ else }}{{ toJson (printf "%v" $v) }}{{ end }}{{- end -}}{{- "" }} }}' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data.workspaceInviteCodeUse + transform: + type: golang_template_json_v0.3.0 + body: '{{- if index . "errors" -}}{{- $m := "" -}}{{- range $i, $e := index . "errors" -}}{{- if $i -}}{{- $m = printf "%s; %v" $m (index $e "message") -}}{{- else -}}{{- $m = printf "%v" (index $e "message") -}}{{- end -}}{{- end -}}{{ getRegexpFirstMatch (printf "graphql error: %s" $m) "^(no_graphql_errors)$" }}{{- else -}}{{ toJson . }}{{- end -}}' + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workspaces/methods/get' + - $ref: '#/components/x-stackQL-resources/workspaces/methods/get_by_code' + - $ref: '#/components/x-stackQL-resources/workspaces/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/workspaces/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/workspaces/methods/delete' + replace: []