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
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
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. |
EventTargetFirehose parameters
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
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
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials parameters
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
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
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. |
Response
Returns a 201 response on success
Example Response
{
"id": "ed_2NTVHNOg1wBOxAT7sy97ch3QPp4",
"metadata": "{\"environment\":\"dev\"}",
"created_at": "2023-03-24T19:59:30Z",
"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_2NTVHNOg1wBOxAT7sy97ch3QPp4"
}
Fields
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
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. |
EventTargetFirehose fields
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
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
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
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
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
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. |
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_2NTVHNOg1wBOxAT7sy97ch3QPp4
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_2NTVHNOg1wBOxAT7sy97ch3QPp4
Response
Returns a 200 response on success
Example Response
{
"id": "ed_2NTVHNOg1wBOxAT7sy97ch3QPp4",
"metadata": "{\"environment\":\"dev\", \"stream\":1}",
"created_at": "2023-03-24T19:59:30Z",
"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_2NTVHNOg1wBOxAT7sy97ch3QPp4"
}
Fields
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
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. |
EventTargetFirehose fields
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
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
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
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
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
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. |
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_2NTVHNOg1wBOxAT7sy97ch3QPp4",
"metadata": "{\"environment\":\"dev\"}",
"created_at": "2023-03-24T19:59:30Z",
"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_2NTVHNOg1wBOxAT7sy97ch3QPp4"
}
],
"uri": "https://api.ngrok.com/event_destinations",
"next_page_uri": null
}
Fields
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
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
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. |
EventTargetFirehose fields
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
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
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
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
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
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. |
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_2NTVHNOg1wBOxAT7sy97ch3QPp4
Parameters
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
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. |
EventTargetFirehose parameters
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
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
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials parameters
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
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
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. |
Response
Returns a 200 response on success
Example Response
{
"id": "ed_2NTVHNOg1wBOxAT7sy97ch3QPp4",
"metadata": "{\"environment\":\"dev\", \"stream\":1}",
"created_at": "2023-03-24T19:59:30Z",
"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_2NTVHNOg1wBOxAT7sy97ch3QPp4"
}
Fields
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
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. |
EventTargetFirehose fields
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
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
role_arn | string | An ARN that specifies the role that ngrok should use to deliver to the configured target. |
AWSCredentials fields
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
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
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. |