Skip to main content
L’API REST est maintenant versionnée. Pour plus d’informations, consultez « À propos des versions de l’API ».

Points de terminaison d’API REST pour les attestations d’artefact

Utilisez l’API REST pour interagir avec les attestations d’artefact.

Delete attestations in bulk

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

Jetons d’accès affinés pour « Delete attestations in bulk »

Ce point de terminaison fonctionne avec les types de jetons précis suivants:

Le jeton précis doit avoir l’ensemble d’autorisations suivant:

  • "Attestations" repository permissions (write)

Paramètres pour « Delete attestations in bulk »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
org string Obligatoire

The organization name. The name is not case sensitive.

Paramètres du corps
Nom, Type, Description
subject_digests array of strings Obligatoire

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

Codes d’état de la réponse HTTP pour « Delete attestations in bulk »

Code d’étatDescription
200

OK

404

Resource not found

Delete attestations by subject digest

Delete an artifact attestation by subject digest.

Jetons d’accès affinés pour « Delete attestations by subject digest »

Ce point de terminaison fonctionne avec les types de jetons précis suivants:

Le jeton précis doit avoir l’ensemble d’autorisations suivant:

  • "Attestations" repository permissions (write)

Paramètres pour « Delete attestations by subject digest »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
org string Obligatoire

The organization name. The name is not case sensitive.

subject_digest string Obligatoire

Subject Digest

Codes d’état de la réponse HTTP pour « Delete attestations by subject digest »

Code d’étatDescription
200

OK

204

No Content

404

Resource not found

Exemples de code pour « Delete attestations by subject digest »

Exemples de requête

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.

Jetons d’accès affinés pour « Delete attestations by ID »

Ce point de terminaison fonctionne avec les types de jetons précis suivants:

Le jeton précis doit avoir l’ensemble d’autorisations suivant:

  • "Attestations" repository permissions (write)

Paramètres pour « Delete attestations by ID »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
org string Obligatoire

The organization name. The name is not case sensitive.

attestation_id integer Obligatoire

Attestation ID

Codes d’état de la réponse HTTP pour « Delete attestations by ID »

Code d’étatDescription
200

OK

204

No Content

403

Forbidden

404

Resource not found

Exemples de code pour « Delete attestations by ID »

Exemples de requête

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