Skip to main content
The REST API is now versioned. For more information, see "About API versioning."

TODOCS

TODOCS

Delete attestations in bulk

Delete artifact attestations in bulk by either subject digests or unique ID.

Fine-grained access tokens for "Delete attestations in bulk"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Attestations" repository permissions (write)

Parameters for "Delete attestations in bulk"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

Body parameters
Name, Type, Description
subject_digests array of strings Required

List of subject digests associated with the artifact attestations to delete.

HTTP response status codes for "Delete attestations in bulk"

Status codeDescription
200

OK

404

Resource not found

Delete attestations by subject digest

Delete an artifact attestation by subject digest.

Fine-grained access tokens for "Delete attestations by subject digest"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Attestations" repository permissions (write)

Parameters for "Delete attestations by subject digest"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

subject_digest string Required

Subject Digest

HTTP response status codes for "Delete attestations by subject digest"

Status codeDescription
200

OK

204

No Content

404

Resource not found

Code samples for "Delete attestations by subject digest"

Request examples

delete/orgs/{org}/attestations/digest/{subject_digest}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/attestations/digest/SUBJECT_DIGEST

Response

Status: 200

Delete attestations by ID

Delete an artifact attestation by unique ID that is associated with a repository owned by an org.

Fine-grained access tokens for "Delete attestations by ID"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Attestations" repository permissions (write)

Parameters for "Delete attestations by ID"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

attestation_id integer Required

Attestation ID

HTTP response status codes for "Delete attestations by ID"

Status codeDescription
200

OK

204

No Content

403

Forbidden

404

Resource not found

Code samples for "Delete attestations by ID"

Request examples

delete/orgs/{org}/attestations/{attestation_id}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/attestations/ATTESTATION_ID

Response

Status: 200