API Documentation

We think we provide a pretty nice developer portal that can be used to administer, deploy and consume webhook APIs. However, we know that in many use cases you’d like to have your own user experience and/or integrate with your existing developer portal. With webhookie’s API, we have you covered! All the interactions you see on our developer portal are utilizing our webhookie API.

The full and most up-to-date swagger API documentation can be found at http://localhost:8000/swagger-ui.html after you install it.

Here we provide just an overview of the different APIs that come with the product.

Admin APIs #

With the Admin API, you can manage the consumer groups and provider groups on your webhookie instance. The API requires the WH_ADMIN role.

Check out the swagger API documentation at http://localhost:8000/swagger-ui.html for a full list of endpoints.

# As an example here is the request to create a new provider group
POST /admin/providergroups
Host: localhost:8000
Authorization: Bearer <bearer token>
Content-Type: application/json

{
  "name": "New Provider Group",
  "description": "My new provider group",
  "iamGroupName": "newProviderGroup"
}

Ingress API #

With the Ingress API, you can POST events to webhookie from a provider application. The API requires the WH_PROVIDER role.

POST /ingress/event
Host: localhost:8000
Authorization: Bearer <bearer token>
Content-Type: application/json
wh-topic: topicId
wh-authorized-subscriber: companyA
wh-trace-id: 123145321535566jklajfd

{
  # instance of a topicId schema
} 

Group API #

The Group API has endpoints to return the list of consumer groups and provider groups that are applicable for the logged-in user when creating webhook APIs. The API requires the WH_PROVIDER role.

Check out the swagger API documentation at http://localhost:8000/swagger-ui.html for a full list of endpoints.

# Returns the list of provider groups that the logged in user belongs to. 

GET /group/providergroups
Host: localhost:8000
Authorization: Bearer <bearer token>

Public API #

The Public API has an endpoint to return configuration information to the front-end that is required to initialize webhookie. An example of this information is the identity platform information such as client id etc.

GET /public/config
Host: localhost:8000
Authorization: Bearer <bearer token>

Subscription API #

With the subscription API, you can set up and manage subscriptions, applications, and callbacks. It also contains some endpoints where, as a provider, you can discover the entities and the associated application and callbacks that subscribe to your data.

Check out the swagger API documentation at http://localhost:8000/swagger-ui.html for a full list of endpoints.

# create a subscription with a callback that has been previously created.
POST /subscriptions
Host: localhost:8000
Authorization: Bearer <bearer token>
Content-Type: application/json

{
  "topic": "createdPet",
  "callbackId": "61a48ec991139d3f29761825"
}

Traffic API #

With the Traffic API, you can inspect the traffic being sent to your callbacks as a WH_CONSUMER and inspect the traffic being sent through your API as a WH_PROVIDER.

Check out the swagger API documentation at http://localhost:8000/swagger-ui.html for a full list of endpoints.

# retrieve the spans (events) that have been sent to your callback URL.
GET /traffic/span
Host: localhost:8000
Authorization: Bearer <bearer token>

User API #

With the User API, you can inspect the account details (e.g. consumer groups, provider groups, roles) of the logged-in user. This API requires the WH_CONSUMER role.

GET /user
Host: localhost:8000
Authorization: Bearer <bearer token>

Webhook API API #

With the Webhook API API, you can manage the webhook APIs in webhookie. Creating the webhook APIs requires the WH_PROVIDER role while to retrieve webhook APIs requires the WH_CONSUMER role.

Check out the swagger API documentation at http://localhost:8000/swagger-ui.html for a full list of endpoints.

# To retrieve the list of webhook APIs your user has permission to discover
GET /webhookapis
Host: localhost:8000
Authorization: Bearer <bearer token>

Powered by BetterDocs