Skip to main content

Event Destinations


Create Event Destination

Create a new Event Destination. It will not apply to anything until it is associated with an Event Subscription.

Request

POST /event_destinations

Example Request

curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"metadata":"{\"environment\":\"dev\"}","description":"kinesis dev stream","format":"json","target":{"kinesis":{"auth":{"role":{"role_arn":"arn:aws:iam::123456789012:role/example"}},"stream_arn":"arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"}}}' \
https://api.ngrok.com/event_destinations

Parameters

   
metadatastringArbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.
descriptionstringHuman-readable description of the Event Destination. Optional, max 255 bytes.
formatstringThe output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.
targetEventTargetAn object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.

EventTarget parameters

   
firehoseEventTargetFirehoseConfiguration used to send events to Amazon Kinesis Data Firehose.
kinesisEventTargetKinesisConfiguration used to send events to Amazon Kinesis.
cloudwatch_logsEventTargetCloudwatchLogsConfiguration used to send events to Amazon CloudWatch Logs.
datadogEventTargetDatadogConfiguration used to send events to Datadog.

EventTargetFirehose parameters

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
delivery_stream_arnstringAn Amazon Resource Name specifying the Firehose delivery stream to deposit events into.

AWSAuth parameters

   
roleAWSRoleA role for ngrok to assume on your behalf to deposit events into your AWS account.
credsAWSCredentialsCredentials to your AWS account if you prefer ngrok to sign in with long-term access keys.

AWSRole parameters

   
role_arnstringAn ARN that specifies the role that ngrok should use to deliver to the configured target.

AWSCredentials parameters

   
aws_access_key_idstringThe ID portion of an AWS access key.
aws_secret_access_keystringThe secret portion of an AWS access key.

EventTargetKinesis parameters

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
stream_arnstringAn Amazon Resource Name specifying the Kinesis stream to deposit events into.

EventTargetCloudwatchLogs parameters

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
log_group_arnstringAn Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.

EventTargetDatadog parameters

   
api_keystringDatadog API key to use.
ddtagsstringTags to send with the event.
servicestringService name to send with the event.
ddsitestringDatadog site to send event to.

Response

Returns a 201 response on success

Example Response

{
"id": "ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD",
"metadata": "{\"environment\":\"dev\"}",
"created_at": "2023-07-31T23:17:40Z",
"description": "kinesis dev stream",
"format": "json",
"target": {
"firehose": null,
"kinesis": {
"auth": {
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
},
"creds": null
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
},
"cloudwatch_logs": null,
"datadog": null
},
"uri": "https://api.ngrok.com/event_destinations/ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD"
}

Fields

   
idstringUnique identifier for this Event Destination.
metadatastringArbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.
created_atstringTimestamp when the Event Destination was created, RFC 3339 format.
descriptionstringHuman-readable description of the Event Destination. Optional, max 255 bytes.
formatstringThe output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.
targetEventTargetAn object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.
uristringURI of the Event Destination API resource.

EventTarget fields

   
firehoseEventTargetFirehoseConfiguration used to send events to Amazon Kinesis Data Firehose.
kinesisEventTargetKinesisConfiguration used to send events to Amazon Kinesis.
cloudwatch_logsEventTargetCloudwatchLogsConfiguration used to send events to Amazon CloudWatch Logs.
datadogEventTargetDatadogConfiguration used to send events to Datadog.

EventTargetFirehose fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
delivery_stream_arnstringAn Amazon Resource Name specifying the Firehose delivery stream to deposit events into.

AWSAuth fields

   
roleAWSRoleA role for ngrok to assume on your behalf to deposit events into your AWS account.
credsAWSCredentialsCredentials to your AWS account if you prefer ngrok to sign in with long-term access keys.

AWSRole fields

   
role_arnstringAn ARN that specifies the role that ngrok should use to deliver to the configured target.

AWSCredentials fields

   
aws_access_key_idstringThe ID portion of an AWS access key.
aws_secret_access_keystringThe secret portion of an AWS access key.

EventTargetKinesis fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
stream_arnstringAn Amazon Resource Name specifying the Kinesis stream to deposit events into.

EventTargetCloudwatchLogs fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
log_group_arnstringAn Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.

EventTargetDatadog fields

   
api_keystringDatadog API key to use.
ddtagsstringTags to send with the event.
servicestringService name to send with the event.
ddsitestringDatadog site to send event to.

Delete Event Destination

Delete an Event Destination. If the Event Destination is still referenced by an Event Subscription.

Request

DELETE /event_destinations/{id}

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/event_destinations/ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD

Response

Returns a 204 response with no body on success

Get Event Destination

Get detailed information about an Event Destination by ID.

Request

GET /event_destinations/{id}

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/event_destinations/ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD

Response

Returns a 200 response on success

Example Response

{
"id": "ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD",
"metadata": "{\"environment\":\"dev\", \"stream\":1}",
"created_at": "2023-07-31T23:17:40Z",
"description": "kinesis dev stream 1 of 3",
"format": "json",
"target": {
"firehose": null,
"kinesis": {
"auth": {
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
},
"creds": null
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
},
"cloudwatch_logs": null,
"datadog": null
},
"uri": "https://api.ngrok.com/event_destinations/ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD"
}

Fields

   
idstringUnique identifier for this Event Destination.
metadatastringArbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.
created_atstringTimestamp when the Event Destination was created, RFC 3339 format.
descriptionstringHuman-readable description of the Event Destination. Optional, max 255 bytes.
formatstringThe output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.
targetEventTargetAn object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.
uristringURI of the Event Destination API resource.

EventTarget fields

   
firehoseEventTargetFirehoseConfiguration used to send events to Amazon Kinesis Data Firehose.
kinesisEventTargetKinesisConfiguration used to send events to Amazon Kinesis.
cloudwatch_logsEventTargetCloudwatchLogsConfiguration used to send events to Amazon CloudWatch Logs.
datadogEventTargetDatadogConfiguration used to send events to Datadog.

EventTargetFirehose fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
delivery_stream_arnstringAn Amazon Resource Name specifying the Firehose delivery stream to deposit events into.

AWSAuth fields

   
roleAWSRoleA role for ngrok to assume on your behalf to deposit events into your AWS account.
credsAWSCredentialsCredentials to your AWS account if you prefer ngrok to sign in with long-term access keys.

AWSRole fields

   
role_arnstringAn ARN that specifies the role that ngrok should use to deliver to the configured target.

AWSCredentials fields

   
aws_access_key_idstringThe ID portion of an AWS access key.
aws_secret_access_keystringThe secret portion of an AWS access key.

EventTargetKinesis fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
stream_arnstringAn Amazon Resource Name specifying the Kinesis stream to deposit events into.

EventTargetCloudwatchLogs fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
log_group_arnstringAn Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.

EventTargetDatadog fields

   
api_keystringDatadog API key to use.
ddtagsstringTags to send with the event.
servicestringService name to send with the event.
ddsitestringDatadog site to send event to.

List Event Destinations

List all Event Destinations on this account.

Request

GET /event_destinations

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/event_destinations

Response

Returns a 200 response on success

Example Response

{
"event_destinations": [
{
"id": "ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD",
"metadata": "{\"environment\":\"dev\"}",
"created_at": "2023-07-31T23:17:40Z",
"description": "kinesis dev stream",
"format": "json",
"target": {
"firehose": null,
"kinesis": {
"auth": {
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
},
"creds": null
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
},
"cloudwatch_logs": null,
"datadog": null
},
"uri": "https://api.ngrok.com/event_destinations/ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD"
}
],
"uri": "https://api.ngrok.com/event_destinations",
"next_page_uri": null
}

Fields

   
event_destinationsEventDestinationThe list of all Event Destinations on this account.
uristringURI of the Event Destinations list API resource.
next_page_uristringURI of the next page, or null if there is no next page.

EventDestination fields

   
idstringUnique identifier for this Event Destination.
metadatastringArbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.
created_atstringTimestamp when the Event Destination was created, RFC 3339 format.
descriptionstringHuman-readable description of the Event Destination. Optional, max 255 bytes.
formatstringThe output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.
targetEventTargetAn object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.
uristringURI of the Event Destination API resource.

EventTarget fields

   
firehoseEventTargetFirehoseConfiguration used to send events to Amazon Kinesis Data Firehose.
kinesisEventTargetKinesisConfiguration used to send events to Amazon Kinesis.
cloudwatch_logsEventTargetCloudwatchLogsConfiguration used to send events to Amazon CloudWatch Logs.
datadogEventTargetDatadogConfiguration used to send events to Datadog.

EventTargetFirehose fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
delivery_stream_arnstringAn Amazon Resource Name specifying the Firehose delivery stream to deposit events into.

AWSAuth fields

   
roleAWSRoleA role for ngrok to assume on your behalf to deposit events into your AWS account.
credsAWSCredentialsCredentials to your AWS account if you prefer ngrok to sign in with long-term access keys.

AWSRole fields

   
role_arnstringAn ARN that specifies the role that ngrok should use to deliver to the configured target.

AWSCredentials fields

   
aws_access_key_idstringThe ID portion of an AWS access key.
aws_secret_access_keystringThe secret portion of an AWS access key.

EventTargetKinesis fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
stream_arnstringAn Amazon Resource Name specifying the Kinesis stream to deposit events into.

EventTargetCloudwatchLogs fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
log_group_arnstringAn Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.

EventTargetDatadog fields

   
api_keystringDatadog API key to use.
ddtagsstringTags to send with the event.
servicestringService name to send with the event.
ddsitestringDatadog site to send event to.

Update Event Destination

Update attributes of an Event Destination.

Request

PATCH /event_destinations/{id}

Example Request

curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"metadata":"{\"environment\":\"dev\", \"stream\":1}","description":"kinesis dev stream 1 of 3"}' \
https://api.ngrok.com/event_destinations/ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD

Parameters

   
idstringUnique identifier for this Event Destination.
metadatastringArbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.
descriptionstringHuman-readable description of the Event Destination. Optional, max 255 bytes.
formatstringThe output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.
targetEventTargetAn object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.

EventTarget parameters

   
firehoseEventTargetFirehoseConfiguration used to send events to Amazon Kinesis Data Firehose.
kinesisEventTargetKinesisConfiguration used to send events to Amazon Kinesis.
cloudwatch_logsEventTargetCloudwatchLogsConfiguration used to send events to Amazon CloudWatch Logs.
datadogEventTargetDatadogConfiguration used to send events to Datadog.

EventTargetFirehose parameters

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
delivery_stream_arnstringAn Amazon Resource Name specifying the Firehose delivery stream to deposit events into.

AWSAuth parameters

   
roleAWSRoleA role for ngrok to assume on your behalf to deposit events into your AWS account.
credsAWSCredentialsCredentials to your AWS account if you prefer ngrok to sign in with long-term access keys.

AWSRole parameters

   
role_arnstringAn ARN that specifies the role that ngrok should use to deliver to the configured target.

AWSCredentials parameters

   
aws_access_key_idstringThe ID portion of an AWS access key.
aws_secret_access_keystringThe secret portion of an AWS access key.

EventTargetKinesis parameters

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
stream_arnstringAn Amazon Resource Name specifying the Kinesis stream to deposit events into.

EventTargetCloudwatchLogs parameters

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
log_group_arnstringAn Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.

EventTargetDatadog parameters

   
api_keystringDatadog API key to use.
ddtagsstringTags to send with the event.
servicestringService name to send with the event.
ddsitestringDatadog site to send event to.

Response

Returns a 200 response on success

Example Response

{
"id": "ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD",
"metadata": "{\"environment\":\"dev\", \"stream\":1}",
"created_at": "2023-07-31T23:17:40Z",
"description": "kinesis dev stream 1 of 3",
"format": "json",
"target": {
"firehose": null,
"kinesis": {
"auth": {
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
},
"creds": null
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
},
"cloudwatch_logs": null,
"datadog": null
},
"uri": "https://api.ngrok.com/event_destinations/ed_2TMGIzH7ICCoRTLXwFq5OOXTQDD"
}

Fields

   
idstringUnique identifier for this Event Destination.
metadatastringArbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.
created_atstringTimestamp when the Event Destination was created, RFC 3339 format.
descriptionstringHuman-readable description of the Event Destination. Optional, max 255 bytes.
formatstringThe output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.
targetEventTargetAn object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.
uristringURI of the Event Destination API resource.

EventTarget fields

   
firehoseEventTargetFirehoseConfiguration used to send events to Amazon Kinesis Data Firehose.
kinesisEventTargetKinesisConfiguration used to send events to Amazon Kinesis.
cloudwatch_logsEventTargetCloudwatchLogsConfiguration used to send events to Amazon CloudWatch Logs.
datadogEventTargetDatadogConfiguration used to send events to Datadog.

EventTargetFirehose fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
delivery_stream_arnstringAn Amazon Resource Name specifying the Firehose delivery stream to deposit events into.

AWSAuth fields

   
roleAWSRoleA role for ngrok to assume on your behalf to deposit events into your AWS account.
credsAWSCredentialsCredentials to your AWS account if you prefer ngrok to sign in with long-term access keys.

AWSRole fields

   
role_arnstringAn ARN that specifies the role that ngrok should use to deliver to the configured target.

AWSCredentials fields

   
aws_access_key_idstringThe ID portion of an AWS access key.
aws_secret_access_keystringThe secret portion of an AWS access key.

EventTargetKinesis fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
stream_arnstringAn Amazon Resource Name specifying the Kinesis stream to deposit events into.

EventTargetCloudwatchLogs fields

   
authAWSAuthConfiguration for how to authenticate into your AWS account. Exactly one of role or creds should be configured.
log_group_arnstringAn Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.

EventTargetDatadog fields

   
api_keystringDatadog API key to use.
ddtagsstringTags to send with the event.
servicestringService name to send with the event.
ddsitestringDatadog site to send event to.