API Integration

Integrating your product with webhookie to start sending events is straightforward using the REST API.

To publish an event to webhookie requires two steps. The first to get an access token and the second to post the event.

  1. Get a token
POST /auth/realms/webhookie/protocol/openid-connect/token 
Host: localhost:8800 
Authorization: Basic d2ViaG9va2llX2NsaWVudDo= 
Content-Type: application/x-www-form-urlencoded 

  1. Publish an event
POST /ingress/event 
Host: localhost:8000 
wh-topic: createdPet 
wh-trace-id: 7b338cb9-bb17-4aee-9cc9-705af28a1cf9 
Content-Type: text/plain 
Authorization: Bearer <access_token from previous step> 

Your test message

The following headers can be applied to the request when posting to the /consumer/event endpoint.

wh-topicYesThe wh-topic must match one of the channels provided in an ASYNC API specification.
content_typeYesThe content type of the message content. Can be any content type e.g. application/json
wh-trace-idNoThe trace id is the unique identifier for the event being received by webhookie. While optional it is recommended it is provided to give you end-to-end traceability. If not provided webhookie will create a unique trace id upon receipt.
wh-authorized-subscriberNoBy default, any subscriber to the topic will receive the event. However, as a provider, you do have the choice to specify which authorized subscribers should receive the event. These need to match the entity ids as defined by your Identity Provider. If an authorized subscriber is provided then only those subscribers will receive that event.

Powered by BetterDocs