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 |
名称, 类型, 说明 |
---|
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 |
名称, 类型, 说明 |
---|
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”的示例代码
如果你通过 GHE.com 访问 GitHub,请将 api.github.com
替换为你的企业在 api.SUBDOMAIN.ghe.com
上的专用子域。
请求示例
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 |
名称, 类型, 说明 |
---|
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”的示例代码
如果你通过 GHE.com 访问 GitHub,请将 api.github.com
替换为你的企业在 api.SUBDOMAIN.ghe.com
上的专用子域。
请求示例
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