After you terminate an ephemeral environment or release it for something else to be installed in it, you should notify QA Wolf of that fact. When you notify us, we will stop all runs targeting that environment and check whether there are any changes to flows that need to be promoted to the static base environment. This eventually results in the environment showing as "closed" in QA Wolf.

Note: If you have the QA Wolf GitHub integration enabled for your preview testing, GitHub will notify us of PRs being merged or closed, and we use that notification to stop runs and trigger flow promotion. In this case, it is typically redundant and unnecessary to call this.

<aside> ⚠️ We highly recommend using our JavaScript SDK notifyTerminatedEphemeralEnvironment function directly. See @qawolf/ci-sdk

</aside>

Post to /api/webhooks/environment_terminated Webhook

HTTP Method: POST

Sample Query

curl -X POST -H "Authorization: Bearer <ApiKey>" \\
     -H "Content-Type: application/json" \\
     "<https://app.qawolf.com/api/webhooks/environment_terminated>" \\
	     -d '{"deploymentUrl": "<DeploymentUrl>"}'

API key

Required Request Headers

Header Name Header Value Description
Authorization Bearer api_*** Provide a string constructed by appending your team API Key to Bearer .
Content-Type application/json

JSON-formatted Request Body

This POST request supports a JSON-formatted object with the below fields. All fields are optional.

Commonly Used Fields

Field Value Description
environmentId Ephemeral environment id ID of the environment to terminate
environmentAlias Ephemeral environment alias Alias of the environment to terminate
deploymentUrl URL Preview URL for runs created with ephemeral_environment: true using ‣

Response

200 Responses

The response will look like this:

{
  "results": [{
    "environmentId":"cl1f6i0in15676w115vt43vw2",
    "promotionTaskId":"ckzoog9wy01720xyrvl8ah7gu",
    "code": "terminated"
  }]
}

HTTP Status Error Codes