Skip to content

Actions

Actions are used to run pipelines (workflows) in repositories. Through the API you can manually trigger and rerun pipelines, view run records, jobs, and logs, manage build artifacts (artifacts), and manage the host/K8S runners that execute jobs.

The version prefix for this endpoint group is /api/v8, not the /api/v5 used by other groups.

Objects

Object Description Related endpoints
Pipeline (workflow) The workflow definition in a repository; can be triggered manually and its YAML validated Get the repository's pipeline list
Run record (run) The state and details of each run; can be stopped, rerun, or have failed tasks retried Get pipeline run details
Job The task unit within a run; its details can be viewed individually Get job details of a workflow execution
Log Step-level logs of a job and full-log download Download job logs of a workflow execution
Artifact Run output: list, details, download, delete Get artifact details
Host runner Host executors owned by the repository and shared with it Query all host runners under the specified repository
K8S runner K8S executors owned by the repository and shared with it Query all K8S runners under the specified repository
Runner Group Organization-level runner grouping, its members, and sharing scope Query all runner groups under the specified organization

Identifiers

  • Repository-level endpoints use owner + repo; organization-level runner endpoints use org.
  • workflow_id identifies a pipeline, run_id identifies a run, and job_id identifies a job within a run.
  • artifact_id identifies a build artifact, and runner_group_id identifies a runner group.
  • When downloading an artifact, the path also needs archive_format (such as zip).

Common tasks

Notes

  • The version prefix is /api/v8: in the same set of documentation, all other groups use /api/v5, so copying paths verbatim will often fail to reach the endpoint.
  • The three run-related actions have different paths and different meanings: stop stops the current run, rerun reruns the whole thing, and retry retries only the failed tasks.
  • Manually triggering a pipeline uses workflows/{workflow_id}/dispatches (plural dispatches); it, along with validation endpoints such as workflows/validate, lives under workflows/.
  • The step-level log endpoint is POST: POST .../runs/{run_id}/jobs/{job_id}/logs; only the full-log download is GET .../jobs/{job_id}/download_log.
  • Runners have two sets of paths — host (runners) and K8S (runner-sets) — plus shared-runners / shared-runner-sets for the "shared with the repository" case.
  • Organization-level runner endpoints use the prefix /api/v8/orgs/{org}/actions/…, parallel to the repository-level /api/v8/repos/{owner}/{repo}/actions/….

Endpoint list

This module has 27 endpoints.

# Endpoint Method and path Description
1 Stop the running pipeline instance POST /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/stop Stop the running pipeline instance.
2 Retry failed tasks POST /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/retry Retry failed tasks.
3 Rerun the pipeline POST /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/rerun Rerun the pipeline.
4 Run the pipeline manually POST /api/v8/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches Run the pipeline manually.
5 Validate Workflow YAML POST /api/v8/repos/{owner}/{repo}/actions/workflows/validate Validate Workflow YAML.
6 Get the repository's pipeline list GET /api/v8/repos/{owner}/{repo}/actions/workflows Get the repository's pipeline list.
7 Get all pipeline run records of the repository GET /api/v8/repos/{owner}/{repo}/actions/runs Get all pipeline run records of the repository.
8 Get pipeline run details GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id} Get pipeline run details.
9 Get the list of jobs for the workflow run GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs Get the list of jobs for the workflow run.
10 Get job details of a workflow execution GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id} Get job details of a workflow execution.
11 Query step-level logs of a workflow job POST /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id}/logs Query step-level logs of a workflow job.
12 Download job logs of a workflow execution GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id}/download_log Download job logs of a workflow execution.
13 List the artifacts in the repository GET /api/v8/repos/{owner}/{repo}/actions/artifacts List the artifacts in the repository.
14 List the artifacts of a specific run GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts List the artifacts of a specific run.
15 Get artifact details GET /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id} Get artifact details.
16 Delete the specified artifact DELETE /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id} Delete the specified artifact.
17 Download the specified artifact GET /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format} Download the specified artifact.
18 Query all host runners under the specified repository GET /api/v8/repos/{owner}/{repo}/actions/runners Query all host runners under the specified repository.
19 Query all host runners shared with the repository GET /api/v8/repos/{owner}/{repo}/actions/runners/shared-runners Query all host runners shared with the repository.
20 Query all K8S runners under the specified repository GET /api/v8/repos/{owner}/{repo}/actions/runner-sets Query all K8S runners under the specified repository.
21 Query all K8S runners shared with the repository GET /api/v8/repos/{owner}/{repo}/actions/shared-runner-sets Query all K8S runners shared with the repository.
22 Query all runner groups under the specified organization GET /api/v8/orgs/{org}/actions/runner-groups Query all runner groups under the specified organization.
23 Get detailed information of the specified runner group GET /api/v8/orgs/{org}/actions/runner-groups/{runner_group_id} Get detailed information of the specified runner group.
24 Query all host runners under the specified runner group GET /api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}/runners Query all host runners under the specified runner group.
25 Query all K8S runners under the specified runner group GET /api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}/runner-sets Query all K8S runners under the specified runner group.
26 Query the job execution history of a runner resource GET /api/v8/orgs/{org}/actions/runner-resources/job-history Query the job execution history of a runner resource.
27 Query the list of repositories that have access to the specified runner group GET /api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}/shared-namespaces Query the list of repositories that have access to the specified runner group.

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc