API

Pipelines

Workflows, runs, logs, artifacts, environments, secrets, and the endpoints runners call.

See Pipelines. Runners call /v1/runner with their job's token (Authorization: Bearer sjt_…), which works only while that job is queued or running.

Every route below, with its parameters, request and response, errors and samples, is in the API reference.

RouteWhat it does
GET /v1/runner/jobThe job's plan: steps, contexts and its secrets. The job counts as running from here.
POST /v1/runner/checkoutA git credential for the run's repository, minutes long.
POST /v1/runner/statusStep progress and a heartbeat; answers whether to stop.
POST /v1/runner/completeThe job's result.
POST /v1/runner/logsSelf-hosted runners' output, in batches of timestamped lines.
POST /v1/runner/cache/restoreFinds a cache for key (exact) or restoreKeys (prefixes, newest first) with the same version, in the job's ref, a pull request's target, then the default branch. Answers hit (exact, partial, none) and a presigned download.
POST /v1/runner/cache/saveA presigned upload for a cache in the job's own ref only (key, version, size), or exists when that key is already saved there (caches are immutable).
POST /v1/runner/cache/commitFinishes a cache after its upload; the repository's oldest unused caches go when it passes its quota.
POST /v1/runner/artifacts/uploadStarts an artifact of the job's run (name, size, files, retentionDays): a presigned PUT for exactly that size. Names are unique per run attempt.
POST /v1/runner/artifacts/commitFinishes an artifact after its upload; it's then listed with the run and kept until its retention ends.
POST /v1/runner/artifacts/downloadPresigned downloads of the run's artifacts (name for one; this attempt's first, then earlier attempts').
GET /v1/orgs/:orgId/repos/:name/pipelines/workflowsThe workflows of a branch (default: the default branch), with their problems and last run.
PUT /v1/orgs/:orgId/repos/:name/pipelines/workflows/:fileTurns a workflow on or off (off: no event starts it).
POST /v1/orgs/:orgId/repos/:name/pipelines/workflows/:file/dispatchesRuns a workflow by hand on a branch with inputs (workflow_dispatch).
GET /v1/orgs/:orgId/repos/:name/pipelines/runsRuns, newest first, filtered by workflow, branch, status, actor and event.
GET /v1/orgs/:orgId/repos/:name/pipelines/runs/:numberA run (an attempt of it): jobs with steps, the job graph, approvals, artifacts.
POST /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/cancelCancels a run: queued and waiting jobs end at once, running ones are stopped. Needs git:write.
POST /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/rerunRe-runs a finished run as a new attempt: all jobs, the failed ones, or one job (and what needs it).
POST /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/approvalsApproves or rejects the jobs of the current attempt waiting for an environment (its reviewers only).
GET /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/jobs/:jobIdOne job of a run: status, runner, environment, steps, annotations, summary and error.
GET /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/jobs/:jobId/logsA page of a job's log after cursor; done when the job finished and everything was read.
GET /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/jobs/:jobId/logs/rawThe whole log as text (up to 5 MB).
GET /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/artifacts/:artifactA download link for one of the run's artifacts (15 minutes); attempt picks an earlier attempt's.
DELETE /v1/orgs/:orgId/repos/:name/pipelines/runs/:number/artifacts/:artifactDeletes an artifact of the run now. Needs git:admin.
GET /v1/orgs/:orgId/repos/:name/pipelines/statusesWhat the runs of commits add up to (up to 100: ?sha=…&sha=…).
GET /v1/orgs/:orgId/repos/:name/pipelines/environmentsEnvironments with their rules, and the names of their secrets and variables.
PUT /v1/orgs/:orgId/repos/:name/pipelines/environments/:environmentCreates or changes an environment's rules: reviewers (up to 6 people or groups; empty means no approval), preventSelfReview, waitMinutes, branchPolicy (all, protected or selected with branchPatterns). Needs git:admin.
DELETE /v1/orgs/:orgId/repos/:name/pipelines/environments/:environmentRemoves an environment with its secrets and variables. Needs git:admin.
PUT /v1/orgs/:orgId/repos/:name/pipelines/environments/:environment/secrets/:secretSets an environment secret (value, at most the platform's size). Only that environment's jobs get it, after its rules pass. Needs git:admin.
DELETE /v1/orgs/:orgId/repos/:name/pipelines/environments/:environment/secrets/:secretRemoves an environment secret. Needs git:admin.
PUT /v1/orgs/:orgId/repos/:name/pipelines/environments/:environment/variables/:variableSets an environment variable (value). Needs git:admin.
DELETE /v1/orgs/:orgId/repos/:name/pipelines/environments/:environment/variables/:variableRemoves an environment variable. Needs git:admin.
GET /v1/orgs/:orgId/repos/:name/pipelines/secretsSecret names (never values): the repository's, and the org's visible to it. Needs git:write.
PUT /v1/orgs/:orgId/repos/:name/pipelines/secrets/:secretSets a repository secret (value): KMS-encrypted, never returned, handed only to running jobs. Needs git:admin.
DELETE /v1/orgs/:orgId/repos/:name/pipelines/secrets/:secretRemoves a repository secret. Needs git:admin.
GET /v1/orgs/:orgId/repos/:name/pipelines/variablesVariables (values are visible): the repository's and the org's visible to it.
PUT /v1/orgs/:orgId/repos/:name/pipelines/variables/:variableSets a repository variable (value, readable in vars). Needs git:admin.
DELETE /v1/orgs/:orgId/repos/:name/pipelines/variables/:variableRemoves a repository variable. Needs git:admin.
GET /v1/orgs/:orgId/repos/:name/pipelines/cachesThe repository's caches: key, ref, size and when each was last used.
DELETE /v1/orgs/:orgId/repos/:name/pipelines/cachesRemoves caches: one key (on one ref, or every ref), or all of them.
GET /v1/orgs/:orgId/pipelines/secretsOrg secret names and which repositories see them (never values).
PUT /v1/orgs/:orgId/pipelines/secrets/:secretSets an organization secret: value (required for a new one), and visibility (all repositories, or selected with repoIds). Needs git:admin.
DELETE /v1/orgs/:orgId/pipelines/secrets/:secretRemoves an organization secret. Needs git:admin.
GET /v1/orgs/:orgId/pipelines/variablesOrganization variables with their values and which repositories see them.
PUT /v1/orgs/:orgId/pipelines/variables/:variableSets an organization variable: value, visibility and repoIds as for secrets. Needs git:admin.
DELETE /v1/orgs/:orgId/pipelines/variables/:variableRemoves an organization variable. Needs git:admin.
GET /v1/orgs/:orgId/pipelines/usageMinutes this month (or month=2026-10) against the plan, by runner type.
GET /v1/orgs/:orgId/pipelines/runnersHosted runner types the org can use, and its self-hosted runners (devices approved for pipelines).
PUT /v1/orgs/:orgId/pipelines/runners/:deviceId/labelsA self-hosted runner's own labels (runs-on: [self-hosted, <label>]).