# Get Webhook Events

> Management API · Webhook Rules

```http
GET https://app.mk.io/api/v1/projects/{project_name}/webhook/rules/{rule_name}/events
```

Get Events processed for the Webhook Rule.

RBAC Capability Required: `webhooks.config.get`

## Authentication

- `Authorization` header — Bearer authentication of the form `Bearer <token>`.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_name` | string | Yes | — |
| `rule_name` | string | Yes | — |

## Example request

```bash
curl -X GET "https://app.mk.io/api/v1/projects/{project_name}/webhook/rules/{rule_name}/events" \
  -H "Authorization: Bearer <token>"
```

## Responses

### 200 — A single Webhook Rule

- `@odata.nextLink` · string · Optional — @odata.nextLink URL if the page length and number of items match.
- `supplemental` · object · **Required** — Supplemental info
  - `count` · integer · **Required** — Number of items returned
  - `kind` · string · **Required** — Type of items in the list
  - `operation` · string · **Required** — Operation type. Should always say 'list'
  - `pagination` · object · **Required** — Pagination info
    - `end` · integer · **Required** — Position of the last item in the list
    - `records` · integer · **Required** — Total number of items returned in the list
    - `start` · integer · **Required** — Position of the first item in the list
    - `total` · integer · **Required** — Total number of items in the project
  - `subscription` · object · Optional — Project info
    - `id` · string · **Required** — Project ID
    - `name` · string · **Required** — Project name
- `value` · list of objects · **Required** — A list of Events for a Webhook rule.
  - Array items (object):
    - `created` · string · **Required** · _format: date-time_ — Time the Event was created.
    - `source` · string · **Required** — Path to the resource that triggered the Event.
    - `status` · enum · **Required** — Event send status.
      - Allowed values: `Pending`, `Retrying`, `Failed`, `Sent`
    - `type` · enum · **Required** — The type of the Event.
      - Allowed values: `MediaKind.JobStarted`, `MediaKind.JobFinished`, `MediaKind.StreamingLocatorCreated`, `MediaKind.ChannelInstanceStarted`, `MediaKind.ChannelInstanceStopped`, `MediaKind.ChannelInstanceError`, `MediaKind.ScheduledOperationAccepted`, `MediaKind.ScheduledOperationCompleted`, `MediaKind.ScheduledOperationError`, `MediaKind.ScheduledOperationOngoing`

Example:

```json
{
  "@odata.nextLink": "string",
  "supplemental": {
    "count": 0,
    "kind": "string",
    "operation": "string",
    "pagination": {
      "end": 0,
      "records": 0,
      "start": 0,
      "total": 0
    },
    "subscription": {
      "id": "string",
      "name": "string"
    }
  },
  "value": [
    {
      "created": "2024-01-01T00:00:00Z",
      "source": "string",
      "status": "Pending",
      "type": "MediaKind.JobStarted"
    }
  ]
}
```

### 400 — Bad Request

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 401 — Unauthorized

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 403 — Forbidden

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 404 — Not Found

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 429 — Too Many Requests

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 500 — Internal Server Error

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

---

Source spec: `management-api` · operationId: `[get]_/api/v1/projects/{project_name}/webhook/rules/{rule_name}/events`
