Get pipeline run details¶
GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}
Get details of a pipeline run in the specified repository, including run status, trigger event, executor, and stage and job details.
Access token support¶
- AtomGit user access tokens
Anonymous access¶
This endpoint allows anonymous access.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
owner |
path | string | Yes | Address path of the namespace that owns the repository (organization or personal address path) |
repo |
path | string | Yes | Repository path (path) |
run_id |
path | string | Yes | Pipeline run ID |
Response parameters¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
workflow_run_id |
string | Yes | — | Pipeline run ID |
workflow_id |
string | Yes | — | Pipeline ID |
workflow_name |
string | Yes | — | Pipeline name |
file_path |
string | Yes | — | File path |
title |
string | Yes | — | Title |
status |
string | Yes | — | Run status; enum: COMPLETED (completed), RUNNING (running), FAILED (failed), CANCELED (canceled), IGNORED (ignored), PAUSED (paused), SUSPEND (suspended) |
event |
string | Yes | — | Trigger event type; enum: MR (mr event), Push (push event), Manual (manual trigger) |
run_number |
integer | Yes | — | Run number |
head_branch |
string | Yes | — | Head branch |
head_sha |
string | Yes | — | Head commit SHA |
pull_request_id |
string | No | Yes | Pull request ID |
actor |
object | Yes | No | Triggering user (executor) |
start_time |
integer | Yes | — | Start timestamp |
end_time |
integer | Yes | — | End timestamp |
pause_time |
integer | Yes | — | Pause duration |
attempt |
integer | No | Yes | Attempt number of the current workflow run; defaults to 1 when not specified by the backend |
exist_in_default_branch |
boolean | Yes | — | Whether it is on the default branch |
stages |
array | Yes | Yes | Stage information |
actor object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
actor.id |
string | Yes | — | User ID |
actor.object_id |
string | Yes | — | Object ID |
actor.login |
string | Yes | — | Login name |
actor.name |
string | Yes | — | Username |
stages object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
stages[].id |
string | Yes | — | Stage ID |
stages[].category |
string | Yes | — | Category |
stages[].name |
string | Yes | — | Name |
stages[].identifier |
string | Yes | — | Identifier |
stages[].run_always |
boolean | Yes | — | Whether it always runs |
stages[].fail_fast |
boolean | Yes | — | Whether to fail fast |
stages[].parallel |
null | Yes | Yes | Parallel configuration |
stages[].is_select |
boolean | Yes | — | Whether selected |
stages[].sequence |
integer | Yes | — | Sequence number |
stages[].depends_on |
string[] | Yes | — | Dependencies |
stages[].condition |
null | Yes | Yes | Run condition |
stages[].status |
string | Yes | — | State |
stages[].start_time |
integer | Yes | — | Start timestamp |
stages[].end_time |
integer | Yes | — | End timestamp |
stages[].pause_time |
integer | Yes | — | Pause duration |
stages[].pre |
object[] | Yes | Yes | Pre-tasks |
stages[].post |
string[] | Yes | — | Post-tasks |
stages[].jobs |
object[] | Yes | Yes | Pipeline run job information |
stages.pre object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
stages.pre[].runtime_attribution |
null | Yes | Yes | Runtime attribution |
stages.pre[].multi_step_editable |
integer | Yes | — | Whether multi-step editing is supported |
stages.pre[].official_task_version |
null | Yes | Yes | Official task version |
stages.pre[].icon_url |
null | Yes | Yes | Icon URL |
stages.pre[].name |
null | Yes | Yes | Name |
stages.pre[].task |
string | Yes | — | Task |
stages.pre[].business_type |
null | Yes | Yes | Business type |
stages.pre[].inputs |
string[] | Yes | — | Inputs |
stages.pre[].env |
null | Yes | Yes | Environment variables |
stages.pre[].sequence |
null | Yes | Yes | Sequence number |
stages.pre[].identifier |
null | Yes | Yes | Identifier |
stages.pre[].endpoint_ids |
null | Yes | Yes | Endpoint ID |
stages.pre[].id |
string | Yes | — | Job ID |
stages.pre[].job_run_id |
string | Yes | — | Job run ID |
stages.pre[].last_dispatch_id |
string | Yes | — | Last dispatch ID |
stages.pre[].status |
string | Yes | — | State |
stages.pre[].message |
null | Yes | Yes | Message |
stages.pre[].start_time |
integer | Yes | — | Start timestamp |
stages.pre[].end_time |
integer | Yes | — | End timestamp |
stages.pre[].daily_build_number |
null | Yes | Yes | Daily build number |
stages.pre[].timeout-minutes |
null | Yes | Yes | Timeout (minutes) |
stages.pre[].continue-on-error |
null | Yes | Yes | Whether to continue on failure |
stages.jobs object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
stages.jobs[].id |
string | Yes | — | Job ID |
stages.jobs[].category |
null | Yes | Yes | Category |
stages.jobs[].sequence |
integer | Yes | — | Sequence number |
stages.jobs[].async |
null | Yes | Yes | Whether asynchronous |
stages.jobs[].name |
string | Yes | — | Task name |
stages.jobs[].identifier |
string | Yes | — | Identifier |
stages.jobs[].depends_on |
string[] | Yes | — | Dependencies |
stages.jobs[].condition |
string | Yes | — | Run condition |
stages.jobs[].resource |
string | Yes | — | Run resource |
stages.jobs[].is_select |
boolean | Yes | — | Whether selected |
stages.jobs[].timeout |
null | Yes | Yes | Timeout |
stages.jobs[].last_dispatch_id |
string | Yes | — | Last dispatch ID |
stages.jobs[].execute_cost_time |
integer | Yes | — | Execution duration (seconds) |
stages.jobs[].status |
string | Yes | — | State |
stages.jobs[].message |
null | Yes | Yes | Message |
stages.jobs[].start_time |
integer | Yes | — | Start timestamp |
stages.jobs[].end_time |
integer | Yes | — | End timestamp |
stages.jobs[].exec_id |
string | Yes | — | Execution instance ID |
stages.jobs[].steps |
object[] | Yes | Yes | Step information |
stages.jobs[].job_type |
string | Yes | — | Task type |
stages.jobs[].max_parallel |
null | Yes | Yes | Maximum parallelism |
stages.jobs[].fail_fast |
null | Yes | Yes | Whether to fail fast |
stages.jobs[].from |
null | Yes | Yes | Source |
stages.jobs[].with |
null | Yes | Yes | with configuration |
stages.jobs[].secrets |
null | Yes | Yes | Secrets configuration |
stages.jobs[].outputs_define |
null | Yes | Yes | Output definitions |
stages.jobs[].concurrency |
null | Yes | Yes | Concurrency configuration |
stages.jobs[].timeout_minutes |
null | Yes | Yes | Timeout (minutes) |
stages.jobs[].continue_on_error |
null | Yes | Yes | Whether to continue on failure |
stages.jobs.steps object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
stages.jobs.steps[].runtime_attribution |
null | Yes | Yes | Runtime attribution |
stages.jobs.steps[].multi_step_editable |
integer | Yes | — | Whether multi-step editing is supported |
stages.jobs.steps[].official_task_version |
null | Yes | Yes | Official task version |
stages.jobs.steps[].icon_url |
null | Yes | Yes | Icon URL |
stages.jobs.steps[].name |
string | Yes | — | Step name |
stages.jobs.steps[].task |
string | Yes | — | Task |
stages.jobs.steps[].business_type |
null | Yes | Yes | Business type |
stages.jobs.steps[].inputs |
object[] | Yes | — | Inputs (key-value pairs) |
stages.jobs.steps[].env |
string[] | Yes | — | Environment variables |
stages.jobs.steps[].sequence |
integer | Yes | — | Sequence number |
stages.jobs.steps[].identifier |
string | Yes | — | Identifier |
stages.jobs.steps[].endpoint_ids |
null | Yes | Yes | Endpoint ID |
stages.jobs.steps[].id |
string | Yes | — | Step ID |
stages.jobs.steps[].job_run_id |
string | Yes | — | Job run ID |
stages.jobs.steps[].last_dispatch_id |
string | Yes | — | Last dispatch ID |
stages.jobs.steps[].status |
string | Yes | — | State |
stages.jobs.steps[].message |
null | Yes | Yes | Message |
stages.jobs.steps[].start_time |
integer | Yes | — | Start timestamp |
stages.jobs.steps[].end_time |
integer | Yes | — | End timestamp |
stages.jobs.steps[].daily_build_number |
null | Yes | Yes | Daily build number |
stages.jobs.steps[].timeout-minutes |
null | Yes | Yes | Timeout (minutes) |
stages.jobs.steps[].continue-on-error |
null | Yes | Yes | Whether to continue on failure |
stages.jobs.steps.inputs object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
stages.jobs.steps.inputs[].key |
string | Yes | — | Key |
stages.jobs.steps.inputs[].value |
string | Yes | — | Value |
Error responses¶
This endpoint returns the corresponding error response when parameters are missing or malformed, authentication fails, or the resource is not found.
400 Invalid parameters
401 Unauthenticated
404 Resource not found
The error field names returned by the backend take precedence.
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
400 |
Bad request |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Not found |
429 |
Too many requests |
500 |
Internal server error |
Request example¶
Parameter notes¶
The examples must be self-consistent with the rest of this document; copy them as-is and the calls will succeed:
- This endpoint allows anonymous access; the examples can be called successfully without authentication parameters. If authentication is needed, you can carry the
access_tokenquery parameter. - All three path parameters are required and must all appear in the request.
- Placeholders uniformly use the
<...>form; replace them with real values and the call can be made.
<owner>is replaced with the address path of the namespace that owns the repository (organization or personal address path);<repo>is replaced with the repository path (path);<run_id>is replaced with the pipeline run ID.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>' \
-H 'Accept: application/json'
To carry a token for authentication, append the access_token query parameter:
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>?access_token=<token>' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>", {
headers: {
"Accept": "application/json",
},
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
Python¶
import requests
resp = requests.get(
"https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>",
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
{
"workflow_run_id": "run-2024010101",
"workflow_id": "wf-1",
"workflow_name": "CI",
"file_path": ".gitcode/workflows/ci.yml",
"title": "CI",
"status": "COMPLETED",
"event": "Push",
"run_number": 3,
"head_branch": "main",
"head_sha": "abc123def456",
"pull_request_id": null,
"actor": {
"id": "1",
"object_id": "obj-1",
"login": "octocat",
"name": "octocat"
},
"start_time": 1700000000,
"end_time": 1700003600,
"pause_time": 0,
"attempt": 1,
"exist_in_default_branch": true,
"stages": [
{
"id": "stage-1",
"category": "parallel",
"name": "Build",
"identifier": "build",
"run_always": true,
"fail_fast": false,
"is_select": true,
"sequence": 1,
"depends_on": [],
"status": "COMPLETED",
"start_time": 1700000000,
"end_time": 1700003600,
"pause_time": 0,
"pre": [
{
"multi_step_editable": 1,
"task": "checkout",
"inputs": ["main"],
"id": "pre-1",
"job_run_id": "jr-1",
"last_dispatch_id": "ld-1",
"status": "COMPLETED",
"start_time": 1700000000,
"end_time": 1700000100
}
],
"post": [],
"jobs": [
{
"id": "job-1",
"sequence": 1,
"name": "build",
"identifier": "build",
"depends_on": [],
"condition": "success()",
"resource": "linux",
"is_select": true,
"last_dispatch_id": "ld-1",
"execute_cost_time": 3600,
"status": "COMPLETED",
"start_time": 1700000000,
"end_time": 1700003600,
"exec_id": "exec-1",
"steps": [
{
"multi_step_editable": 1,
"name": "Run build",
"task": "shell",
"inputs": [
{
"key": "script",
"value": "make build"
}
],
"env": [],
"sequence": 1,
"identifier": "run-build",
"id": "step-1",
"job_run_id": "jr-1",
"last_dispatch_id": "ld-1",
"status": "COMPLETED",
"start_time": 1700000000,
"end_time": 1700000300
}
],
"job_type": "build"
}
]
}
]
}
Error codes¶
| Error code | Description |
|---|---|
400 |
Invalid parameters or the request could not be parsed |
401 |
Unauthenticated or invalid credentials |
403 |
No access permission |
404 |
The request path or resource was not found |
405 |
The request method is not supported |
429 |
Too many requests; rate limit triggered |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc