Open Context Protocol is live! 🚀 Read the launch post
usersListAttestationsBulk

usersListAttestationsBulk

List attestations by bulk subject digests

Details

  • Method: POST
  • Path: /users/{username}/attestations/bulk-list
  • Operation ID: users/list-attestations-bulk

Parameters

{
  "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"
  },
  "username": {
    "description": "The handle for the GitHub user account.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "subject_digests": {
    "description": "List of subject digests to fetch attestations for.",
    "required": true,
    "location": "body",
    "type": "array"
  },
  "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": "body",
    "type": "string"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "attestations_subject_digests": {
      "type": "object",
      "additionalProperties": {
        "nullable": true,
        "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 bundle of the attestation."
            },
            "repository_id": {
              "type": "integer"
            },
            "bundle_url": {
              "type": "string"
            }
          }
        }
      },
      "description": "Mapping of subject digest to bundles."
    },
    "page_info": {
      "type": "object",
      "properties": {
        "has_next": {
          "type": "boolean",
          "description": "Indicates whether there is a next page."
        },
        "has_previous": {
          "type": "boolean",
          "description": "Indicates whether there is a previous page."
        },
        "next": {
          "type": "string",
          "description": "The cursor to the next page."
        },
        "previous": {
          "type": "string",
          "description": "The cursor to the previous page."
        }
      },
      "description": "Information about the current page."
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('usersListAttestationsBulk', {
    # Add required parameters here
})