아티팩트 증명에 대한 REST API 엔드포인트
REST API를 사용하여 아티팩트 증명을 관리합니다.
List attestations
List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.
The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the attestations:read
permission is required.
Please note: in order to offer meaningful security benefits, an attestation's signature and timestamps must be cryptographically verified, and the identity of the attestation signer must be validated. Attestations can be verified using the GitHub CLI attestation verify
command. For more information, see our guide on how to use artifact attestations to establish a build's provenance.
"List attestations"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 어떤 권한도 필요하지 않습니다.
공용 리소스만 요청되는 경우 인증 없이 이 엔드포인트를 사용할 수 있습니다.
"List attestations"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
username string RequiredThe handle for the GitHub user account. |
subject_digest string RequiredSubject Digest |
속성, 형식, 설명 |
---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
before string A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API." |
after string A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
"List attestations"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
201 | Created |
204 | No Content |
404 | Resource not found |
"List attestations"에 대한 코드 샘플
GHE.com에서 GitHub에 액세스하는 경우 api.github.com
을 api.SUBDOMAIN.ghe.com
의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/users/USERNAME/attestations/SUBJECT_DIGEST
Response