List the artifacts in the repository¶
GET /api/v8/repos/{owner}/{repo}/actions/artifacts
List the artifacts in the repository with pagination, with filtering by name and sorting supported.
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) |
name |
query | string | No | Artifact name filter (fuzzy match) |
sort |
query | string | No | Sort field; currently only created is supported |
direction |
query | string | No | Sort direction, asc or desc |
page |
query | integer | No | Current page number, default 1 |
per_page |
query | integer | No | Number of items per page, default 10 |
Response parameters¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
total_count |
integer | Yes | No | Total number of artifacts |
artifacts |
object[] | Yes | No | Artifact list |
artifacts object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
artifacts.id |
string | Yes | No | Artifact ID |
artifacts.name |
string | Yes | No | Artifact name |
artifacts.size_bytes |
integer | Yes | No | Artifact size (bytes) |
artifacts.workflow_id |
string | Yes | No | Workflow ID |
artifacts.workflow_run_id |
string | Yes | No | Workflow run ID |
artifacts.digest |
string | Yes | No | SHA256 digest |
artifacts.expires_at |
string | Yes | No | Expiration time (millisecond timestamp) |
artifacts.created_at |
string | Yes | No | Creation time (millisecond timestamp) |
artifacts.updated_at |
string | Yes | No | Update time (millisecond timestamp) |
Error responses¶
Under normal conditions the endpoint returns only 200; the following are generic failure shapes that the gateway/authentication layer may return, and the 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 |
401 |
Requires authentication |
403 |
Forbidden |
Request example¶
Parameter notes¶
All placeholders in the examples can be replaced directly before calling:
<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 authentication information. If you need to access a private repository or raise the call quota, you can also carry an AtomGit user access token.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/artifacts?page=1&per_page=10' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const params = new URLSearchParams({
page: "1",
per_page: "10",
});
const response = await fetch(
`https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/artifacts?${params}`,
{
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/artifacts",
params={"page": 1, "per_page": 10},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
{
"total_count": 1,
"artifacts": [
{
"id": "art-123",
"name": "build-output",
"size_bytes": 1048576,
"workflow_id": "wf-1",
"workflow_run_id": "run-1",
"digest": "sha256:0123...",
"expires_at": "1720000000000",
"created_at": "1710000000000",
"updated_at": "1710000000000"
}
]
}
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