<aside> ⚠️ This is an experimental v0 endpoint. While marked as experimental, this endpoint is considered stable and versioned and is meant to be backwards compatible. We’re actively collecting feedback on this endpoint and will be releasing v1 in the future.

</aside>

This API provides the results of a run into your CI/CD pipeline. This could be just for visibility, but often one would use the results to block (stop, rollback, or revert pending releases and environment promotions).

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

</aside>

Request /api/v0/ci-greenlight/[root-run-id]

HTTP Method: GET

Sample Query

curl -X GET -H "Authorization: Bearer $apiKey" \\
     "<https://app.qawolf.com/api/v0/ci-greenlight/$rootRunId>"

Required Request Headers

Header Name Header Value Description
Authorization Bearer api_*** Provide a string constructed by appending your team API Key to Bearer .

Response

<aside> ℹ️ Those responses refer to the “run” terminology that is used in the UI, it is synonymous for “suite” in the deploy_success webhook.

</aside>

200 Response (CI Greenlight status)

The response looks like this:

{
  "blockingBugsCount": 0,
  "greenlight": true,
  "nonBlockingBugsCount": 2,
  "relevantRunId": "***",
  "relevantRunUrl": "https://***",
  "relevantRunWithBugsUrl": "https://***",
  "rootRunId": "***",
  "rootRunUrl": "https://***",
  "runStage": "completed",
  "workflowsDisabledAfterRunCount": 0,
  "workflowsInRunCount": 50,
  "workflowsUnderInvestigationCount": 0,
  "reproducedBugs": [
    {
      "applicationUrl": "https://***",
      "externalIssue": {
        "applicationUrl": "https://***",
        "externalIssueId": "***",
        "platform": "linear"
      },
      "isBlocking": false,
      "isNew": false,
      "name": "Bug 1",
      "number": 1,
      "priority": "low"
    },
    {
      "applicationUrl": "https://***",
      "externalIssue": {
        "applicationUrl": "https://***",
        "externalIssueId": "***",
        "platform": "linear"
      },
      "isBlocking": false,
      "isNew": true,
      "name": "Bug 2",
      "number": 2,
      "priority": "medium"
    }
  ]
}

Field Description
greenlight Indicates if the relevant run outcome signals safety to release.
relevantRunId See Superseding Logic (https://qawolf.notion.site/Superseding-Logic-51be8fd238174618b8b9a50d2905e7b2) section below.
relevantRunUrl The application URL to the relevant run.
relevantRunWithBugsUrl The application URL to the relevant run, with workflows diagnosed as bug filtered out.
rootRunId See Superseding Logic (https://qawolf.notion.site/Superseding-Logic-51be8fd238174618b8b9a50d2905e7b2) section below.
rootRunUrl The application URL to the root run.
runStage One of "initializing", “underReview”, "completed" and "canceled". See Run Stages (https://qawolf.notion.site/Run-Stages-d35026a4e0a24abd946dc1d0fc847bc0) section below.
workflowsDisabledAfterRunCount Number of workflows disabled after the review process is completed. This may happen when runs are put under maintenance, but should be relatively rare.
workflowsInRunCount Number of workflows in this run.
workflowsUnderInvestigationCount Number of failed workflows requiring investigation.
blockingBugsCount * The number of blocking bugs found or reproduced after review. Present only when runStage is "completed".
nonBlockingBugsCount * The number of non-blocking bugs found or reproduced after review. Present only when runStage is "completed".
blockingBugUrls* An array of URLs to observe all blocking bugs (string).
nonBlockingBugUrls* An array of URLs to observe all non-blocking bugs (string).
reproducedBugs* A list of detailed bug objects.

Interpreting the greenlight field