# Event destinations

Have Diamwall send the events feed to Microsoft Sentinel, Splunk or a Syslog receiver for you, instead of pulling it yourself.

An event destination is a subscription: Diamwall reads the [events feed](https://docs.diamwall.com/products/events/) for you and delivers the events to your SIEM. There are three providers: Microsoft Sentinel, Splunk through its HTTP Event Collector (HEC), and Syslog over TLS with the events in CEF. An organization can have up to 8 destinations.

Destinations belong to an organization. The paths start with `/public-api/organizations/{org_public_id}/siem/event-destinations/`.

> **Breaking change: the account paths are gone**
> `/public-api/event-destinations/` was removed, and so was the `bind_current_key` action. Use the organization paths on this page. A destination now belongs to the organization, not to the API key that created it, so there is nothing to bind.

> **Delivery is not switched on yet**
> Sending to SIEMs is still off in production, for every provider. Until it is switched on, creating or activating a destination can answer `503 SIEM_HTTPS_DISABLED`. A Syslog destination answers it before the body is checked, so you do not see field errors yet.

- [Create](#create-a-destination): Point a destination at Sentinel, Splunk or a Syslog receiver.
- [Read](#read-the-state): See the status, the last send and the last error.
- [Change](#change-a-destination): Rename, pause, resume or replace the secret.
- [Delete](#delete-a-destination): End the subscription and forget its position.
- [History](#see-what-was-sent): Every delivery attempt of the last 30 days.

The examples on this page use these shell variables:

```bash
export DIAMWALL_API_KEY="your key"
export DESTINATIONS="https://api.diamwall.com/public-api/organizations/your-organization-public-id/siem/event-destinations/"
```

## Permissions

Each call needs one action of the `siem` permission in the organization. See [Permissions](https://docs.diamwall.com/products/events/#permissions) on the Events feed page for who has it and how it is given.

| Call | Needs |
| --- | --- |
| List and read | `siem.view` |
| Create | `siem.create` |
| Change | `siem.edit` |
| Delete | `siem.delete` |

## Create a destination

[`POST /public-api/organizations/{org_public_id}/siem/event-destinations/` in the API reference](https://docs.diamwall.com/api/#tag/domains/POST/public-api/organizations/{org_public_id}/siem/event-destinations/)

**Microsoft Sentinel**

```bash
curl -X POST "$DESTINATIONS" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sentinel",
    "provider": "sentinel",
    "enabled": true,
    "configuration": {
      "endpoint_url": "https://example.eastus.ingest.monitor.azure.com",
      "tenant_id": "bfe999a1-802d-4e0f-bc38-d3976e256149",
      "client_id": "4845bdfe-3ef5-406e-845e-ad7e98722c8f",
      "dcr_immutable_id": "dcr-0123456789abcdef0123456789abcdef",
      "stream_name": "Custom-DiamWall"
    },
    "credentials": { "client_secret": "your client secret" }
  }'
```

**Splunk**

```bash
curl -X POST "$DESTINATIONS" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Splunk",
    "provider": "splunk",
    "enabled": true,
    "configuration": { "endpoint_url": "https://hec.example.com:8088" },
    "credentials": { "token": "your HEC token" }
  }'
```

**Syslog (CEF)**

```bash
curl -X POST "$DESTINATIONS" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Syslog",
    "provider": "syslog",
    "enabled": true,
    "configuration": {
      "host": "syslog.example.com",
      "port": 6514,
      "max_message_bytes": 2048
    }
  }'
```

Sentinel and Splunk get firewall events with the same values as the [events feed](https://docs.diamwall.com/products/events/#firewall-events), `null` included. In Syslog (CEF), a `null` field is left out, and `act` comes from `event_action`, or `event_name` when it is empty, or else `event_rule`.

A created destination answers `201` with the destination, as in [Read the state](#read-the-state).

| Field | Required | What it is |
| --- | --- | --- |
| `name` | Yes | A name of at most 64 characters. Two destinations cannot share one. |
| `provider` | Yes | `sentinel`, `splunk` or `syslog`. |
| `configuration` | Yes | Where to send. It depends on the provider, see below. |
| `credentials` | Sentinel and Splunk | The secret of the provider, see below. Optional for Syslog. It is write-only: no answer ever returns it. |
| `enabled` | No | Without it the destination starts paused, and you activate it later with a `PATCH`. Send `true` to activate it at creation. |
| `event_type` | No | The event types to send, as a list. Without it the destination follows the published list of event types. |
| `domain_public_id` | No | Send the events of one domain only. |
| `start` | No | Where to begin, as a UTC time at most 7 days back. By default it begins at the last full 5-minute mark. |

What each provider needs:

| Provider | `configuration` | `credentials` |
| --- | --- | --- |
| `sentinel` | `endpoint_url`, `tenant_id`, `client_id`, `dcr_immutable_id` and `stream_name`. All five are required. | `client_secret` |
| `splunk` | `endpoint_url`, the address of the HTTP Event Collector. | `token`, an HEC token |
| `syslog` | `host` is required. `port` and `max_message_bytes` are optional. | `ca_certificate_pem`, optional |

The Syslog fields:

| Field | Values |
| --- | --- |
| `configuration.host` | The receiver. |
| `configuration.port` | `6514` or `5425`. The default is `6514`. |
| `configuration.max_message_bytes` | From `2048` to `8192`. The default is `2048`. |
| `credentials.ca_certificate_pem` | Your own certificate authority: one self-signed root in PEM, at most 16384 characters. If the root has Extended Key Usage, it must include `serverAuth`. Without it, the system roots are used. |

> **Splunk: turn indexer acknowledgment off**
> The HEC token must have indexer acknowledgment disabled. With it enabled, Splunk refuses the events and the destination ends up `blocked`, with `SIEM_SPLUNK_CHANNEL_REQUIRED` in `last_error_code`.

> **Fixed at creation**
> The provider, the endpoint, the filters (`event_type` and `domain_public_id`) and `start` cannot be changed later. Neither can the tenant and the client of a Sentinel destination, or the host and the port of a Syslog destination. To change one of them, delete the destination and create a new one.

## Read the state

[`GET /public-api/organizations/{org_public_id}/siem/event-destinations/{destination_public_id}/` in the API reference](https://docs.diamwall.com/api/#tag/domains/GET/public-api/organizations/{org_public_id}/siem/event-destinations/{destination_public_id}/)

```bash
curl "$DESTINATIONS" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY"
```

The list is paginated: add `?page=2` for the next page. To read one destination, add its `public_id` to the path. The secret is never part of the answer.

```json
{
  "public_id": "a64f8512-990d-4389-b479-af457ea13900",
  "name": "Sentinel",
  "provider": "sentinel",
  "configuration": {
    "endpoint_url": "https://example.eastus.ingest.monitor.azure.com",
    "tenant_id": "bfe999a1-802d-4e0f-bc38-d3976e256149",
    "client_id": "4845bdfe-3ef5-406e-845e-ad7e98722c8f",
    "dcr_immutable_id": "dcr-0123456789abcdef0123456789abcdef",
    "stream_name": "Custom-DiamWall"
  },
  "domain_public_id": null,
  "event_type": null,
  "start": "2026-11-23T12:00:00Z",
  "enabled": true,
  "egress_ips": ["192.0.2.1"],
  "egress_status": "unrestricted",
  "egress_reason_code": null,
  "status": "blocked",
  "last_success_at": null,
  "last_error_code": "SIEM_SENTINEL_CREDENTIAL_REJECTED",
  "last_http_status": 403,
  "next_attempt_at": null,
  "oldest_pending_at": null,
  "created_at": "2026-11-23T12:00:00Z",
  "updated_at": "2026-11-23T12:00:00Z"
}
```

The fields that tell you how delivery is going:

| Field | Meaning |
| --- | --- |
| `status` | One of `paused`, `disabled`, `waiting_for_access`, `ready`, `retry_wait` or `blocked`. |
| `last_success_at` | When events were last delivered, or `null`. |
| `last_error_code` | The code of the last failure, or an empty string. `SIEM_SENTINEL_CREDENTIAL_REJECTED` means Sentinel refused the credentials. `SIEM_SPLUNK_CHANNEL_REQUIRED` means the HEC token has indexer acknowledgment enabled. |
| `last_http_status` | The HTTP status of the last attempt, or `null`. Always `null` for Syslog. |
| `next_attempt_at` | When the next attempt is due, or `null`. |
| `oldest_pending_at` | The time of the oldest event still waiting to be sent, or `null`. |

A Syslog destination answers `host`, `port` and `max_message_bytes` in `configuration`, and these codes in `last_error_code`:

| `last_error_code` | Meaning |
| --- | --- |
| `SIEM_SYSLOG_ADDRESS_FORBIDDEN` | The address of the receiver is not allowed. |
| `SIEM_SYSLOG_CONNECTION_UNAVAILABLE` | No connection to the receiver. |
| `SIEM_SYSLOG_TLS_FAILED` | The TLS connection failed. |
| `SIEM_SYSLOG_CERTIFICATE_REJECTED` | The certificate of the receiver was not trusted. Check the certificate authority. |
| `SIEM_SYSLOG_INVALID_CONFIGURATION` | The Syslog settings are not valid. |
| `SIEM_SYSLOG_EVENT_NOT_ENCODABLE` | An event could not be written in CEF. |
| `SIEM_SYSLOG_CONFIRMATION_MISSING` | A delivery was not confirmed. |
| `SIEM_SYSLOG_CONFIRMATION_LIMIT_REACHED` | Too many deliveries were not confirmed. The destination is `blocked`, even while `egress_status` is `waiting`. Pause it and activate it again to reset the limit. |

### Let Diamwall through your firewall

If the receiver only accepts some source addresses, three fields tell you what to allow and whether sending can go ahead:

| Field | Meaning |
| --- | --- |
| `egress_ips` | The source addresses Diamwall sends from. Allow them at the receiver. |
| `egress_status` | `unrestricted`, `allowed` or `waiting`. |
| `egress_reason_code` | Why the status is `waiting`, or `null`. |

| `egress_reason_code` | Meaning |
| --- | --- |
| `SIEM_EGRESS_IP_NOT_ALLOWED` | The sending address is left out by the IP list of your organization. |
| `SIEM_EGRESS_IP_UNAVAILABLE` | No sending address is available yet. `egress_ips` is empty. |

## Change a destination

[`PATCH /public-api/organizations/{org_public_id}/siem/event-destinations/{destination_public_id}/` in the API reference](https://docs.diamwall.com/api/#tag/domains/PATCH/public-api/organizations/{org_public_id}/siem/event-destinations/{destination_public_id}/)

Send only what changes. What can change depends on the provider:

| Provider | A `PATCH` can change |
| --- | --- |
| `sentinel` | `name`, `enabled`, `configuration.dcr_immutable_id`, `configuration.stream_name` and `credentials.client_secret` |
| `splunk` | `name`, `enabled` and `credentials.token`. The configuration cannot change. |
| `syslog` | `name`, `enabled`, `configuration.max_message_bytes` and `credentials.ca_certificate_pem` |

Send `enabled` and `credentials` in separate requests. Both in one request, or an empty `credentials`, answer `400 SIEM_DESTINATION_INVALID_REQUEST`.

Pause a destination:

```bash
curl -X PATCH "${DESTINATIONS}a64f8512-990d-4389-b479-af457ea13900/" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }'
```

Replace the secret of a Sentinel destination. For Splunk, send `{ "credentials": { "token": "..." } }` instead:

```bash
curl -X PATCH "${DESTINATIONS}a64f8512-990d-4389-b479-af457ea13900/" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "credentials": { "client_secret": "your new client secret" } }'
```

On a Sentinel destination, a change to the data collection rule or to the stream has to wait until a delivery that may already have gone out is confirmed. Until then it answers `409 SIEM_DESTINATION_BUSY`: try again shortly.

On a Syslog destination, a PEM replaces the certificate authority, and `null` goes back to the system roots:

```bash
curl -X PATCH "${DESTINATIONS}a64f8512-990d-4389-b479-af457ea13900/" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "credentials": { "ca_certificate_pem": null } }'
```

Activate a paused destination. On a Syslog destination, pausing and then activating also resets the limit of unconfirmed deliveries:

```bash
curl -X PATCH "${DESTINATIONS}a64f8512-990d-4389-b479-af457ea13900/" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": true }'
```

## Delete a destination

[`DELETE /public-api/organizations/{org_public_id}/siem/event-destinations/{destination_public_id}/` in the API reference](https://docs.diamwall.com/api/#tag/domains/DELETE/public-api/organizations/{org_public_id}/siem/event-destinations/{destination_public_id}/)

```bash
curl -X DELETE "${DESTINATIONS}a64f8512-990d-4389-b479-af457ea13900/" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY"
```

A deleted destination answers `204` with no body. While a delivery is in progress it answers `409 SIEM_DESTINATION_BUSY`: try again shortly. Its saved position and its credentials are deleted with it.

## See what was sent

[`GET /public-api/organizations/{org_public_id}/siem/delivery-logs/` in the API reference](https://docs.diamwall.com/api/#tag/domains/GET/public-api/organizations/{org_public_id}/siem/delivery-logs/)

The delivery history has one row for each attempt to send to a destination of the organization, newest first. It needs `siem.view`, and the domain restriction of the key does not apply.

```bash
curl "https://api.diamwall.com/public-api/organizations/your-organization-public-id/siem/delivery-logs/?outcome=block" \
  -H "Authorization: Api-Key $DIAMWALL_API_KEY"
```

```json
{
  "results": [
    {
      "public_id": "5e1c7a90-2b4d-4f6a-8c3e-1d2f3a4b5c6d",
      "occurred_at": "2026-11-23T15:10:42Z",
      "destination_public_id": "a64f8512-990d-4389-b479-af457ea13900",
      "event_count": 120,
      "response_status": 403,
      "outcome": "block",
      "error_code": "SIEM_SENTINEL_CREDENTIAL_REJECTED"
    }
  ],
  "next_cursor": null
}
```

| Field | What it is |
| --- | --- |
| `occurred_at` | When the attempt happened, in ISO 8601, UTC. |
| `destination_public_id` | The destination the attempt went to. |
| `event_count` | How many events the attempt carried. |
| `response_status` | The HTTP status the destination answered. `null` for Syslog destinations and when there was no HTTP answer. |
| `outcome` | `accepted`, `retry`, `wait_until`, `renew_token`, `block` or `split`. |
| `error_code` | The code of the failure, or `null` when the outcome is `accepted`. |

Every attempt is its own row: a resend, a batch that was split, or a new attempt after the token was renewed each add one. Attempts of paused and deleted destinations stay in the history.

Filter with `from`, `until`, `destination_public_id`, `response_status`, `outcome` and `error_code`. A page has 100 rows unless you set `limit`, up to 200. To read the next page, send `next_cursor` back as `cursor`. On the last page it is `null`.

Only the last 30 days are returned, and the history starts on 23 November 2026. A row never holds the address of the destination, the credentials, the text of the answer or the events.

## Errors you are likely to see

The code is in the `message` field of the answer.

| Status | Code | Where | What happened |
| --- | --- | --- | --- |
| `400` | `SIEM_DESTINATION_INVALID_REQUEST` | Create, change | The body is not valid: a field is missing, unknown or cannot be changed. |
| `400` | `SIEM_INVALID_QUERY` | Create | `event_type`, `domain_public_id` or `start` is not valid. |
| `400` | `SIEM_SENTINEL_INVALID_ENDPOINT_URL`, `SIEM_SENTINEL_INVALID_TENANT_ID`, `SIEM_SENTINEL_INVALID_CLIENT_ID` | Create | That field of `configuration` is not valid. |
| `400` | `SIEM_SENTINEL_INVALID_DCR_IMMUTABLE_ID`, `SIEM_SENTINEL_INVALID_STREAM_NAME` | Create, change | That field of `configuration` is not valid. |
| `400` | `SIEM_SPLUNK_INVALID_ENDPOINT_URL` | Create | The Splunk `endpoint_url` is not valid. |
| `400` | `SIEM_SPLUNK_INVALID_TOKEN` | Create, change | The Splunk `token` is not valid. |
| `400` | `SIEM_SYSLOG_INVALID_HOST`, `SIEM_SYSLOG_INVALID_PORT` | Create | The Syslog `host` or `port` is not valid. |
| `400` | `SIEM_SYSLOG_INVALID_MESSAGE_LIMIT`, `SIEM_SYSLOG_INVALID_CA_CERTIFICATE` | Create, change | `max_message_bytes` or `ca_certificate_pem` is not valid. |
| `403` | `SIEM_ACCESS_DENIED` | All | You have no access to the organization, or lack the `siem` action the call needs. |
| `404` | `SIEM_DESTINATION_NOT_FOUND` | Read, change, delete | The organization has no destination with that `public_id`. |
| `409` | `SIEM_DESTINATION_LIMIT_REACHED` | Create | The organization already has 8 destinations. |
| `409` | `SIEM_DESTINATION_NAME_TAKEN` | Create, change | Another destination has that name. |
| `409` | `SIEM_DESTINATION_BUSY` | Change, delete | A delivery is in progress. Try again shortly. |
| `400` | `PUBLIC_API_LOG_FILTER_INVALID`, `PUBLIC_API_LOG_CURSOR_INVALID` | Delivery history | A filter or the cursor is not valid. |
| `429` | `API_KEY_RATE_LIMITED` | Delivery history | Too many requests. Wait for the time in `Retry-After`. |
| `503` | `PUBLIC_API_LOGS_UNAVAILABLE` | Delivery history | The history cannot be read right now. Try again later. |
| `503` | `SIEM_HTTPS_DISABLED` | Create, activate | Sending to SIEMs is not switched on. |
| `503` | `SIEM_HTTPS_CIPHER_UNAVAILABLE`, `SIEM_HTTPS_CREDENTIAL_INVALID` | Create, change | The secret could not be stored or read safely. Try again later. |
| `503` | `SIEM_SOURCE_NOT_READY` | Create, change | The events feed cannot be read yet. Try again later. |

The errors that come from the key itself, such as `API_KEY_IP_NOT_ALLOWED`, are on the [Errors](https://docs.diamwall.com/reference/errors/) page.
