GraphQL API
Endpoint, authentication headers and every root query and mutation of the Skiffly API. The full SDL is available by introspection.
POST https://api.skiffly.dev/graphql
Authorization: Bearer <token> # account or workspace token
Project-Access-Token: <token> # project token instead of AuthorizationOpen the URL in a browser for GraphiQL with the live schema, or run an introspection query to download the SDL. Concepts, tokens and examples are in the Public API guide; the tables below are the complete list of root fields. Arguments are ID! where Railway has String!; both variable declarations are accepted.
Queries#
Account and workspace#
| Field | Returns |
|---|---|
me | User with workspaces { id name role } |
workspaces, workspace(workspaceId: ID!) | [Workspace!]!, Workspace! |
workspaceMembers(workspaceId), workspaceInvites(workspaceId) | members and pending invites |
apiTokens(workspaceId, first, after), apiToken | workspace tokens; the current token's context |
projectTokens(projectId, first, after), projectToken | project tokens; the current project token |
auditLog(workspaceId, first, after) | AuditLogPage! |
notifications(first, after, unreadOnly), unreadNotificationCount | in-app notifications |
sshKeys | public keys of the account |
githubInstallations, githubApp, githubRepositories(installationId, search, first), githubBranches(installationId, repo) | GitHub App state, repositories and branches |
nodes(workspaceId) | compute nodes visible to the token |
Projects, environments, services#
| Field | Returns |
|---|---|
projects(workspaceId, first, after, orderBy, search, includeDeleted) | QueryProjectsConnection! |
project(id) | Project! with environments, services connections, prDeploys, summary |
environments(projectId, first, after, isEphemeral), environment(id, projectId) | environments; isEphemeral filters PR previews |
service(id) | Service! (source, builder, port, runtimeClass, internalHost, instance(environmentId)) |
serviceInstance(serviceId, environmentId) | per-environment settings, domains, tcpProxies, latestDeployment |
activity(projectId, first) | recent project activity |
Deployments and logs#
| Field | Returns |
|---|---|
deployments(input: { projectId, environmentId, serviceId, status: { in, notIn } }, first, after) | QueryDeploymentsConnection! |
deployment(id) | Deployment! (status, message, url, meta, canRedeploy, canRollback) |
deploymentLogs(deploymentId, filter, limit = 500, startDate, endDate) | [Log!]! with stream: build | runtime | system |
environmentLogs(environmentId, filter, beforeDate, beforeLimit, afterDate, afterLimit, anchorDate, serviceId, stream) | logs across the environment |
serviceMetrics(environmentId, range: H1 | H6 | H24 | D7, serviceId) | CPU, memory, egress series |
Variables, domains, volumes, proxies#
| Field | Returns |
|---|---|
variables(projectId, environmentId, serviceId, unrendered) | EnvironmentVariables! map; serviceId omitted = shared only |
variableList(projectId, environmentId, serviceId) | [Variable!]! with ids and scope |
domains(projectId, environmentId, serviceId) | AllDomains! { serviceDomains customDomains } |
customDomain(id, projectId), customDomainAvailable(domain), serviceDomainAvailable(domain), workspaceDomains(workspaceId) | domain details and availability |
volumes(environmentId, serviceId), volumeInstance(id) | volumes |
tcpProxies(serviceId, environmentId) | [TCPProxy!]! |
Billing and templates#
| Field | Returns |
|---|---|
billingAccount(workspaceId) | balance, plan limits, pause state, auto top-up |
usage(workspaceId, periodStart) | UsageReport! per service and resource |
ledger(workspaceId, first, after), payments(workspaceId, first), payment(id), topupOptions | history and top-up options |
templates(category, search, featured, first, after), template(code), templateCategories, templateCount | the catalog |
Mutations#
Projects and environments#
| Field | Returns |
|---|---|
projectCreate(input: { workspaceId, name, description, githubInstallationId }) | Project! |
projectUpdate(id, input: { name, description, prDeploys, githubInstallationId }) | Project! |
projectFavoriteSet(projectId, favorite), projectDelete(id) | Boolean! |
environmentCreate(input: { projectId, name, sourceEnvironmentId }) | Environment! |
environmentRename(id, input: { name }), environmentDelete(id) |
Services#
| Field | Returns |
|---|---|
serviceCreate(input: { projectId, name, source: { repo | image }, branch, environmentId, variables, builder, dockerfilePath, buildCommand, port, runtimeClass, deploy }) | Service! |
serviceUpdate(id, input: { name, icon, source, builder, dockerfilePath, buildCommand, port, runtimeClass }) | Service! |
serviceInstanceUpdate(serviceId, environmentId, input: { numReplicas, cpuMillis, memoryBytes, healthcheckPath, healthcheckTimeout, startCommand, cronSchedule, sleepApplication, restartPolicyType, restartPolicyMaxRetries, branch, rootDirectory, builder, buildCommand, dockerfilePath, source }) | Boolean! |
serviceDelete(id, environmentId) | Boolean! |
Deployments#
| Field | Returns |
|---|---|
serviceInstanceDeployV2(serviceId, environmentId, commitSha, latestCommit) | String! deployment id |
serviceInstanceRedeploy(serviceId, environmentId), serviceRestart(serviceId, environmentId) | Boolean! |
deploymentRedeploy(id, usePreviousImageTag) | Deployment! |
deploymentRollback(id), deploymentRestart(id), deploymentCancel(id), deploymentRemove(id) | Boolean! |
Variables, domains, volumes, proxies#
| Field | Returns |
|---|---|
variableUpsert(input: { projectId, environmentId, serviceId, name, value }) | Boolean! |
variableCollectionUpsert(input: { projectId, environmentId, serviceId, variables, replace }) | Boolean! |
variableDelete(input: { projectId, environmentId, serviceId, name }) | Boolean! |
serviceDomainCreate(input: { serviceId, environmentId, targetPort }), serviceDomainDelete(id) | ServiceDomain!, Boolean! |
customDomainCreate(input: { projectId, serviceId, environmentId, domain, targetPort }), customDomainVerify(id), customDomainDelete(id) | CustomDomain! with status { verified dnsRecords certificateStatus } |
volumeCreate(input: { projectId, serviceId, environmentId, mountPath, sizeGb, name }), volumeDelete(volumeId), volumeInstanceUpdate(volumeId, environmentId, input) | |
tcpProxyCreate(input: { serviceId, environmentId, applicationPort }), tcpProxyDelete(id) | TCPProxy!, Boolean! |
Workspace, tokens, billing, templates#
| Field | Returns |
|---|---|
workspaceCreate(name), workspaceUpdate(id, input: { name, avatar, spendLimitCents }), workspaceDelete(id) | |
workspaceInvite(workspaceId, githubLogin, role), workspaceInviteRevoke(id), workspaceMemberRemove(workspaceId, userId), workspaceMemberSetRole(workspaceId, userId, role) | |
apiTokenCreate(input: { name, workspaceId, scopes, expiresAt }) | String! the token, shown once |
apiTokenDelete(id), projectTokenCreate(input: { projectId, environmentId, name }), projectTokenDelete(id) | |
githubInstallationDelete(installationId), sshKeyAdd(input: { name, publicKey }), sshKeyDelete(id), userUpdate(input) | |
topupCreate(workspaceId, provider: paypal | nowpayments, amountCents) | Payment! with checkoutUrl |
paymentRefresh(id), billingAutoPauseSet(workspaceId, enabled), paypalAutoTopupSetup(workspaceId, amountCents), autoTopupSet(workspaceId, enabled, thresholdCents, amountCents), paypalVaultDelete(workspaceId) | |
templateDeployV2(input: { templateCode, projectId, environmentId, serviceName, variables, name }) | TemplateDeployPayload! |
nodeCreate(name, region, workspaceId), nodeDelete(id) | dedicated nodes |
Enums#
DeploymentStatus:QUEUED BUILDING DEPLOYING SUCCESS FAILED CRASHED REMOVED SLEEPING(plus Railway'sINITIALIZING NEEDS_APPROVAL REMOVING SKIPPED WAITING, reserved).Builder:RAILPACK DOCKERFILE.RuntimeClass:gvisor kata.RestartPolicyType:ALWAYS NEVER ON_FAILURE.Plan:FREE HOBBY PRO.WorkspaceRole:owner admin member.MetricRange:H1 H6 H24 D7.PaymentProvider:paypal nowpayments.PaymentStatus:created pending confirming paid failed expired refunded.LedgerKind:topup usage subscription adjustment refund trial.
Deprecated fields#
Older list-shaped fields (projectList, environmentList, deploymentList, domainList, deploymentTrigger, domainCreate, …) still work and are marked @deprecated in the schema with their replacement.