Get job details of a workflow execution¶
GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id}
Call this endpoint to get job details of a workflow run.
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 |
job_id |
path | string | Yes | Job ID |
Response parameters¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
id |
string | Yes | No | Job ID |
category |
null | Yes | Yes | Category (subject to the actual response) |
sequence |
integer | Yes | No | Sequence number |
async |
null | Yes | Yes | Whether asynchronous (subject to the actual response) |
name |
string | Yes | No | Task name |
identifier |
string | Yes | No | Task identifier |
depends_on |
string[] | Yes | No | List of dependent task identifiers |
condition |
string | Yes | No | Run condition |
resource |
string | Yes | No | Run resource |
is_select |
boolean | Yes | No | Whether selectable |
timeout |
null | Yes | Yes | Timeout (subject to the actual response) |
last_dispatch_id |
string | Yes | No | Last dispatch ID |
execute_cost_time |
integer | Yes | No | Execution duration |
status |
string | Yes | No | Task status. Enum: COMPLETED (completed), RUNNING (running), FAILED (failed), CANCELED (canceled), IGNORED (ignored), PAUSED (paused), SUSPEND (suspended) |
message |
null | Yes | Yes | Message (subject to the actual response) |
start_time |
integer | Yes | No | Start time |
end_time |
integer | Yes | No | End time |
exec_id |
string | Yes | No | Execution ID |
steps |
object[] | Yes | No | Step list |
job_type |
string | Yes | No | Task type |
max_parallel |
null | Yes | Yes | Maximum parallelism (subject to the actual response) |
fail_fast |
null | Yes | Yes | Whether to fail fast (subject to the actual response) |
from |
null | Yes | Yes | Source (subject to the actual response) |
with |
null | Yes | Yes | Parameters (subject to the actual response) |
secrets |
null | Yes | Yes | Secrets (subject to the actual response) |
outputs_define |
null | Yes | Yes | Output definitions (subject to the actual response) |
concurrency |
null | Yes | Yes | Concurrency configuration (subject to the actual response) |
timeout_minutes |
null | Yes | Yes | Timeout in minutes (subject to the actual response) |
continue_on_error |
null | Yes | Yes | Whether to continue on error (subject to the actual response) |
steps array element
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
runtime_attribution |
null | Yes | Yes | Runtime attribution (subject to the actual response) |
multi_step_editable |
integer | Yes | No | Whether multi-step editing is supported |
official_task_version |
null | Yes | Yes | Official task version (subject to the actual response) |
icon_url |
null | Yes | Yes | Icon URL (subject to the actual response) |
name |
string | Yes | No | Step name |
task |
string | Yes | No | Task identifier |
business_type |
null | Yes | Yes | Business type (subject to the actual response) |
inputs |
object[] | Yes | No | Input parameter list |
env |
string[] | Yes | No | Environment variable list |
sequence |
integer | Yes | No | Sequence number |
identifier |
string | Yes | No | Step identifier |
endpoint_ids |
null | Yes | Yes | Endpoint ID list (subject to the actual response) |
id |
string | Yes | No | Step ID |
job_run_id |
string | Yes | No | Job run ID |
last_dispatch_id |
string | Yes | No | Last dispatch ID |
status |
string | Yes | No | Step status |
message |
null | Yes | Yes | Message (subject to the actual response) |
start_time |
integer | Yes | No | Start time |
end_time |
integer | Yes | No | End time |
daily_build_number |
null | Yes | Yes | Daily build number (subject to the actual response) |
timeout-minutes |
null | Yes | Yes | Timeout in minutes (subject to the actual response) |
continue-on-error |
null | Yes | Yes | Whether to continue on error (subject to the actual response) |
steps.inputs array element¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
key |
string | Yes | No | Input key |
value |
string | Yes | No | Input value |
Error responses¶
This endpoint has no business failure response.
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Not found |
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);<run_id>is replaced with the pipeline run ID;<job_id>is replaced with the job ID.
This endpoint allows anonymous access; no authentication information is needed in the request. If you need to access a protected repository, you can additionally carry an AtomGit user access token.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/jobs/<job_id>' -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>/jobs/<job_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>/jobs/<job_id>",
headers={
"Accept": "application/json",
},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
{
"id": "string",
"sequence": 0,
"name": "string",
"identifier": "string",
"depends_on": [
"string"
],
"condition": "string",
"resource": "string",
"is_select": true,
"last_dispatch_id": "string",
"execute_cost_time": 0,
"status": "string",
"start_time": 0,
"end_time": 0,
"exec_id": "string",
"steps": [
{
"multi_step_editable": 0,
"name": "string",
"task": "string",
"inputs": [
{
"key": "string",
"value": "string"
}
],
"env": [
"string"
],
"sequence": 0,
"identifier": "string",
"id": "string",
"job_run_id": "string",
"last_dispatch_id": "string",
"status": "string",
"start_time": 0,
"end_time": 0
}
],
"job_type": "string"
}
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 (no permission) |
404 |
The request path does not exist |
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