Deployment Statuses by Release & Build Deployment API


Crista Perlton

Crista Perlton


Why You Should Create a Package Approval Workflow for  27th September, 2023

Do I really need to leave .NET Framework for .NET 8? 13th September, 2023


Deployment Statuses by Release & Build Deployment API

Posted on .

There are times when a third-party tool may need to retrieve the status of a build in BuildMaster (generally to be consumed by a custom tool that you have written). Starting with BuildMaster v5, the Release & Build Deployment API offers a simple mechanism for retrieving build statuses. 

Step 1: Create an API Key

To enable the API, you must create an API key within BuildMaster.

Simply navigate to Administration > API Keys & Access Logs and select Create API key

Make sure to enable Grant access to Release & Deployment API option so the key you create has access to the required API endpoint.

Step 2: Get the Deployment Details

Once you have an API key, you can perform a Get Deployments request. There are several filters you can apply. In this example, we’ll apply the Application, Release, and Build filters.

GET /api/releases/build/deployments?applicationName=HDARS&releaseNumber=1.8.3&buildNumber=1&key=hLJA9IFeV7MKzVfeaaSktg==

The response will return something like this: 

          "id": 1179,
          "plan": "Deploy HDARS",
          "status": "failed",
          "started": "2017-03-17T17:09:13.2170000",
          "ended": "2017-03-17T17:09:53.3800000",
          "createdBy": "Admin",
          "createdOn": "2017-03-17T17:09:11.5270000",
          "pipelineId": 8,
          "pipelineName": "HDARS",
          "pipelineStageName": "Testing",
          "environmentId": 2,
          "environmentName": "Testing",
          "applicationId": 8,
          "applicationName": "HDARS",
          "releaseId": 10,
          "releaseNumber": "1.8.3",
          "releaseName": "1.8.3",
          "buildId": 81,
          "buildNumber": "1"

In this case, we can see that the deployment failed! 

Crista Perlton

Crista Perlton