Environments

Allowed methods: GET, POST

Path: /environments

Creating an environment

Send a POST to /environments with the environment payload.

Example:

curl http://${PACT_BROKER_HOST}/environments \
  -H "Content-Type: application/json" \
  -H "Accept: application/hal+json" \
  -d '{
      "name": "test",
      "displayName": "Test",
      "production": false
    }'

Alternatively, you can use the HAL Browser.

Properties:

If all the services in the Broker are deployed to the same “public” internet, then there only needs to be one Production environment. If there are multiple segregated production environments (eg. when maintaining on-premises software for multiple customers ) then you should create a separate production Environment for each logical deployment environment.

Listing environments

GET /environments

{
  "_embedded": {
    "environments": [
      {
        "uuid": "79060381-269c-4769-9894-9ec3cab44729",
        "name": "production",
        "displayName": "Production",
        "production": true
      }
    ]
  }
}