Delete all issue labels¶
DELETE /api/v5/repos/{owner}/{repo}/issues/{number}/labels
This endpoint deletes all labels of an issue in the specified repository, locating the target by repository namespace address and issue number. On success it returns an empty object, achieving overall cleanup of the issue's labels.
Access token support¶
- AtomGit user access tokens
Anonymous access allowed¶
Anonymous access is not allowed for this endpoint.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
owner |
path | string | Yes | The namespace address the repository belongs to (the address path of an enterprise, organization, or individual) |
repo |
path | string | Yes | Repository path |
number |
path | string | Yes | Issue number (case-sensitive, no need to add a #) |
access_token |
query | string | Yes | User authorization code |
Response parameters¶
This endpoint has no response fields; after successful deletion the response body is an empty object {}.
Error responses¶
401 Unauthenticated
404 Resource not found
The actual error field names are determined by what the backend returns.
HTTP status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK); returns an empty object on successful deletion |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Resource not found |
500 |
Internal server error |
Request example¶
Parameter notes¶
Replace
<owner>with the namespace address the repository belongs to (the address path of an enterprise, organization, or individual); replace<repo>with the repository path; replace<number>with the issue number (case-sensitive, no need to add a#); replace<token>with your AtomGit user access token.
cURL¶
curl -X DELETE 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/labels?access_token=<token>' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browsers)
const url = new URL("https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/labels");
url.searchParams.set("access_token", "<token>");
const response = await fetch(url, {
method: "DELETE",
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.delete(
"https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/labels",
params={"access_token": "<token>"},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing/invalid access credentials) |
403 |
Forbidden |
404 |
Resource not found |
500 |
Internal system error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc