Free Pack
Download BuildMaster Free Trial

Deployment Statuses by Release & Build Deployment API

by Olivia Glenn-Han, on Oct 16, 2019 10:15:00 AM

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! 


Related Posts

About Inedo

Inedo is a software product company bringing you the "tech behind the tech."

Makers of Windows-first, enterprise DevOps tools BuildMaster CI/CD, ProGet private package management, and Otter IaC. Maximize developer time, minimize release risk, and empower stakeholders to bring their vision to life faster, all with the people and technology you have right now.

Follow us on social media

Follow Inedo on YouTube Follow Inedo on Facebook Follow Inedo Twitter New call-to-action

Free e-books

Free PowerShell Book NuGet for the Enterprise Guide Jenkins CICD Guide Free CICD Book Free dotnet book free IaC book