Skip to content

Delete a project protected tag

DELETE /api/v5/repos/{owner}/{repo}/protected_tags/{tag_name}

This endpoint deletes a protected tag in the specified repository. You must provide the namespace address to which the repository belongs, the repository path, and the tag name. After deletion the tag is no longer protected, and the endpoint 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 Namespace address to which the repository belongs (address path of the organization or user)
repo path string Yes Repository path (path)
tag_name path string Yes Tag name
access_token query string Yes User authorization code

Response parameters

The response body of this endpoint is an empty object {} with no fields.

Error responses

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

(The actual error field names are subject to what the backend returns.)

HTTP response status codes

Status code Description
200 Success (OK)
401 Authentication required (Requires authentication)
403 Access forbidden (Forbidden)
404 Not found (Not found)
500 Internal system error (Internal server error)

Request example

Parameter description

Replace <owner> with the namespace address to which the repository belongs (address path of the organization or user); replace <repo> with the repository path (path); replace <tag_name> with the name of the protected tag to delete; replace <token> with your AtomGit user access token.

cURL

curl -X DELETE 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/protected_tags/<tag_name>?access_token=<token>' \
  -H 'Accept: application/json'

JavaScript

const response = await fetch("https://api.atomgit.com/api/v5/repos/<owner>/<repo>/protected_tags/<tag_name>?access_token=<token>", {
  method: "DELETE",
  headers: {
    "Accept": "application/json",
  },
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

Python

import requests

resp = requests.delete(
    "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/protected_tags/<tag_name>",
    params={"access_token": "<token>"},
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.status_code)

Response example

Status code: 200

{}

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing or invalid access credentials)
403 Access forbidden; no permission to perform this operation
404 The request path does not exist, or the protected tag does not exist
500 Internal system error

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