Assign Licenses via API

This feature is only available in Incredibuild's Enterprise Plan.

You can assign licenses to Agents using this API. This requires an API Key and an Enterprise license.

 Request Endpoint

POST https://<coordinatorIP>:8000/api/license/setAgentLicense?coordinatorId=<coordinator ID>&version=<API version>

Where version is the version of the Incredibuild API. For the Assign License API, only version 1.3.0 is currently supported.

For example:

POST https://10.132.15.166:8000/api/license/setAgentLicense?coordinatorId=12345&version=1.3.0

Request Format:

Header: The header must include a key called client-api-key and the value of your API Key as a string.

Body: The request body is an array of agents where each item can contain some of the following fields. The fields must be in the order specified below. Each request can contain up to 100 agents.

Field Values Data Type Notes
agentName must match the name in the Coordinator Manager's Agent List string

 

helperLicense {"none", "fixed", "floating"} string

 

initiatorLicense {"none", "fixed", "floating"} string

 

ciInitiatorLicense {"none", "fixed", "floating"} string

 

requestedCores Integer Integer

Max cores to use as helper.

enableAgent

{"true", "false"}

Boolean

Enable as helper

buildCache

{"true", "false"}

Boolean

Allocate Build Cache

Example Body

Copy
{
  "agents": [
    {
      "agentName": "Agent1",
  "initiatorLicense": "Fixed"
      "helperLicense": "Fixed"
      "buildCache": true,   
      "enableAgent": true
    },
{
      "agentName": "Agent2",
      "ciInitiatorLicense":"Fixed",
      "helperLicense": "Floating"
      "requestedCores": 4,
      "buildCache": false,   
      "enableAgent": false
    },
{
      "agentName": "Agent3",
      "ciInitiatorLicense":"Floating",
      "helperLicense": "Fixed"
      "requestedCores": 8,  
      "enableAgent": true
    },
{
      "agentName": "Agent4",
      "ciInitiatorLicense":"None",
      "helperLicense": "None"
      "buildCache": false,   
      "enableAgent": false
    }
  ]
}