Skip to content

Delete a repository task label

DELETE /api/v5/repos/*/*/labels/*

This endpoint deletes a task label from the specified repository. By passing the repository's namespace address, repository path, and label name, the corresponding label is removed from the repository. On success it returns an empty object.

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
name path string Yes Label name
access_token query string Yes User authorization code

Response parameters

Field Type Always returned Nullable Description
(empty object) object — — Returns an empty JSON object {} on success, with no other response fields

Error responses

401 Unauthenticated

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

404 Not found

{
  "message": "Repository or label does not exist"
}

The error response body field names are determined by what the backend returns; they could not be confirmed from the reference documentation and source code.

HTTP status codes

Status code Description
200 Success (OK); returns an empty object {}
401 Requires authentication
404 Not found

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 <name> with the name of the label to delete; replace <token> with your AtomGit user access token.

cURL

curl -X DELETE 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/labels/<name>?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>/labels/<name>");
url.searchParams.append("access_token", "<token>");

const response = await fetch(url.toString(), {
  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>/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/invalid access credentials)
404 The requested resource does not exist
405 Request method not supported
429 Too many requests, rate limit triggered
500 Internal system error

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