Sha256: 976f071e5858d96f000ac6f67b98c86b3775fdb4dfc960efae1cd52be72b5d50

Contents?: true

Size: 1.45 KB

Versions: 26

Compression:

Stored size: 1.45 KB

Contents

# Webhooks

Allowed methods: GET, POST, DELETE

### Creating

1. To create a webhook, in the HAL Browser, navigate to the pact you want to create the webhook for
(Click "Go to Entry Point", then select "latest-pacts", then select the pact you want to create the webhook for.)
2. Click the "NON-GET" button for the "pact-webhooks" relation.
3. Paste in the webhook JSON (example shown below) in the body section and click "Make Request".

An example webhook to trigger a Bamboo job.

    {
      "request": {
        "method": "POST",
        "url": "http://master.ci.my.domain:8085/rest/api/latest/queue/SOME-PROJECT?os_authType=basic",
        "username": "username",
        "password": "password",
        "headers": {
          "Accept": "application/json"
        }
      }
    }

A request body can be specified as well.

    {
      "request": {
        "method": "POST",
        "url": "http://example.org/something",
        "body": {
          "some" : "json"
        }
      }
    }

**BEWARE** The password can be reverse engineered from the database, so make a separate account for the Pact Broker to use, don't use your personal account!

### Testing

To test a webhook, navigate to the webhook in the HAL browser, then make a POST request to the "execute" relation. The response or error will be shown in the window.

### Deleting

Send a DELETE request to the webhook URL.

### Updating

Send a PUT request to the webhook URL with all fields required for the new webhook.

Version data entries

26 entries across 13 versions & 1 rubygems

Version Path
pact_broker-2.12.0 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.12.0 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.11.0 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.11.0 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.10.0 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.10.0 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.9.0 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.9.0 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.9.0.beta.5 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.9.0.beta.5 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.8.0.beta.5 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.8.0.beta.5 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.8.0.beta.4 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.8.0.beta.4 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.7.0.beta.3 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.7.0.beta.3 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.7.0.beta.2 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.7.0.beta.2 lib/pact_broker/doc/views/webhooks.markdown
pact_broker-2.7.0.beta.1 lib/pact_broker/doc/views/pact-webhooks.markdown
pact_broker-2.7.0.beta.1 lib/pact_broker/doc/views/webhooks.markdown