Stop the running pipeline instance¶
POST /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/stop
Call this endpoint to stop the running pipeline instance.
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 operation succeeded |
Error responses¶
401 Unauthenticated
403 Forbidden
Error field names are subject to what the backend actually returns; if in doubt, follow the actual response.
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Not Found |
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);<run_id>is replaced with the pipeline run ID;<token>is replaced with your AtomGit user access token.
cURL¶
curl -X POST 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/stop?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>/stop?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>/stop",
params={"access_token": "<token>"},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing or invalid access token) |
403 |
Forbidden (no permission to perform this operation) |
404 |
The request path does not exist |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc