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

reposListWebhookDeliveries

List deliveries for a repository webhook

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/hooks/{hook_id}/deliveries
  • Operation ID: repos/list-webhook-deliveries

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"
  },
  "hook_id": {
    "description": "The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery.",
    "required": true,
    "location": "path",
    "type": "integer"
  },
  "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"
  },
  "cursor": {
    "description": "Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "type": "array",
  "items": {
    "title": "Simple webhook delivery",
    "description": "Delivery made by a webhook, without request and response information.",
    "type": "object",
    "properties": {
      "id": {
        "description": "Unique identifier of the webhook delivery.",
        "type": "integer",
        "format": "int64",
        "example": 42
      },
      "guid": {
        "description": "Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event).",
        "type": "string",
        "example": "58474f00-b361-11eb-836d-0e4f3503ccbe"
      },
      "delivered_at": {
        "description": "Time when the webhook delivery occurred.",
        "type": "string",
        "format": "date-time",
        "example": "2021-05-12T20:33:44Z"
      },
      "redelivery": {
        "description": "Whether the webhook delivery is a redelivery.",
        "type": "boolean",
        "example": false
      },
      "duration": {
        "description": "Time spent delivering.",
        "type": "number",
        "example": 0.03
      },
      "status": {
        "description": "Describes the response returned after attempting the delivery.",
        "type": "string",
        "example": "failed to connect"
      },
      "status_code": {
        "description": "Status code received when delivery was made.",
        "type": "integer",
        "example": 502
      },
      "event": {
        "description": "The event that triggered the delivery.",
        "type": "string",
        "example": "issues"
      },
      "action": {
        "description": "The type of activity for the event that triggered the delivery.",
        "type": "string",
        "example": "opened",
        "nullable": true
      },
      "installation_id": {
        "description": "The id of the GitHub App installation associated with this event.",
        "type": "integer",
        "format": "int64",
        "example": 123,
        "nullable": true
      },
      "repository_id": {
        "description": "The id of the repository associated with this event.",
        "type": "integer",
        "format": "int64",
        "example": 123,
        "nullable": true
      },
      "throttled_at": {
        "description": "Time when the webhook delivery was throttled.",
        "type": "string",
        "format": "date-time",
        "example": "2021-05-12T20:33:44Z",
        "nullable": true
      }
    },
    "required": [
      "id",
      "guid",
      "delivered_at",
      "redelivery",
      "duration",
      "status",
      "status_code",
      "event",
      "action",
      "installation_id",
      "repository_id"
    ]
  }
}

Usage

from ocp_agent import OCPAgent

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

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