Skip to content

Query the job execution history of a runner resource

GET /api/v8/orgs/{org}/actions/runner-resources/job-history

Call this endpoint to query the job execution history of the Runner resources of the specified organization.

Access token support

  • AtomGit user access tokens

Anonymous access

This endpoint does not allow anonymous access.

Request parameters

Parameter Location Type Required Description
org path string Yes Organization path
access_token query string Yes User authorization code
page query integer No Current page number
per_page query integer No Number of items per page
start_time_begin query string No Start time filter start, format: yyyy-MM-dd HH:mm:ss
start_time_end query string No Start time filter end, format: yyyy-MM-dd HH:mm:ss

Response parameters

Field Type Always returned Nullable Description
page_num integer Yes — Current page number
page_size integer Yes — Number of items per page
total integer Yes — Total record count
page_count integer Yes — Total page count
content array Yes — Job execution history list

content object

Field Type Always returned Nullable Description
content.state string Yes — Execution state
content.duration integer Yes — Execution duration
content.org_namespace_id string Yes — Organization namespace ID
content.repo_namespace_id string Yes — Repository namespace ID
content.job_run_id string Yes — Job run ID
content.job_id string Yes — Job ID
content.job_external_id string Yes — Job external ID
content.job_name string Yes — Job name
content.pipeline_external_id string Yes — Pipeline external ID
content.pipeline_origin_id string Yes — Pipeline origin ID
content.pipeline_run_id string Yes — Pipeline run ID
content.pipeline_name string Yes — Pipeline name
content.runs_on string Yes — Runtime environment
content.start_time string Yes — Start time
content.complete_time string Yes — Completion time

Error responses

A success response alone is not enough: callers need to know what failures look like to write error handling.

400 Invalid parameters

{
  "error": "invalid_request",
  "message": "Invalid value for the page parameter",
  "field": "page"
}

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

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
429 Too many requests
500 Internal server error

Request example

Parameter notes

Replace the placeholders in the example as needed:

<org> is replaced with the organization path; <token> is replaced with your AtomGit user access token.

cURL

curl -X GET 'https://api.atomgit.com/api/v8/orgs/<org>/actions/runner-resources/job-history?access_token=<token>&page=1&per_page=10' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch(
  "https://api.atomgit.com/api/v8/orgs/<org>/actions/runner-resources/job-history?access_token=<token>&page=1&per_page=10",
  {
    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/orgs/<org>/actions/runner-resources/job-history",
    params={
        "access_token": "<token>",
        "page": 1,
        "per_page": 10,
    },
    headers={
        "Accept": "application/json",
    },
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "page_num": 1,
  "page_size": 10,
  "total": 1,
  "page_count": 1,
  "content": [
    {
      "state": "completed",
      "duration": 120,
      "org_namespace_id": "gitcode",
      "repo_namespace_id": "my-repo",
      "job_run_id": "123456",
      "job_id": "job-1",
      "job_external_id": "JOB-001",
      "job_name": "build",
      "pipeline_external_id": "PIPE-001",
      "pipeline_origin_id": "origin-1",
      "pipeline_run_id": "run-1",
      "pipeline_name": "CI",
      "runs_on": "ubuntu-latest",
      "start_time": "2024-01-01 10:00:00",
      "complete_time": "2024-01-01 10:02:00"
    }
  ]
}

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing or invalid access token)
400 Invalid parameters or the request could not be parsed
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