Skip to content

Rerun the pipeline

POST /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/rerun

Call this endpoint to rerun the pipeline.

Access token support

  • AtomGit user access tokens

Anonymous access

This endpoint does not allow 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
access_token query string Yes User authorization code

Response parameters

Field Type Always returned Nullable Description
success boolean Yes No Whether the rerun pipeline operation succeeded

Error responses

The error field names returned by the backend take precedence.

400 Invalid parameters

{
  "error": "invalid_request",
  "message": "Invalid parameters or the request could not be parsed"
}

401 Unauthenticated

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

HTTP response status codes

Status code Description
200 Success (OK)
401 Requires authentication
403 Forbidden
404 The request path does not exist (Not found)

Request example

cURL

curl -X POST 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/rerun?access_token=<token>' \
  -H 'Accept: application/json'

<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; <token> is replaced with your AtomGit user access token.

JavaScript

// Native fetch (Node.js 18+ / browser)
const runId = "<run_id>";
const response = await fetch(
  `https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/${runId}/rerun?access_token=<token>`,
  {
    method: "POST",
    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.post(
    "https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/rerun",
    params={"access_token": "<token>"},
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "success": true
}

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