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 '{"description":"kinesis dev stream","format":"json","metadata":"{\"environment\":\"dev\"}","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
Name | Type | Description |
---|---|---|
metadata | string | Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. |
description | string | Human-readable description of the Event Destination. Optional, max 255 bytes. |
format | string | The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON . |
target | EventTarget | An 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
Name | Type | Description |
---|---|---|
firehose | EventTargetFirehose | Configuration used to send events to Amazon Kinesis Data Firehose. |
kinesis | EventTargetKinesis | Configuration used to send events to Amazon Kinesis. |
cloudwatch_logs | EventTargetCloudwatchLogs | Configuration used to send events to Amazon CloudWatch Logs. |
datadog | EventTargetDatadog | Configuration used to send events to Datadog. |
EventTargetFirehose parameters
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
delivery_stream_arn | string | An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. |
AWSAuth parameters
Name | Type | Description |
---|---|---|
role | AWSRole | A role for ngrok to assume on your behalf to deposit events into your AWS account. |
creds | AWSCredentials | Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. |
AWSRole parameters
Name | Type | Description |
---|---|---|
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials parameters
Name | Type | Description |
---|---|---|
aws_access_key_id | string | The ID portion of an AWS access key. |
aws_secret_access_key | string | The secret portion of an AWS access key. |
EventTargetKinesis parameters
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
stream_arn | string | An Amazon Resource Name specifying the Kinesis stream to deposit events into. |
EventTargetCloudwatchLogs parameters
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
log_group_arn | string | An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. |
EventTargetDatadog parameters
Name | Type | Description |
---|---|---|
api_key | string | Datadog API key to use. |
ddtags | string | Tags to send with the event. |
service | string | Service name to send with the event. |
ddsite | string | Datadog site to send event to. |
Response
Returns a 201 response on success
Example Response
{
"created_at": "2024-06-14T06:03:59Z",
"description": "kinesis dev stream",
"format": "json",
"id": "ed_2hrGynIl28v4x6DbRtSd367PnL3",
"metadata": "{\"environment\":\"dev\"}",
"target": {
"cloudwatch_logs": null,
"datadog": null,
"firehose": null,
"kinesis": {
"auth": {
"creds": null,
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
}
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
}
},
"uri": "https://api.ngrok.com/event_destinations/ed_2hrGynIl28v4x6DbRtSd367PnL3"
}
Fields
Name | Type | Description |
---|---|---|
id | string | Unique identifier for this Event Destination. |
metadata | string | Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. |
created_at | string | Timestamp when the Event Destination was created, RFC 3339 format. |
description | string | Human-readable description of the Event Destination. Optional, max 255 bytes. |
format | string | The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON . |
target | EventTarget | An 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 . |
uri | string | URI of the Event Destination API resource. |
EventTarget fields
Name | Type | Description |
---|---|---|
firehose | EventTargetFirehose | Configuration used to send events to Amazon Kinesis Data Firehose. |
kinesis | EventTargetKinesis | Configuration used to send events to Amazon Kinesis. |
cloudwatch_logs | EventTargetCloudwatchLogs | Configuration used to send events to Amazon CloudWatch Logs. |
datadog | EventTargetDatadog | Configuration used to send events to Datadog. |
EventTargetFirehose fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
delivery_stream_arn | string | An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. |
AWSAuth fields
Name | Type | Description |
---|---|---|
role | AWSRole | A role for ngrok to assume on your behalf to deposit events into your AWS account. |
creds | AWSCredentials | Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. |
AWSRole fields
Name | Type | Description |
---|---|---|
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
Name | Type | Description |
---|---|---|
aws_access_key_id | string | The ID portion of an AWS access key. |
aws_secret_access_key | string | The secret portion of an AWS access key. |
EventTargetKinesis fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
stream_arn | string | An Amazon Resource Name specifying the Kinesis stream to deposit events into. |
EventTargetCloudwatchLogs fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
log_group_arn | string | An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. |
EventTargetDatadog fields
Name | Type | Description |
---|---|---|
api_key | string | Datadog API key to use. |
ddtags | string | Tags to send with the event. |
service | string | Service name to send with the event. |
ddsite | string | Datadog 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_2hrGynIl28v4x6DbRtSd367PnL3
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_2hrGynIl28v4x6DbRtSd367PnL3
Response
Returns a 200 response on success
Example Response
{
"created_at": "2024-06-14T06:03:59Z",
"description": "kinesis dev stream 1 of 3",
"format": "json",
"id": "ed_2hrGynIl28v4x6DbRtSd367PnL3",
"metadata": "{\"environment\":\"dev\", \"stream\":1}",
"target": {
"cloudwatch_logs": null,
"datadog": null,
"firehose": null,
"kinesis": {
"auth": {
"creds": null,
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
}
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
}
},
"uri": "https://api.ngrok.com/event_destinations/ed_2hrGynIl28v4x6DbRtSd367PnL3"
}
Fields
Name | Type | Description |
---|---|---|
id | string | Unique identifier for this Event Destination. |
metadata | string | Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. |
created_at | string | Timestamp when the Event Destination was created, RFC 3339 format. |
description | string | Human-readable description of the Event Destination. Optional, max 255 bytes. |
format | string | The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON . |
target | EventTarget | An 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 . |
uri | string | URI of the Event Destination API resource. |
EventTarget fields
Name | Type | Description |
---|---|---|
firehose | EventTargetFirehose | Configuration used to send events to Amazon Kinesis Data Firehose. |
kinesis | EventTargetKinesis | Configuration used to send events to Amazon Kinesis. |
cloudwatch_logs | EventTargetCloudwatchLogs | Configuration used to send events to Amazon CloudWatch Logs. |
datadog | EventTargetDatadog | Configuration used to send events to Datadog. |
EventTargetFirehose fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
delivery_stream_arn | string | An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. |
AWSAuth fields
Name | Type | Description |
---|---|---|
role | AWSRole | A role for ngrok to assume on your behalf to deposit events into your AWS account. |
creds | AWSCredentials | Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. |
AWSRole fields
Name | Type | Description |
---|---|---|
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
Name | Type | Description |
---|---|---|
aws_access_key_id | string | The ID portion of an AWS access key. |
aws_secret_access_key | string | The secret portion of an AWS access key. |
EventTargetKinesis fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
stream_arn | string | An Amazon Resource Name specifying the Kinesis stream to deposit events into. |
EventTargetCloudwatchLogs fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
log_group_arn | string | An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. |
EventTargetDatadog fields
Name | Type | Description |
---|---|---|
api_key | string | Datadog API key to use. |
ddtags | string | Tags to send with the event. |
service | string | Service name to send with the event. |
ddsite | string | Datadog 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": [
{
"created_at": "2024-06-14T06:03:59Z",
"description": "kinesis dev stream",
"format": "json",
"id": "ed_2hrGynIl28v4x6DbRtSd367PnL3",
"metadata": "{\"environment\":\"dev\"}",
"target": {
"cloudwatch_logs": null,
"datadog": null,
"firehose": null,
"kinesis": {
"auth": {
"creds": null,
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
}
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
}
},
"uri": "https://api.ngrok.com/event_destinations/ed_2hrGynIl28v4x6DbRtSd367PnL3"
}
],
"next_page_uri": null,
"uri": "https://api.ngrok.com/event_destinations"
}
Fields
Name | Type | Description |
---|---|---|
event_destinations | EventDestination | The list of all Event Destinations on this account. |
uri | string | URI of the Event Destinations list API resource. |
next_page_uri | string | URI of the next page, or null if there is no next page. |
EventDestination fields
Name | Type | Description |
---|---|---|
id | string | Unique identifier for this Event Destination. |
metadata | string | Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. |
created_at | string | Timestamp when the Event Destination was created, RFC 3339 format. |
description | string | Human-readable description of the Event Destination. Optional, max 255 bytes. |
format | string | The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON . |
target | EventTarget | An 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 . |
uri | string | URI of the Event Destination API resource. |
EventTarget fields
Name | Type | Description |
---|---|---|
firehose | EventTargetFirehose | Configuration used to send events to Amazon Kinesis Data Firehose. |
kinesis | EventTargetKinesis | Configuration used to send events to Amazon Kinesis. |
cloudwatch_logs | EventTargetCloudwatchLogs | Configuration used to send events to Amazon CloudWatch Logs. |
datadog | EventTargetDatadog | Configuration used to send events to Datadog. |
EventTargetFirehose fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
delivery_stream_arn | string | An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. |
AWSAuth fields
Name | Type | Description |
---|---|---|
role | AWSRole | A role for ngrok to assume on your behalf to deposit events into your AWS account. |
creds | AWSCredentials | Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. |
AWSRole fields
Name | Type | Description |
---|---|---|
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
Name | Type | Description |
---|---|---|
aws_access_key_id | string | The ID portion of an AWS access key. |
aws_secret_access_key | string | The secret portion of an AWS access key. |
EventTargetKinesis fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
stream_arn | string | An Amazon Resource Name specifying the Kinesis stream to deposit events into. |
EventTargetCloudwatchLogs fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
log_group_arn | string | An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. |
EventTargetDatadog fields
Name | Type | Description |
---|---|---|
api_key | string | Datadog API key to use. |
ddtags | string | Tags to send with the event. |
service | string | Service name to send with the event. |
ddsite | string | Datadog 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 '{"description":"kinesis dev stream 1 of 3","metadata":"{\"environment\":\"dev\", \"stream\":1}"}' \
https://api.ngrok.com/event_destinations/ed_2hrGynIl28v4x6DbRtSd367PnL3
Parameters
Name | Type | Description |
---|---|---|
id | string | Unique identifier for this Event Destination. |
metadata | string | Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. |
description | string | Human-readable description of the Event Destination. Optional, max 255 bytes. |
format | string | The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON . |
target | EventTarget | An 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
Name | Type | Description |
---|---|---|
firehose | EventTargetFirehose | Configuration used to send events to Amazon Kinesis Data Firehose. |
kinesis | EventTargetKinesis | Configuration used to send events to Amazon Kinesis. |
cloudwatch_logs | EventTargetCloudwatchLogs | Configuration used to send events to Amazon CloudWatch Logs. |
datadog | EventTargetDatadog | Configuration used to send events to Datadog. |
EventTargetFirehose parameters
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
delivery_stream_arn | string | An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. |
AWSAuth parameters
Name | Type | Description |
---|---|---|
role | AWSRole | A role for ngrok to assume on your behalf to deposit events into your AWS account. |
creds | AWSCredentials | Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. |
AWSRole parameters
Name | Type | Description |
---|---|---|
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials parameters
Name | Type | Description |
---|---|---|
aws_access_key_id | string | The ID portion of an AWS access key. |
aws_secret_access_key | string | The secret portion of an AWS access key. |
EventTargetKinesis parameters
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
stream_arn | string | An Amazon Resource Name specifying the Kinesis stream to deposit events into. |
EventTargetCloudwatchLogs parameters
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
log_group_arn | string | An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. |
EventTargetDatadog parameters
Name | Type | Description |
---|---|---|
api_key | string | Datadog API key to use. |
ddtags | string | Tags to send with the event. |
service | string | Service name to send with the event. |
ddsite | string | Datadog site to send event to. |
Response
Returns a 200 response on success
Example Response
{
"created_at": "2024-06-14T06:03:59Z",
"description": "kinesis dev stream 1 of 3",
"format": "json",
"id": "ed_2hrGynIl28v4x6DbRtSd367PnL3",
"metadata": "{\"environment\":\"dev\", \"stream\":1}",
"target": {
"cloudwatch_logs": null,
"datadog": null,
"firehose": null,
"kinesis": {
"auth": {
"creds": null,
"role": {
"role_arn": "arn:aws:iam::123456789012:role/example"
}
},
"stream_arn": "arn:ngrok-local:kinesis:us-east-2:123456789012:stream/mystream2"
}
},
"uri": "https://api.ngrok.com/event_destinations/ed_2hrGynIl28v4x6DbRtSd367PnL3"
}
Fields
Name | Type | Description |
---|---|---|
id | string | Unique identifier for this Event Destination. |
metadata | string | Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. |
created_at | string | Timestamp when the Event Destination was created, RFC 3339 format. |
description | string | Human-readable description of the Event Destination. Optional, max 255 bytes. |
format | string | The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON . |
target | EventTarget | An 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 . |
uri | string | URI of the Event Destination API resource. |
EventTarget fields
Name | Type | Description |
---|---|---|
firehose | EventTargetFirehose | Configuration used to send events to Amazon Kinesis Data Firehose. |
kinesis | EventTargetKinesis | Configuration used to send events to Amazon Kinesis. |
cloudwatch_logs | EventTargetCloudwatchLogs | Configuration used to send events to Amazon CloudWatch Logs. |
datadog | EventTargetDatadog | Configuration used to send events to Datadog. |
EventTargetFirehose fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
delivery_stream_arn | string | An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. |
AWSAuth fields
Name | Type | Description |
---|---|---|
role | AWSRole | A role for ngrok to assume on your behalf to deposit events into your AWS account. |
creds | AWSCredentials | Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. |
AWSRole fields
Name | Type | Description |
---|---|---|
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
Name | Type | Description |
---|---|---|
aws_access_key_id | string | The ID portion of an AWS access key. |
aws_secret_access_key | string | The secret portion of an AWS access key. |
EventTargetKinesis fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
stream_arn | string | An Amazon Resource Name specifying the Kinesis stream to deposit events into. |
EventTargetCloudwatchLogs fields
Name | Type | Description |
---|---|---|
auth | AWSAuth | Configuration for how to authenticate into your AWS account. Exactly one of role or creds should be configured. |
log_group_arn | string | An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. |
EventTargetDatadog fields
Name | Type | Description |
---|---|---|
api_key | string | Datadog API key to use. |
ddtags | string | Tags to send with the event. |
service | string | Service name to send with the event. |
ddsite | string | Datadog site to send event to. |