Skip to content

Delete the specified artifact

DELETE /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Delete the specified artifact in the repository.

Access token support

  • 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 (enterprise, organization, or personal address path)
repo path string Yes Repository path (path)
artifact_id path string Yes Artifact ID
access_token query string Yes User authorization code

Response parameters

On success, this endpoint returns 204 No Content with no response body.

Error responses

A success response alone is not enough: callers need to know what failures look like to write error handling.

401 Unauthenticated

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

404 Artifact not found

{
  "error": "not_found",
  "message": "Artifact not found"
}

The error field names returned by the backend take precedence.

HTTP response status codes

Status code Description
204 No Content
401 Requires authentication
403 Forbidden
404 Not Found

Request example

Parameter notes

<owner> is replaced with the address path of the namespace that owns the repository (enterprise, organization, or personal address path); <repo> is replaced with the repository path; <artifact_id> is replaced with the artifact ID to delete; <token> is replaced with your AtomGit user access token.

cURL

curl -X DELETE 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/artifacts/<artifact_id>?access_token=<token>' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch(
  "https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/artifacts/<artifact_id>?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/v8/repos/<owner>/<repo>/actions/artifacts/<artifact_id>",
    params={"access_token": "<token>"},
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

Response example

Status code: 204

A successful deletion returns 204 No Content with no response body.

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing or invalid access token)
400 Invalid parameters or the request could not be parsed
403 Forbidden; no permission to delete this artifact
404 The request path or artifact does not exist
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