BuildMaster Application Management API
  • 22 Jan 2024
  • 4 Minutes to read
  • Dark
    Light
  • PDF

BuildMaster Application Management API

  • Dark
    Light
  • PDF

Article Summary

The Application Management API has Endpoints to help list, create, update, and purge applications, and are intended to automate the setup and management of applications in your BuildMaster instance:

This API is only intended to update application settings; see the Variables Management API and Release & Build Deployment API to manage other application configuration.

Authentication

An API Key with the Application Management permission is required to use this API.

It can be passed to each endpoint in one of four ways, depending on the content type of the expected request:

MethodName or KeyDetails
Request headerX-ApiKeyall content types
Querystring valuekeyall content types
Form valuekeyonly applications/x-www-form-urlencoded content type
JSON propertyAPI_Keyon root object, only application/json content type

To specify an API Key, use the request header (X-ApiKey), querystring (key), or api:«api-key» as the user name. See API Access and API Key to learn more.

🚀 Quick Example: Authenticating with curl

For example, to authenticate with the API key a1b2c3d4e5 to the create application endpoint, you could specify the API key as follows:

curl -X POST --header "X-ApiKey: a1b2c3d4e5" "https://proget.corp.local/api/applications/create"

If the provided API key is either missing, unknown/incorrect or does not have permission, the following message is returned:

The specified API key does not have the proper permissions to perform this action.

Data Specifications

ApplicationInfo Object

ApplicationInfo is a set of key/value pairs that correspond to the fields on the Application > Basic Settings and Advanced Settings pages. It's used as both input and output data for various endpoints:

  • Output: The Create, Update, and List Application Endpoints return ApplicationInfo as a JSON-formatted object; all values are returned

  • Input: The Create, and Update Application Endpoints receive ApplicationInfo as either a JSON-formatted object, querystring parameter, or form-encoded data; a missing property indicates that the value should not be updated

Note that some values are optional (indicated by string?), and may be set to null or an empty string.

PropertyFormatNotes
idintInternal ID of application
namestringMust be unique across the system
descriptionstring?
groupNamestring?null to be ungrouped
activeboolfalse indicates a deactivated application
setupTemplatestring?Name of the Setup template to use or null to not use one
buildNumberSchemestringSequential, DateTimeBased, or Unique
releaseUsagestringRequired, Optional, or Disabled
defaultReleaseTemplatestring?Name of the or null to use the Default template
allowIssuesbool
displayIssuesbool
displayPipelinesbool
displayScriptsbool
displayConfigurationbool
displayDatabasebool
buildPageDescriptionstring?
artifactUsagestringDefault, None, FileSystem, or AssetDirectory
artifactAssetDirectorystring?When artifactUsage is AssetDirectory, this field must be the name of an Asset Directory secure resource; otherwise null
raftstring?Name of a raft or null to use the Default raft

JSON Object:

{
  "id": 123,
  "name": "myApplication",
  "description": "This is a sample application.",
  "groupName": myGroup,
  "active": true,
  "setupTemplate": "BasicSetup",
  "buildNumberScheme": "Sequential",
  "releaseUsage": "Required",
  "defaultReleaseTemplate": null,
  "allowIssues": true,
  "displayIssues": true,
  "displayPipelines": true,
  "displayScripts": true,
  "displayConfiguration": true,
  "displayDatabase": true,
  "buildPageDescription": "This page provides information about the build.",
  "artifactUsage": "FileSystem",
  "artifactAssetDirectory": null,
  "raft": "MainRaft"
}

CloneApplication Object

CloneApplication is a set of key/value pairs that provide direction on creating a new application. It's used as input for the Clone Application Endpoint.

This will behave the same as cloning that application from the UI.

PropertyFormatNotes
namestringThe name of the new application to create
fromstringThe name or id of an application to clone
raftstring?Name of a raft or null to use the Default raft

JSON Object

{
  "name": "NewApplication",
  "from": "ExistingApplication",
  "raft": "CustomRaft"
}

ImportApplication Object

ImportApplication is a set of key/value pairs that provide direction on creating a new application. It's used as input for the Import Application Endpoint.

Depending on the value of the properties, this behaves like creating an application from a template, reapplying a template, creating a sample application, or restoring an application from a backup.

PropertyFormatNotes
namestringThe name of the new application to create
packageSourcestringThe name of a Universal Feed secure resource
packageIdstringThe id of the package to import (not the name)
packageVersionstringThe version of the package to import or latest for the latest version
importHistoryboolWhen set to true, historical data in the package like Build and Executes will be imported
overwriteboolWhen set to false, if an application with the specified name already exists, an error will occur; otherwise, any items in the Package will overwrite the configuration
raftstring?Name of a raft or null to use the "Default" raft

JSON Object:

{
  "name": "NewApplication",
  "packageSource": "MyUniversalFeed",
  "packageId": "com.example.myapp",
  "packageVersion": "1.0.0",
  "importHistory": true,
  "overwrite": false,
  "raft": null
}

Was this article helpful?