Notification Destinations
Create and manage event notification destinations for Stook.
Returns the organization's event notification destinations. Filter by region to get the destinations a bucket in that region can use.
Unique identifier for the organization.
Only destinations in this region, for example eu-ist-1.
Successful response
Indicates whether the request succeeded.
GET /api/v2/stook/{organization_uuid}/notification-destination HTTP/1.1
Host: cloud.medianova.com
Accept: */*
Successful response
{
"status": true,
"data": [
{
"uuid": "9f3c1a2e-7b44-4c1d-9a55-2f8e6d1b0c77",
"name": "order-hook",
"region": "eu-ist-1",
"kind": "https",
"endpoint": "https://api.example.com/stook-hook",
"persistent": false,
"used_by": 2
}
]
}Creates an HTTPS, Kafka, or AMQP destination that bucket notifications can send events to. The name, region, and type cannot be changed later.
Unique identifier for the organization.
3–63 characters: letters, numbers, hyphens, and underscores. Unique within the region. Cannot be changed later.
^[A-Za-z0-9_-]{3,63}$Region of the buckets that will use the destination, for example eu-ist-1. Cannot be changed later.
Destination type. Cannot be changed later.
httpsPossible values: Address events are sent to: https:// for https, kafka:// for kafka, amqp:// or amqps:// for amqp. Must use a hostname that resolves to a public address. HTTPS endpoints must present a valid TLS certificate.
amqp destinations only. The RabbitMQ exchange events are published to, with the destination name as the routing key. The exchange must already exist. Letters, numbers, hyphens, underscores, periods, and colons, up to 127 characters. Leave empty to use amq.topic.
^[A-Za-z0-9_.:-]{1,127}$When true, events that cannot be delivered are queued and retried. When false, they are dropped.
falseMaximum delivery attempts. Used when persistent is true.
Seconds an event may wait in the queue (up to 14 days). Used when persistent is true.
Seconds between delivery attempts. Used when persistent is true.
Successful response
Indicates whether the request succeeded.
The endpoint cannot be used, or the region does not exist.
A destination with this name already exists in the region.
Validation error
The storage backend refused the destination.
POST /api/v2/stook/{organization_uuid}/notification-destination HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 183
{
"name": "order-hook",
"region": "eu-ist-1",
"kind": "https",
"endpoint": "https://api.example.com/stook-hook",
"persistent": true,
"max_retries": 5,
"time_to_live": 300,
"retry_sleep_duration": 30
}{
"status": true,
"data": {
"uuid": "text",
"name": "text",
"region": "text",
"kind": "https",
"endpoint": "text",
"amqp_exchange": "text",
"persistent": true,
"max_retries": 1,
"time_to_live": 1,
"retry_sleep_duration": 1,
"used_by": 1
}
}Returns a single event notification destination.
Unique identifier for the organization.
Unique identifier for the notification destination.
Successful response
Indicates whether the request succeeded.
The resource was not found in this organization, or the request is not authorized.
GET /api/v2/stook/{organization_uuid}/notification-destination/{destination_uuid} HTTP/1.1
Host: cloud.medianova.com
Accept: */*
{
"status": true,
"data": {
"uuid": "9f3c1a2e-7b44-4c1d-9a55-2f8e6d1b0c77",
"name": "order-hook",
"region": "eu-ist-1",
"kind": "https",
"endpoint": "https://api.example.com/stook-hook",
"persistent": false,
"used_by": 2
}
}Changes the endpoint, exchange, or delivery settings of a destination. The name, region, and type cannot be changed.
Unique identifier for the organization.
Unique identifier for the notification destination.
Only these fields can be changed.
Address events are sent to: https:// for https, kafka:// for kafka, amqp:// or amqps:// for amqp. Must use a hostname that resolves to a public address. HTTPS endpoints must present a valid TLS certificate.
amqp destinations only. The RabbitMQ exchange events are published to. Omit to keep the current exchange; send null or an empty string to use amq.topic.
^[A-Za-z0-9_.:-]{1,127}$When true, events that cannot be delivered are queued and retried. When false, they are dropped.
falseMaximum delivery attempts. Used when persistent is true.
Seconds an event may wait in the queue (up to 14 days). Used when persistent is true.
Seconds between delivery attempts. Used when persistent is true.
Successful response
Indicates whether the request succeeded.
The endpoint cannot be used.
The resource was not found in this organization, or the request is not authorized.
Validation error
The storage backend refused the change.
PUT /api/v2/stook/{organization_uuid}/notification-destination/{destination_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 87
{
"endpoint": "https://api.example.com/stook-hook-v2",
"persistent": true,
"max_retries": 10
}{
"status": true,
"data": {
"uuid": "text",
"name": "text",
"region": "text",
"kind": "https",
"endpoint": "text",
"amqp_exchange": "text",
"persistent": true,
"max_retries": 1,
"time_to_live": 1,
"retry_sleep_duration": 1,
"used_by": 1
}
}Deletes a destination. A destination that is still used by bucket notifications cannot be deleted.
Unique identifier for the organization.
Unique identifier for the notification destination.
The destination was deleted.
trueThe resource was not found in this organization, or the request is not authorized.
The destination is still used by bucket notifications.
The storage backend refused to remove the destination.
DELETE /api/v2/stook/{organization_uuid}/notification-destination/{destination_uuid} HTTP/1.1
Host: cloud.medianova.com
Accept: */*
{
"status": true,
"message": "Destination removed"
}Last updated
Was this helpful?