Get the list of reactions for an Issue¶
GET /api/v5/repos/{owner}/{repo}/issues/{number}/user_reactions
This endpoint retrieves the list of user reactions for a specified Issue. It supports filtering by emoji and returns reaction records and the corresponding user information with pagination.
Access token support¶
- AtomGit user access token (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 (the address path of an enterprise, organization, or individual) |
repo |
path | string | Yes | Repository path (path) |
number |
path | integer | Yes | Issue number (case-sensitive; no need to add the # sign) |
page |
query | integer | No | Current page number; must be a positive integer |
per_page |
query | integer | No | Number of items per page; must be a positive integer |
emoji_name |
query | string | No | Emoji. Optional values: like, dislike, smile, confused, love, rocket, eyes, party |
Response parameters¶
The response body is an array whose elements are Issue reaction objects.
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
id |
string | Yes | No | Reaction ID |
emoji |
string | Yes | No | Emoji |
emoji_name |
string | Yes | No | Emoji enum value |
user |
object | Yes | No | Information about the user who reacted |
user object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
user.login |
string | Yes | No | User login name |
user.name |
string | Yes | No | User nickname |
user.avatar_url |
string | Yes | No | User avatar address |
user.object_id |
string | Yes | No | User object ID |
Error responses¶
This endpoint has no business-level error responses; authentication and parameter validation failures are handled uniformly by the platform.
HTTP status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
401 |
Requires authentication (Requires authentication) |
403 |
Forbidden (Forbidden) |
404 |
Resource not found (Not found) |
Request example¶
Parameter notes¶
The example can be used as-is for a successful call; this endpoint allows anonymous access and can also carry an access token.
Replace
<owner>with the address path of the namespace that owns the repository (the address path of an enterprise, organization, or individual); replace<repo>with the repository path (path); replace<number>with the Issue number (case-sensitive; no need to add the # sign); replace<token>with your AtomGit user access token (optional).
cURL¶
curl -X GET 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/user_reactions?page=1&per_page=20&emoji_name=like' \
-H 'Accept: application/json'
To carry a token:
curl -X GET 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/user_reactions?page=1&per_page=20' \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const response = await fetch(
"https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/user_reactions?page=1&per_page=20&emoji_name=like",
{
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>/issues/<number>/user_reactions",
params={"page": 1, "per_page": 20, "emoji_name": "like"},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
[
{
"id": "10001",
"emoji": "👍",
"emoji_name": "like",
"user": {
"login": "octocat",
"name": "Octo Cat",
"avatar_url": "https://api.atomgit.com/avatar.png",
"object_id": "123456"
}
}
]
Error codes¶
| Error code | Description |
|---|---|
400 |
Invalid parameters or unparsable request |
401 |
Unauthenticated or invalid credentials (missing or invalid access credential) |
403 |
Forbidden |
404 |
Request path does not exist |
405 |
Request method not allowed |
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