Skip to main content
REST API 现已经过版本控制。 有关详细信息,请参阅“关于 API 版本控制”。

TODOCS

TODOCS

Delete attestations in bulk

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

“Delete attestations in bulk”的细粒度访问令牌

此端点支持以下精细令牌类型:

精细令牌必须具有以下权限集:

  • "Attestations" repository permissions (write)

“Delete attestations in bulk”的参数

标头
名称, 类型, 说明
accept string

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

路径参数
名称, 类型, 说明
org string 必须

The organization name. The name is not case sensitive.

正文参数
名称, 类型, 说明
subject_digests array of strings 必须

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

“Delete attestations in bulk”的 HTTP 响应状态代码

状态代码说明
200

OK

404

Resource not found

Delete attestations by subject digest

Delete an artifact attestation by subject digest.

“Delete attestations by subject digest”的细粒度访问令牌

此端点支持以下精细令牌类型:

精细令牌必须具有以下权限集:

  • "Attestations" repository permissions (write)

“Delete attestations by subject digest”的参数

标头
名称, 类型, 说明
accept string

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

路径参数
名称, 类型, 说明
org string 必须

The organization name. The name is not case sensitive.

subject_digest string 必须

Subject Digest

“Delete attestations by subject digest”的 HTTP 响应状态代码

状态代码说明
200

OK

204

No Content

404

Resource not found

“Delete attestations by subject digest”的示例代码

请求示例

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.

“Delete attestations by ID”的细粒度访问令牌

此端点支持以下精细令牌类型:

精细令牌必须具有以下权限集:

  • "Attestations" repository permissions (write)

“Delete attestations by ID”的参数

标头
名称, 类型, 说明
accept string

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

路径参数
名称, 类型, 说明
org string 必须

The organization name. The name is not case sensitive.

attestation_id integer 必须

Attestation ID

“Delete attestations by ID”的 HTTP 响应状态代码

状态代码说明
200

OK

204

No Content

403

Forbidden

404

Resource not found

“Delete attestations by ID”的示例代码

请求示例

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