Puntos de conexión de la API de REST para atestaciones de artefactos
Use la API de REST para administrar las atestaciones de artefactos.
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.
Tokens de acceso específicos para "List attestations"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Este punto de conexión se puede usar sin autenticación si solo se solicitan recursos públicos.
Parámetros para "List attestations"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
username string RequeridoThe handle for the GitHub user account. |
subject_digest string RequeridoSubject Digest |
Nombre, Tipo, Descripción |
---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado: |
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." |
Códigos de estado de respuesta HTTP para "List attestations"
status code | Descripción |
---|---|
200 | OK |
201 | Created |
204 | No Content |
404 | Resource not found |
Ejemplos de código para "List attestations"
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Ejemplos de solicitud
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
Status: 200