Get the modification history of an Issue¶
GET /api/v5/repos/{owner}/{repo}/issues/{number}/modify_history
This endpoint retrieves the modification history of an Issue in the specified repository. Each record contains the modified content, modification time, and operator information.
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 organization or individual) |
repo |
path | string | Yes | Repository path (path) |
number |
path | string | Yes | Issue number (case-sensitive; no need to add the # sign) |
Response parameters¶
This endpoint returns a JSON array. Each element in the array is a record of Issue modification history, with the following fields:
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
id |
string | Yes | No | Modification history record ID |
created_at |
string | Yes | No | Creation time |
updated_at |
string | Yes | No | Update time |
deleted |
boolean | Yes | No | Whether it has been deleted |
created |
boolean | Yes | No | Whether this is a creation |
content |
string | Yes | No | Modified content |
user |
object | Yes | No | Information about the user who modified it |
updated_user |
object | Yes | No | Information about the user who updated it |
user object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
user.login |
string | Yes | No | Login name |
user.name |
string | Yes | No | Username |
user.avatar_url |
string | Yes | No | User avatar address |
user.object_id |
string | Yes | No | User object ID |
updated_user object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
updated_user.login |
string | Yes | No | Login name |
updated_user.name |
string | Yes | No | Username |
updated_user.avatar_url |
string | Yes | No | User avatar address |
updated_user.object_id |
string | Yes | No | User object ID |
Error responses¶
400 Invalid parameters
401 Unauthenticated
404 Resource not found
Note: Error response field names are subject to the actual backend response.
HTTP status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
400 |
Bad request (Bad Request) |
401 |
Requires authentication (Requires authentication) |
404 |
Resource not found (Not Found) |
Request example¶
Parameter notes¶
Replace
<owner>with the address path of the namespace that owns the repository (the address path of an organization or individual); replace<repo>with the repository path (path); replace<number>with the Issue number (case-sensitive; no need to add the # sign).
This endpoint allows anonymous access, so no token is required; to carry an AtomGit user access token, append ?access_token=<token> to the URL.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/modify_history' \
-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>/modify_history", {
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>/modify_history",
headers={
"Accept": "application/json",
},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
[
{
"id": "1",
"created_at": "2024-01-01T10:00:00Z",
"updated_at": "2024-01-01T10:00:00Z",
"deleted": false,
"created": true,
"content": "Modified content",
"user": {
"login": "octocat",
"name": "octocat",
"avatar_url": "https://api.atomgit.com/avatars/octocat.png",
"object_id": "1001"
},
"updated_user": {
"login": "octocat",
"name": "octocat",
"avatar_url": "https://api.atomgit.com/avatars/octocat.png",
"object_id": "1001"
}
}
]
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing or invalid access credential) |
400 |
Invalid parameters or unparsable request |
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