Webhooks
Send web requests to any external systems
You can use Webhooks to send web requests to any external systems (ex : Jira, Confluence, Bamboo, Jenkins, Gitlab, etc.) in response to changes performed in Golive or in Jira.
For example, you may want to automatically trigger a deployment job:
  • when the deployed version of an environment is updated in Golive
  • when the status of an environment is changed
  • when a new issue is linked to an Environment
  • ...
Using Webhooks means that your external tools do not have to periodically poll Jira (via the REST API) to determine whether a change has occurred in Golive.

Create a new Webhook

Open Automations page and create a new Automation of type "Webhook" to start configuration of a new webhook:

Configure the Endpoint

In order to call an external HTTP system, you have to configure its endpoint and how it should be called:
  • Type of Request (POST, GET, PUT, DELETE,...)
  • URL to send the request to
  • Headers (opt): useful to send authentication information, token, ... required by your target system (ex: basic authentication)

Default Payloads (body)

Golive sends standard JSON payloads as body of POST, UPDATE and PUT requests. Example of payload sent when "Environment Updated" event is triggered:
1
{
2
"timestamp": 1616408079845,
3
"event": "environment:updated",
4
"environment": {
5
"id": 11,
6
"application": {
7
"id": 21,
8
"name": "AppTest",
9
"deploymentAttributes": []
10
},
11
"category": {
12
"id": 31,
13
"name": "CategoryTest",
14
"order": 1
15
},
16
"environmentPermissionScheme": {
17
"id": 41,
18
"name": "PermSchemeTest",
19
"global": false
20
},
21
"status": {
22
"id": 51,
23
"name": "Up",
24
"description": "StatusDescription",
25
"color": "BLUE",
26
"order": 1
27
},
28
"url": "http://fakeurl",
29
"urlHtml": "<a href=\"http://fakeurl\" target=\"_blank\">http://fakeurl</a>",
30
"deployment": {
31
"deploymentId": 1,
32
"id": 1,
33
"versionName": "VersionName",
34
"versionId": "123",
35
"deployedTime": 1616408079845,
36
"categoryId": 31,
37
"categoryName": "CategoryTest",
38
"applicationId": 21,
39
"applicationName": "AppTest",
40
"endTime": 1616408079845,
41
"duration": 1000,
42
"buildNumber": "123",
43
"description": "DeployedDescription",
44
"attributes": {
45
"Parameter": "ParameterValue"
46
}
47
},
48
"attributes": {
49
"Data Backup": "Data Backup Value",
50
"Owner": "OwnerValue"
51
}
52
},
53
"user": {
54
"self": "https://jira-staging.apwide.com/rest/api/2/user?username=admin",
55
"name": "admin",
56
"key": "admin",
57
"emailAddress": "[email protected]",
58
"avatarUrls": {
59
"48x48": "https://jira-staging.apwide.com/secure/useravatar?ownerId=admin&avatarId=10741",
60
"24x24": "https://jira-staging.apwide.com/secure/useravatar?size=small&ownerId=admin&avatarId=10741",
61
"16x16": "https://jira-staging.apwide.com/secure/useravatar?size=xsmall&ownerId=admin&avatarId=10741",
62
"32x32": "https://jira-staging.apwide.com/secure/useravatar?size=medium&ownerId=admin&avatarId=10741"
63
},
64
"displayName": "Thomas Anderson",
65
"active": true,
66
"timeZone": "Europe/Zurich"
67
},
68
"environmentChanges": [
69
{
70
"fieldType": "URL",
71
"field": "URL",
72
"from": "http://fake.mycompany.com",
73
"fromString": "http://fake.mycompany.com",
74
"to": "http://fake.new.mycompany.com",
75
"toString": "http://fake.new.mycompany.com"
76
},
77
{
78
"fieldType": "Owner",
79
"field": "Owner",
80
"from": "John Smith",
81
"fromString": "John Smith",
82
"to": "Jane Doe",
83
"toString": "Jane Doe"
84
}
85
]
86
}
Copied!

Custom Payloads (body)

Enable Custom Payload toggle to completely customize your payload to fit the format required by your external system. It can be any type of XML, TXT, CSV, YAML, JSON,... or other proprietary formats.
Thanks to the embedded editor, you can insert dynamic content into your payloads using expressions, conditions and loops (Pebble Templates), for example:
1
{
2
execution: "{{timestamp}}",
3
event: "{{webhookEvent}}",
4
environmentName: "{{environment.application.name}} {{environment.category.name}}",
5
{% if environment.status is not null %}
6
status: "{{environment.status.name}}",
7
{% endif %}
8
{% if environment.deployment is not null %}
9
status: "{{environment.deployment.versionName}}",
10
{% endif %}
11
attributes: [
12
{% for attribute in environment.attributes %}
13
"{{attribute.key}}": "{{attribute.value}}"
14
{% endfor %}
15
]
16
}
Copied!

Test your Webhooks

You can inspect and debug the payloads, requests, responses,... accessing the execution logs in Automations Page as described here. It will greatly help you to understand what may be changed to fix integration issues.
There are also free and very useful online tools available to help you test/configure your Webhooks. One of them is RequestBin.com :
RequestBin.com — A modern request bin to collect, inspect and debug HTTP requests and webhooks
pipedream
It will generate a unique URL you can use to configure your Webhooks. You can then easily visualize what has been sent by Jira accessing this unique URL with your browser.

Example:

Example: trigger a Jenkins Job

Learn how it is easy to trigger Jenkins jobs using Golive Webhooks:
Trigger Jenkins Job Remotely using Jenkins API
Medium
Use our Golive Jenkins Shared Lib to call back the Golive REST API in order to update back your environments from your Jenkins pipelines

Jira Webhooks (legacy)

We recommend using Golive Automations for creating your Webhooks, as you get much more flexibility than using Jira webhooks.
Learn more about Jira Webhooks in the Atlassian Documentation:
Webhooks

Environment Webhook Events

The following Environment Events are available to create new WebHooks in Jira :
  • Environment Created (a new environment has been created)
  • Environment Edited (an existing environment has been edited)
  • Environment Deleted (an environment has been deleted)
  • Version Deployed (the deployed version of an environment has been changed)
  • Status Updated (the status of an environment has been changed)
  • Issue Associated (an issue has been associated to an environment)
  • Issue Dissociated (an issue has been dissociated to an environment)
Select which event(s) you want to associate to your webhook at the bottom of the Webhooks Jira admin page:

Environment Webhook URL Variables

You can append variables to the webhook URL when creating or updating a webhook. The variables are listed below:
1
${environment.id}
2
${environment.application}
3
${environment.category}
4
${environment.deployedVersion}
5
${environment.status}
6
${issue.key} (available for Issue Associated and Issue Dissociated)
Copied!
You can use these variables to dynamically insert the value of the current environment (or issue that fired the event) into the webhook URL when it is triggered.
Note that Jira 7.x helps you selecting the variable you can use to configure your Webhook URL:

Environment Webhook Response Examples

When triggered, Environment Webhook Events post JSON response.

Environment Created response example

1
{
2
"timestamp": 1477302280447,
3
"webhookEvent": "environment:created",
4
"environment":
5
{
6
"id": 3,
7
"url": "",
8
"urlHtml": "",
9
"customProperties":
10
[
11
{
12
"id": 1,
13
"key": "PROPERTY_1",
14
"name": "Description",
15
"description": "General information about the environment, purpose of the environment,...",
16
"active": true,
17
"value": "",
18
"valueHtml": ""
19
},
20
21
{
22
"id": 2,
23
"key": "PROPERTY_2",
24
"name": "Details",
25
"description": "Detailed information about the environment (ex : link on admin console, administrator,...)",
26
"active": true,
27
"value": "",
28
"valueHtml": ""
29
}
30
],
31
32
"application":
33
{
34
"id": 1,
35
"name": "eCommerce"
36
},
37
38
"category":
39
{
40
"id": 1,
41
"name": "Dev 1"
42
},
43
44
"environmentPermissionScheme":
45
{
46
"id": 1,
47
"name": "Default EnvironmentPermission Scheme"
48
}
49
},
50
51
"user":
52
{
53
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
54
"name": "admin",
55
"key": "admin",
56
"emailAddress": "[email protected]",
57
"avatarUrls":
58
{
59
"48x48": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=48",
60
"24x24": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=24",
61
"16x16": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=16",
62
"32x32": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=32"
63
},
64
65
"displayName": "admin",
66
"active": true,
67
"timeZone": "Europe/Zurich"
68
}
69
}
Copied!

Issue Associated response example

1
{
2
"timestamp": 1477302500095,
3
"webhookEvent": "environment:env_customfield_value_added",
4
"environment":
5
{
6
"id": 1,
7
"url": "https://preprod-your-company.com/shop",
8
"urlHtml": "<a href=\"https://preprod-your-company.com/shop\" target=\"_blank\">https://preprod-your-comp..</a>",
9
"customProperties":
10
[
11
{
12
"id": 1,
13
"key": "PROPERTY_1",
14
"name": "Description",
15
"description": "General information about the environment, purpose of the environment,...",
16
"active": true,
17
"value": "PreProd Corporate Shop\nContact:[email protected]\nCalendar:https://preprod-calendar.your-company.com\nCMS access:https://preprod-your-company.com/admin-console",
18
"valueHtml": "PreProd Corporate Shop\nContact:\n<a href=\"mailto:[email protected]\">[email protected]</a>\nCalendar:\n<a href=\"https://preprod-calendar.your-company.com\" target=\"_blank\">https://preprod-calendar...</a>\nCMS access:\n<a href=\"https://preprod-your-company.com/admin-console\" target=\"_blank\">https://preprod-your-comp..</a>"
19
},
20
21
{
22
"id": 2,
23
"key": "PROPERTY_2",
24
"name": "Details",
25
"description": "Detailed information about the environment (ex : link on admin console, administrator,...)",
26
"active": true,
27
"value": "DB:Oracle 11.x\nLoadbalanced (4 nodes)\nCDN enabled (Akamai)\nData Refreshed every night",
28
"valueHtml": "DB:Oracle 11.x\nLoadbalanced (4 nodes)\nCDN enabled (Akamai)\nData Refreshed every night"
29
}
30
],
31
32
"application":
33
{
34
"id": 1,
35
"name": "eCommerce"
36
},
37
38
"category":
39
{
40
"id": 12,
41
"name": "PreProd"
42
},
43
44
"environmentPermissionScheme":
45
{
46
"id": 1,
47
"name": "Default EnvironmentPermission Scheme"
48
}
49
},
50
51
"environmentCustomFieldChange":
52
{
53
"field": "Detected In",
54
"fieldtype": "custom",
55
"from": null,
56
"fromString": null,
57
"to": "1",
58
"toString": "eCommerce PreProd"
59
},
60
61
"issueId": 10000,
62
"issueKey": "TEST-1",
63
"issueType": "Bug",
64
"issueSummary": "Checkout is Broken",
65
"issueStatus": "To Do",
66
"user":
67
{
68
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
69
"name": "admin",
70
"key": "admin",
71
"emailAddress": "[email protected]",
72
"avatarUrls":
73
{
74
"48x48": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=48",
75
"24x24": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=24",
76
"16x16": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=16",
77
"32x32": "http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&amp;s=32"
78
},
79
80
"displayName": "admin",
81
"active": true,
82
"timeZone": "Europe/Zurich"
83
}
84
}
Copied!
Last modified 1yr ago