Create subscription
CreateSubscription
Creates new subscription.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Subscription is used to define which events of the relevant topics should be sent to the callback URL. Limitations:
- This is only forward-looking, meaning that only events that occur after the subscription is created will be sent to the target.
- There may only be two (2) subscriptions per topic, unless the subscription filter specifies a specific
id
field ORdelete_after_use
is set to true. - Delivery is not guaranteed; message delivery will be retried when encountering a non-2xx response, but if there are multiple subscriptions for the same topic and one subscription successfully received the message, it will not be redelivered to the others.
Name of the subscription. This is used for easy, human readable identification of the subscription.
The topic that updates should be sent for.
URL to which the events should be sent.
Filter the updates using a subset of the Kibana Query Language. The field names that you use in your filter must exactly match the field names on the object that you are filtering. There are some limitations to the filters that you can use:
- Filters can only be on top-level fields that are included in the
filterable_fields
property of the topic. - Filters cannot be on fields that are an array or dictionary.
- Filters only support
AND
clauses (notOR
).
If you do not provide any filter, all updates on the topic will be sent to the target.
Some examples:
- If you are interested in all updates on an asset with
id
of1234
, you can useid:1234
. - If you are interested in all updates on an asset with
id
of1234
andtype
ofASSET_TYPE_VIDEO
(which is an enum), you can useid:1234 AND type:ASSET_TYPE_VIDEO
. - If you are interested in all updates on an entity with type
team
andname
ofBarcelona
, you can usetype:team AND name:Barcelona
. - If you are interested in all updates where a field value is after a certain date or time, you can use
field_name>"2006-01-02 15:04:05"
(in that specific format, specified in UTC).
If a filter cannot be parsed or is invalid, the subscription may still pass initial validation but will then be ignored at run-time, meaning you will not receive any updates as they come through. Be sure to test your filters before relying on them in a production environment.
If true, the subscription will be deleted after the first use. This is useful for cases where the the callback is meant to update the state change of a single resource, e.g. to continue a workflow when a dependent resource is ready.
Response
Subscription is used to define which events of the relevant topics should be sent to the callback URL. Limitations:
- This is only forward-looking, meaning that only events that occur after the subscription is created will be sent to the target.
- There may only be two (2) subscriptions per topic, unless the subscription filter specifies a specific
id
field ORdelete_after_use
is set to true. - Delivery is not guaranteed; message delivery will be retried when encountering a non-2xx response, but if there are multiple subscriptions for the same topic and one subscription successfully received the message, it will not be redelivered to the others.