Get all pipeline run records of the repository¶
GET /api/v8/repos/{owner}/{repo}/actions/runs
Call this endpoint to get the run records of all pipelines in the specified repository.
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) |
event |
query | string | No | Trigger event type. Enum: MR (mr event), Push (push event), Manual (manual trigger) |
status |
query | string | No | Run status. Enum: COMPLETED (completed), RUNNING (running), FAILED (failed), CANCELED (canceled), IGNORED (ignored), PAUSED (paused), SUSPEND (suspended) |
branch |
query | string | No | Branch filter |
executor |
query | string | No | Triggering user username |
pull_request_id |
query | string | No | PR number |
workflow_id |
query | string | No | Pipeline ID |
workflow_name |
query | string | No | Pipeline name |
per_page |
query | string | No | Number of items per page, maximum 100, default 20 |
page |
query | string | No | Current page number, default 1 |
startTime |
query | number | No | Start time, in timestamp format |
endTime |
query | number | No | End time, in timestamp format |
Response parameters¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
total_count |
integer | Yes | No | Total count |
workflow_runs |
object[] | Yes | No | List of pipeline run records |
workflow_runs array element object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
workflow_runs.workflow_run_id |
string | Yes | No | Pipeline run ID |
workflow_runs.workflow_id |
string | Yes | No | Pipeline ID |
workflow_runs.workflow_name |
string | Yes | No | Pipeline name |
workflow_runs.file_path |
string | Yes | No | Workflow file path |
workflow_runs.title |
string | Yes | No | Title |
workflow_runs.status |
string | Yes | No | Run status. Enum: COMPLETED (completed), RUNNING (running), FAILED (failed), CANCELED (canceled), IGNORED (ignored), PAUSED (paused), SUSPEND (suspended) |
workflow_runs.event |
string | Yes | No | Trigger event type. Enum: MR (mr event), Push (push event), Manual (manual trigger) |
workflow_runs.run_number |
integer | Yes | No | Run number |
workflow_runs.head_branch |
string | Yes | No | Triggering branch |
workflow_runs.head_sha |
string | Yes | No | SHA of the triggering commit |
workflow_runs.actor |
object | Yes | No | Triggering user |
workflow_runs.start_time |
integer | Yes | No | Start timestamp |
workflow_runs.end_time |
integer | Yes | No | End timestamp |
workflow_runs.pause_time |
integer | Yes | No | Pause time |
workflow_runs.actor object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
workflow_runs.actor.id |
string | Yes | No | Triggering user ID |
workflow_runs.actor.object_id |
string | Yes | No | Triggering user object ID |
workflow_runs.actor.login |
string | Yes | No | Triggering user login name |
workflow_runs.actor.name |
string | Yes | No | Triggering user display name |
Error responses¶
The error field names returned by the backend take precedence.
400 Invalid parameters
401 Unauthenticated
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
304 |
Not modified |
400 |
Bad request |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Not found |
429 |
Rate limited |
500 |
Internal server error |
Request example¶
Parameter notes¶
<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). This endpoint allows anonymous access; the examples do not carry a token. If authentication is required, you can carry an AtomGit user access token.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs?event=Push&status=COMPLETED&page=1&per_page=20' \
-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?event=Push&status=COMPLETED&page=1&per_page=20", {
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",
params={
"event": "Push",
"status": "COMPLETED",
"page": 1,
"per_page": 20,
},
headers={
"Accept": "application/json",
},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
{
"total_count": 1,
"workflow_runs": [
{
"workflow_run_id": "1001",
"workflow_id": "123456",
"workflow_name": "build",
"file_path": ".atomgit/workflows/build.yml",
"title": "build #1",
"status": "COMPLETED",
"event": "Push",
"run_number": 1,
"head_branch": "main",
"head_sha": "0f1b3e2e2f0aa304caa02aea6e63557c283f91f0",
"actor": {
"id": "10001",
"object_id": "20001",
"login": "octocat",
"name": "Octo Cat"
},
"start_time": 1697529600,
"end_time": 1697529660,
"pause_time": 0
}
]
}
Error codes¶
| Error code | Description |
|---|---|
400 |
Invalid parameters or the request could not be parsed |
401 |
Unauthenticated or invalid credentials (missing or invalid access token) |
403 |
Forbidden |
404 |
The request path does not exist |
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