reposListAttestations
List attestations
Details
- Method:
GET - Path:
/repos/{owner}/{repo}/attestations/{subject_digest} - Operation ID:
repos/list-attestations
Parameters
{
"owner": {
"description": "The account owner of the repository. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"repo": {
"description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"per_page": {
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "integer"
},
"before": {
"description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "string"
},
"after": {
"description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "string"
},
"subject_digest": {
"description": "The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`.",
"required": true,
"location": "path",
"type": "string"
},
"predicate_type": {
"description": "Optional filter for fetching attestations with a given predicate type.\nThis option accepts `provenance`, `sbom`, `release`, or freeform text\nfor custom predicate types.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"type": "object",
"properties": {
"attestations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bundle": {
"type": "object",
"properties": {
"mediaType": {
"type": "string"
},
"verificationMaterial": {
"type": "object",
"properties": {},
"additionalProperties": true
},
"dsseEnvelope": {
"type": "object",
"properties": {},
"additionalProperties": true
}
},
"description": "The attestation's Sigstore Bundle.\nRefer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information."
},
"repository_id": {
"type": "integer"
},
"bundle_url": {
"type": "string"
},
"initiator": {
"type": "string"
}
}
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('reposListAttestations', {
# Add required parameters here
})