# List Webhook Rules

> Management API · Webhook Rules

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

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 | — |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `$orderby` | string | No | Specifies the key by which the result collection should be ordered. |
| `$filter` | string | No | Restricts the set of items returned. |
| `$top` | string | No | Specifies a non-negative integer `n` that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value `n`. |
| `$skiptoken` | string | No | Specifies a start offset to support paginated results. Use `@odata.nextLink` in the result object to enumerate the collection - it will be present only if there's more than one page of entities. |

## Example request

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

## Responses

### 200 — A list of webhook rules

- `value` · list of objects · **Required** — A list of Webhook rules
  - Array items (object):
    - `metadata` · object · **Required** — Webhook rule metadata.
      - `id` · string · **Required** · _format: uuid_ — The ID of the webhook.
      - `name` · string · **Required** — The name of the webhook. Unique within a project.
    - `spec` · object · **Required** — Webhook rule spec.
      - `authentication` · object · Optional — Authentication details.
        - `headers` · map from strings to string · Optional — Authentication headers.
          - `[any key]` · string — map of additional properties
        - `queryParams` · map from strings to string · Optional — Authentication query parameters.
          - `[any key]` · string — map of additional properties
      - `enabled` · boolean · **Required** — Indicates whether the webhook is enabled.
      - `events` · list of enums · **Required** — List of events that trigger the webhook.
        - Array items (enum):
      - `headers` · map from strings to string · Optional — Headers to include in the webhook request.
        - `[any key]` · string — map of additional properties
      - `queryParams` · map from strings to string · Optional — Query parameters to include in the webhook request.
        - `[any key]` · string — map of additional properties
      - `url` · string · **Required** — The URL the webhook should call.

Example:

```json
{
  "value": [
    {
      "metadata": {
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "string"
      },
      "spec": {
        "authentication": {
          "headers": {
            "key": "string"
          },
          "queryParams": {
            "key": "string"
          }
        },
        "enabled": true,
        "events": [
          "MediaKind.JobStarted"
        ],
        "headers": {
          "key": "string"
        },
        "queryParams": {
          "key": "string"
        },
        "url": "string"
      }
    }
  ]
}
```

### 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`
