Skip to content

Delete issue label

DELETE /api/v5/repos/{owner}/{repo}/issues/{number}/labels/{name}

Deletes labels from an issue in the specified repository; multiple label names can be separated by commas for bulk deletion. Returns an empty object on success.

Access token support

  • AtomGit user access token (AtomGit user access tokens)

Anonymous access

This endpoint does not allow 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 an individual)
repo path string Yes Repository path (path)
number path string Yes The issue number, that is, the ordinal of the issue in this repository
name path string Yes Label name (separate multiple labels with commas for bulk deletion, for example bug,feature)
access_token query string Yes User authorization code

Response parameters

On success this endpoint returns an empty object {} with no response fields.

Error responses

401 Unauthenticated

{
  "message": "Missing or invalid access token"
}

403 Forbidden

{
  "message": "You do not have permission to perform this operation"
}

404 Resource not found

{
  "message": "Issue or label not found"
}

The error responses above are illustrative only; the actual field names and structure returned by the backend take precedence.

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

Replace <owner> with the address path of the namespace that owns the repository (the address path of an organization or an individual); replace <repo> with the repository path (path); replace <number> with the issue number (the ordinal of the issue in this repository); replace <name> with the label name (separate multiple labels with commas for bulk deletion, for example bug,feature); replace <token> with your AtomGit user access token.

cURL

curl -X DELETE 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/labels/<name>?access_token=<token>'

JavaScript

const response = await fetch("https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/labels/<name>?access_token=<token>", {
  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/<name>",
    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 or invalid access credential)
403 Forbidden (insufficient permission)
404 The requested resource does not exist
500 Internal server error

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc