Get all repository releases¶
GET /api/v5/repos/{owner}/{repo}/releases
Get the list of all releases for the specified 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 | Namespace address that owns the repository (enterprise, organization, or personal address path) |
repo |
path | string | Yes | Repository path (path) |
access_token |
query | string | No | User authorization code |
direction |
query | string | No | Ascending/descending order; ascending if omitted |
page |
query | integer | No | Current page number |
per_page |
query | integer | No | Number of items per page, maximum 100, default 20 |
Response parameters¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
tag_name |
string | Yes | No | Tag name |
target_commitish |
string | Yes | No | Target commit SHA |
prerelease |
boolean | Yes | No | Whether this is a prerelease |
name |
string | Yes | No | Release name |
body |
string | Yes | No | Release notes |
author |
object | Yes | No | Release author information |
created_at |
string | Yes | No | Creation time |
assets |
object[] | Yes | No | Release attachment list |
release_status |
string | Yes | No | Release status |
author object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
author.id |
string | Yes | No | User ID |
author.login |
string | Yes | No | User name |
author.name |
string | Yes | No | User nickname |
author.avatar_url |
string | Yes | No | User avatar URL |
author.html_url |
string | Yes | No | User profile URL |
author.type |
string | Yes | No | User type |
author.url |
string | Yes | No | User API URL |
assets object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
assets.browser_download_url |
string | Yes | No | Browser download URL |
assets.name |
string | Yes | No | Attachment name |
assets.type |
string | Yes | No | Attachment type |
assets.id |
number | No | Yes | Attachment ID |
Error response¶
400 Invalid parameters
401 Unauthenticated
404 Resource does not exist
The actual error field names are determined by the backend response.
HTTP status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
304 |
Not modified |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Not found |
Request example¶
Parameter details¶
Replace
<owner>with the namespace address that owns the repository (enterprise, organization, or personal address path); replace<repo>with the repository path (path).
cURL¶
curl -X GET 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/releases?page=1&per_page=20' \
-H 'Accept: application/json'
This endpoint allows anonymous access. To access a private repository, include an access token:
?access_token=<token>.
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v5/repos/<owner>/<repo>/releases?page=1&per_page=20", {
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/v5/repos/<owner>/<repo>/releases",
params={"page": 1, "per_page": 20},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
[
{
"tag_name": "v1.0.217",
"target_commitish": "930401b0dd58a809fce34da091b8aa3d6083cb33",
"prerelease": false,
"name": "release1 name",
"body": "release1 description",
"author": {
"id": "26593",
"login": "fenglonghui",
"name": "Long Hui",
"avatar_url": "https://api.atomgit.com/avatar.png",
"html_url": "https://api.atomgit.com/fenglonghui",
"type": "User",
"url": "https://api.atomgit.com/api/v5/users/fenglonghui"
},
"created_at": "2025-01-16T19:58:07+08:00",
"assets": [
{
"browser_download_url": "https://api.atomgit.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.zip",
"name": "serde-v1.0.217.zip",
"type": "zip",
"id": 1
}
],
"release_status": "published"
}
]
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing or invalid access token) |
400 |
Invalid parameters or the request cannot be parsed |
404 |
Request path does not exist |
405 |
Request method 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