In this Help doc
Create a New Webhook Endpoint
Click Settings
Expand your Organization
Click Webhooks
Click New Webhook Endpoint
Enter the name of the webhook
Enter the webhook URL
Select the desired Event Types:
data_point.created
data_point.deleted
data_point.updated
event.created
event.deleted
event.updated
graph.created
graph.deleted
graph.updated (this refers to graph settings, not values)
knowledge_item.created
knowledge_item.deleted
knowledge_item.updated
member.created
member.deleted
member.updated
objective.created
objective.deleted
objective.updated
position.created
position.deleted
position.updated
team.created
team.deleted
team.updated
Click Create Webhook Endpoint
Your Webhook Endpoint is displayed
Normally, after creating the Webhook endpoint, this area will be empty. Once you start creating, updating or deleting data relevant to the event types you've chosen, the events will appear here.
Edit a Webhook Endpoint
Click Settings
Expand your Organization
Click Webhooks
Click the Webhook Endpoint
Click Edit Endpoint
Update the desired data
Click Update Webhook Endpoint
Check Status of Webhook Events
Click Settings
Expand your Organization
Click Webhooks
Click the Webhook Endpoint
Click the desired Webhook Event
All data regarding the event will be displayed, such as who triggered it and when, the data all attempts related to it.
To get more data on any of the attempts, click the drop-down arrow on the desired attempt.
All related info will appear.
Obviously, this is an example is a successful event. If there are failed attempts, it will keep trying to resend the event in the next 3 days. The errors will also appear under Response Status Code and Response Body.
Filter Webhook Events
Click Settings
Expand your Organization
Click Webhooks
Click the Webhook Endpoint
By default, it will list All events. To see the Sent or Failed ones, click on the desired filter.
Delete a Webhook Endpoint
Click Settings
Expand your Organization
Click Webhooks
Click the Webhook Endpoint
Click Edit Endpoint
Click Delete Endpoint
Get the Signing Secret
Click Settings
Expand your Organization
Click Webhooks
Click the Webhook Endpoint
Click Reveal
Validate a Webhook Request
As a necessary security practice, you should validate the webhook request to ensure a webhook is coming from MetaPulse. To do that, you will need to generate a signature and compare it to the MetaPulse-Signature
request header. Here's how:
Get the Signing Secret from MetaPulse after configuring the webhook endpoint there.
Combine the
MetaPulse-Request-Timestamp
request header with the request body joined by a period (.
). It will look like this:1721173157.{id: "abc123", ...}
Use OpenSSL HMAC to generate a SHA256 hexdigest using the Signing Secret and the combined timestamp and body.
Compare the result with the
MetaPulse-Signature
header.
Example Ruby code:
signing_secret = "..."
timestamp = request.headers["MetaPulse-Request-Timestamp"]
body = request.body.read
signature = OpenSSL::HMAC.hexdigest("SHA256", signing_secret, "#{timestamp}.#{body}")
if signature == request.headers["MetaPulse-Signature"]
# Valid request
else
# Invalid request
end