Configuring Webhooks
Overview
A webhook enables users to insert their own customized code into the program flow. The user configures the method of calling the code, the event that triggers the call to the code, the URL that the code will communicate with, and the customized code itself.
Creating and Configuring Webhooks
-
In the OL Hub, click on your user name in the upper right-hand corner of the screen. In the menu that opens, click on Webhooks:
profile menu
-
The Webhooks page displays:
-
Click on Create a Webhook. The Create New Webhook window opens:
-
Type a Name for the Webhook (required).
-
Select a Method from the available list:
-
Enter the URL.
-
Select the Trigger from the available list (required):
-
Enter the Headers Key and Value pair. You may delete
the default (Content-Type and application/json) and replace them. You may also add pairs by clicking on Add Key-Value:
-
Enter the webhook JSON code between the brackets {} in the Body field.
Add query params, headers, and even a JSON object
You can fetch dynamic variables like:'${EVENT_NAME}' - (CREATE_PROJECT, TAG_PROJECT and so on) '${RESOURCE_NAME}' - (e.g. for creating a new project, the resource name could be “demo-account-details”) '${RESOURCE_ID}' - (e.g. the “demo-account-details” project UUID) '${RESOURCE_VERSION}' - The resource’s version (for example on tag project) '${RESOURCE_DATA}' - e.g. for tagging a project, the resource data can be the version of the tagged project) '${RESOURCE_TYPE}' '${TENANT_ID}' '${USER_NAME}' '${EVENT_STATUS}' '${EVENT_STATUS_CODE}' '${EVENT_DATE}'
-
You may optionally protect the Webhook as follows:
- Click on the Security tab.
- Check the Secure Webhook box and click on Generate New Secret. The message Generated secret key successfully is displayed and the new secret appears in the Secret box.
- Click on Copy to clipboard and paste the new secret into a secure location.
- Click on the Security tab.
-
Click on Create Webhook. The message Webhook has been created is posted and the Webhook displays.
-
To modify the webhook, click the Edit button on the upper right-hand side of the page.
-
To delete the webhook, click Delete Webhook at the bottom of the page.
-
To add another webhook, click the Create a Webhook button on the upper right-hand side of the page. The names of the webhooks that were created appear on the upper left-hand side of the page.
Updated about 1 month ago