This documentation relates to QuickBuild 8.0.x
Select here if you are using a different version


Version 4 by Steve Luo
on Jul 29, 2018 06:10.

compared with
Current by Steve Luo
on Jan 24, 2019 02:22.

These lines were removed. This word was removed.
These lines were added. This word was added.

View page history

There are 1 changes. View first change.

 Since 8.0.12
 Webhooks allow you to subscribe to build events on your QuickBuild instance. When one of those events is triggered, we'll send a HTTP POST payload to the webhook's configured URL.
 You can set up Webhooks for one configuration as many as you want. The configuration setting looks like below:
 h3. Event
 The build events include:
 * BUILD_STARED when build is stared
 * BUILD_FINISHED when build is finished
 h3. Payload
 Each event type has the same payload format like below:
  "configurationId": 123, // configuration id
  "configurationPath": "root/PMEase/Quickbuild", // configuration path
  "id": 345, // build id
  "version": "1.3.4",
  "requester": "admin",
  "duration": 100, // in milliseconds
  "beginDate": "20180728T03:51:58.573+0000", // in ISO8601 format, yyyyMMdd'T'HH:mm:ss.SSSZ
 "endDate": "20180728T03:51:58.573+0000", // in ISO8601 format, yyyyMMdd'T'HH:mm:ss.SSSZ
  "beginDate": "2018-07-28T03:51:58.573+0000", // in ISO8601 format, yyyy-MM-dd'T'HH:mm:ss.SSSZ
 "endDate": "2018-07-28T03:51:58.573+0000", // in ISO8601 format, yyyy-MM-dd'T'HH:mm:ss.SSSZ
 h3. Delivery headers
 HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers:
 || Header || Description ||
 | X-QB-EventType | Name of the event type that triggered the delivery, can be: BUILD_STARTED, BUILD_FINISHED |
 | X-QB-Signatuer | The HMAC hex digest of the response body. This header will be sent if the webhook is configured with a secret. The HMAC hex digest is generated using the sha1 hash function and the secret as the HMAC key. |
 h4. HMAC signature
 Below is an example with Java on how to create the signature:
 public class HmacSha1Signature {
  private static final String HMAC_SHA1_ALGORITHM = "HmacSHA1";
  private static String toHexString(byte[] bytes) {
  try (Formatter formatter = new Formatter()) {
  for (byte b : bytes) {
  formatter.format("%02x", b);
  return formatter.toString();
  public static String calculateRFC2104HMAC(String data, String key)
  throws SignatureException, NoSuchAlgorithmException, InvalidKeyException {
  SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), HMAC_SHA1_ALGORITHM);
  Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM);
  return toHexString(mac.doFinal(data.getBytes()));