API-methods for Domain events
Requirements
- Valid Flow API ClientId and ClientSecret
- API access to WebHookSubscription - read, write, delete
Subscribe to events
This API is not available yet.
Contact support if you need to create a domain event subscription, as this feature must be enabled individually for each tenant.
A big difference between the legacy webhook API and the domain events is that now you don’t subscribe to individual event types. A domain event subscription, once setup, will result in a stream of all event types being posted to the destination URL. It is the responsibility of the webhook receiver to filter out the event types of interest.
Azure EventGrid requires that systems that receive events by webhook validate the receiving endpoint within a short timeframe after subscription creation. See further details.
Subscribe to event stream
Subscribes to a event stream
POST /flow/api/domainevents/url
Body:
- Url: string
- This callback URL must support http POST
- Name: string
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
[a-z0-9-]+
. - Note that empty/blank string is a valid name, and recommended if tenant only needs to subscribe to one event stream
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
Response: true
if successful
Change callback url
PUT /flow/api/domainevents/url
Body:
- newUrl: string
- The new url for this subscription. This callback URL must support http POST
- Name: string
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
[a-z0-9-]+
. - Note that an empty/blank name is a valid name
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
Get current callback url
GET /flow/api/domainevents/url
Body:
- Name: string
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
[a-z0-9-]+
.
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
Response:
- 200 OK with URL in response if a subscription with that name exist
- 404 Not found if no subscription with given name exists
Unsubscribe current subscription
DELETE /flow/api/domainevents/url
Body:
- Name: string
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
[a-z0-9-]+
.
- Use this field to distinguish the subscriptions, in case of multiple event stream subscriptions for a tenant, . Name must match regex
Response:
- 200 OK with URL in response if a subscription with that name exist
- 404 Not found if no subscription with given name exists