# Event Forwarding Exclusions

The Event Forwarding feature is an API that determines, at a specific Application in OvenMediaEngine, whether various events are forwarded to the next processing stage (internal or external). It allows you to control whether events generated by multiple Providers such as `WebRTC`, `RTMP`, `OVT`, and `SRT` are passed next stage, and it is mainly used for security hardening and operational policy control.

## API Interface

### Configuring Event Forwarding Exclusions

By default, Event Forwarding is enabled for all events. If you need to block specific event format(s) when forwarding events, you can specify them using the `setEventForwardPolicy` API.

This policy applies to all egress streams within the target Application.

> **Request**

<details>

<summary><mark style="color:blue;">POST</mark> /v1/vhosts/{vhost}/apps/{app}:setEventForwardPolicy</summary>

**Header**

```http
Authorization: Basic {credentials}

# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>
```

**Body**

```json
{
    "dropEvent" : ["amf", "scte35"]
}
```

</details>

> **Response**

<details>

<summary><mark style="color:blue;">200</mark> Ok</summary>

The request has succeeded

**Header**

```http
Content-Type: application/json
```

**Body**

```json
{
    "message": "OK",
    "statusCode": 200
}
```

</details>

<table><thead><tr><th width="154">Parameter</th><th width="159.5555419921875" align="center">Input Type</th><th>Description</th></tr></thead><tbody><tr><td><code>dropEvent</code></td><td align="center">Array</td><td><p>A list of event format(s) to exclude from forwarding.</p><ul><li><code>amf</code>, <code>scte35</code>, <code>id3v2</code>, <code>webvtt</code>, <code>cue</code>, <code>oven_event</code></li></ul></td></tr></tbody></table>

{% hint style="warning" %}
Events generated directly by you via the REST API or the `EventGeneration` XML configuration are delivered regardless of this configuration.
{% endhint %}

### Querying Event Forwarding

> **Request**

<details>

<summary><mark style="color:blue;">GET</mark> /v1/vhosts/{vhost}/apps/{app}:EventForwardPolicy</summary>

**Header**

```http
Authorization: Basic {credentials}

# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>
```

</details>

> **Response**

<details>

<summary><mark style="color:blue;">200</mark> Ok</summary>

The request has succeeded

**Header**

```
Content-Type: application/json
```

**Body**

```json
{
    "message": "OK",
    "response": {
      "dropEvent" : ["amf", "scte35"]
    }
    "statusCode": 200
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ovenmediaengine-enterprise.gitbook.io/guide/features/workflow-integration-and-external-system-connectivity/event-forwarding-exclusions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
