BuildMaster Application Management API
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:
Create Application Endpoint - Create a blank application
Clone Application Endpoint - Clones an existing application
Import Application Endpoint - Create an application from an exported package
Update Application Endpoint - Update an existing application
Purge Application Endpoint - Purge an existing application
List Application Endpoint - Lists all existing applications
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:
Method | Name or Key | Details |
---|---|---|
Request header | X-ApiKey |
all content types |
Querystring value | key |
all content types |
Form value | key |
only applications/x-www-form-urlencoded content type |
JSON property | API_Key |
on 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.
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 returnedInput: 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.
Property | Format | Notes |
---|---|---|
id |
int | Internal ID of application |
name |
string | Must be unique across the system |
description |
string? | |
groupName |
string? | null to be ungrouped |
active |
bool | false indicates a deactivated application |
setupTemplate |
string? | Name of the Setup template to use or null to not use one |
buildNumberScheme |
string | Sequential, DateTimeBased, or Unique |
releaseUsage |
string | Required, Optional, or Disabled |
defaultReleaseTemplate |
string? | Name of the or null to use the Default template |
allowIssues |
bool | |
displayIssues |
bool | |
displayPipelines |
bool | |
displayScripts |
bool | |
displayConfiguration |
bool | |
displayDatabase |
bool | |
buildPageDescription |
string? | |
artifactUsage |
string | Default, None, FileSystem, or AssetDirectory |
artifactAssetDirectory |
string? | When artifactUsage is AssetDirectory, this field must be the name of an Asset Directory secure resource; otherwise null |
raft |
string? | 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.
Property | Format | Notes |
---|---|---|
name |
string | The name of the new application to create |
from |
string | The name or id of an application to clone |
raft |
string? | 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.
Property | Format | Notes |
---|---|---|
name |
string | The name of the new application to create |
packageSource |
string | The name of a Universal Feed secure resource |
packageId |
string | The id of the package to import (not the name) |
packageVersion |
string | The version of the package to import or latest for the latest version |
importHistory |
bool | When set to true , historical data in the package like Build and Executes will be imported |
overwrite |
bool | When 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 |
raft |
string? | 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
}