Get artifact details¶
GET /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}
Query the details of the specified artifact in the repository.
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) |
artifact_id |
path | string | Yes | Artifact ID |
access_token |
query | string | No | User authorization code (anonymous access is allowed, so it can be omitted) |
Response parameters¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
id |
string | — | — | Artifact ID |
name |
string | — | — | Artifact name |
size_bytes |
integer | — | — | Artifact size (bytes) |
workflow_id |
string | — | — | Workflow ID |
workflow_run_id |
string | — | — | Workflow run ID |
digest |
string | — | — | SHA256 digest |
expires_at |
string | — | — | Expiration time(millisecond timestamp) |
created_at |
string | — | — | Creation time(millisecond timestamp) |
updated_at |
string | — | — | Update time(millisecond timestamp) |
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 |
The requested artifact does not exist (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;<artifact_id>is replaced with the artifact ID;<token>is replaced with your AtomGit user access token (optional; it may be omitted when anonymous access is allowed).
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/artifacts/<artifact_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/artifacts/<artifact_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/artifacts/<artifact_id>",
headers={
"Accept": "application/json",
},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
{
"id": "123456",
"name": "my-artifact",
"size_bytes": 2048,
"workflow_id": "1234567",
"workflow_run_id": "7654321",
"digest": "sha256:…",
"expires_at": "1710000000000",
"created_at": "1700000000000",
"updated_at": "1700000000000"
}
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing or invalid access token) |
403 |
Forbidden; no permission to view this artifact |
404 |
The request path or artifact does not exist |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc