Getting started with Webhooks
This guide has steps to help you set up webhooks in BrowserStack Test Reporting & Analytics.
Get started with templates
You can use templates to create custom payloads for specific ops monitoring or notification tools:
Automatically create PagerDuty incidents when the events and triggers you set occur.
Automatically create OpsGenie incidents when the events and triggers you set gets triggered.
Automatically create Jira tickets based on the events and triggers you set.
Send messages on MS Teams channels when the events and triggers you set occur.
Get started with a default or custom payload
Follow these steps to set up a webhook using a default or custom payload:
- Open Settings. Under Global Settings, click Webhooks, and then click Create webhook.
- Enter a webhook name and select an event type.
- Click Add trigger condition and configure filters from the available options.
- Under Applicable to, click Select Projects and select the projects this webhook applies to. You must select at least one project and can select up to 30. After you select 30 projects, the remaining projects are unavailable until you clear one.
- Select Start with default payload or click any of the available templates.
- Select Default or Custom payload.
- If you select the Default payload option:
a. Select the type of Authorization.
b. Enter the URL of the API endpoint of the application you want to connect.
c. Expand Sample Payload body and edit the payload according to your requirement.
d. Click Test Webhook. - If you select the Custom payload option:
a. Select POST or PUT method.
b. Enter the URL of the API endpoint of the application you want to connect.
c. Edit the body of the payload according to your requirement. Click the Variables menu and select variables to include any variables in the payload.
d. Select the type of Authorization.
e. Add optional headers as key-value pairs.
f. Add optional parameters as key-value pairs.
g. Switch on Re-trigger webhook if the build starts passing if you want to retrigger the webhook when the build passes.
h. Click Test Webhook.
- Click Create.
The endpoint URL must be publicly reachable. BrowserStack doesn’t save a webhook if the URL resolves to localhost, to a private network range such as 10.x.x.x, 172.16.x.x, or 192.168.x.x, or to a link-local address. Webhooks that already use such a URL continue to run, and you can still edit them as long as you don’t change the URL.
View your webhooks
When you create a webhook, you can view it on the Webhooks page along with other webhooks created by the members of your team. Go to Settings, and then click Webhooks under Global Settings to view all webhooks across projects.
The Webhooks page under Global Settings lists every webhook in your account across projects, and each webhook applies only to the projects selected for it. Use the project filter to view the webhooks that apply to a specific project.
The list shows 20 webhooks per page and displays the following information for every webhook:
- Name and URL: the webhook name and the endpoint URL that receives the request.
- Status: whether the webhook is enabled or disabled.
- Applicable to: the projects the webhook applies to. The column shows the first project followed by a count of the remaining projects. Hover over the count to view the full list.
- Event: the event type that triggers the webhook.
To enable or disable, edit, clone, or delete a webhook, click the three-dot menu at the end of the webhook’s row. The menu shows Enable or Disable based on the current status of the webhook.
Webhooks created from a project’s settings
Webhooks that you created earlier from a project’s Settings page appear on this list, with Applicable to set to the project they were created in. They keep working as before. To extend such a webhook to more projects, click the three-dot menu, click Edit, and then select the additional projects under Applicable to.
Filter webhooks
The search box and the three filters at the top of the list help you find a webhook:
| Filter | What it does |
|---|---|
| Search by name | Searches for webhooks with names that match the text you type. |
| All projects | Use this filter to find webhooks that apply to a project or a group of projects. |
| All events | Use this filter to find webhooks by event type, such as Build Finish, Test Failure, Quality Gate Result, and Alert Trigger. |
| All statuses | Use this filter to search for enabled or disabled webhooks. |
The filters work together, so you can combine them to narrow the list. For example, select a project in the project filter and then select Test Failure in the events filter to view only the test failure webhooks that apply to that project.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!