Agent Priority API

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

These APIs allow you to set the Build Priority and Assignment Priority on your Agents.

  • Build Priority: The priority that will be assigned to builds initiated by this Agent. When there are not enough helpers for all of your builds, the build priority defines which builds get the helpers. The highest priority (1) will always receive the full amount of helpers before any of the lower priority builds. Priorities of 2-4 will divide helpers if there are not enough. The lowest priority (5) will only receive helpers if all other builds are fully distributed.

  • Assignment Priority: When an Agent has a higher Assignment Priority, it is more likely to be assigned to assist with a build.

Every API call must include a header with a key called client-api-key and the value of your API key. All APIs are case sensitive.

Support Matrix

Agent Priority API Version Required version of Incredibuild for Windows
1.5.0 10.18

The following are descriptions of items in the API's calls below:

  • Coordinator IP Address/Hostname – the IP address or hostname of the Coordinator.

  • Coordinator UI Port – the port number you defined during installation. By default, this is 8000.

  • Version - the version of our API. Currently only version 1.5.0 is supported. If you do not specify a version in the API call, the lowest supported version will be used.

  • Coordinator ID - The ID assigned by Incredibuild to your Coordinator. You can view this in the Coordinator ManagerSettingsAPI Access area.

Set Build Priority

Sets the Build Priority for an Agent.

Request Syntax

POST https://{Coordinator IP Address/Hostname}:{Port}/api/agents/setBuildPriority?coordinatorId={coordinatorId}&version=1.5.0

Body Syntax

Copy
{
        "agents": ["agentname1", "agentname2"],
        "buildPriority": [1-5]
    }

Example Body:

Copy
{
        "agents": ["agent007", "agent006"],
        "buildPriority": 1
    }

Example Request:

POST https://coordmachinename:8000/api/agents/setBuildPriority?coordinatorId=0F0ZY79D-3D7B-4DC6-2C2E-90D1DF0AD24E&version=1.5.0

Example Response:

Copy
[
    {
        "agentName": "agent007",
        "status": "OK"
    },
    {
        "agentName": "agent006",
        "status": "OK"
    }
]

Set Assignment Priority

Sets the Assignment Priority for an Agent.

Request Syntax

POST https://{Coordinator IP Address/Hostname}:{Port}/api/agents/setAssignmentPriority?coordinatorId={coordinatorId}&version=1.5.0

Body Syntax

Copy
{
        "agents": ["agent1", "Agent2"],
        "assignmentPriority": [1-5]
    }

Example Body

Copy
{
        "agents": ["agent007", "agent006"],
        "assignmentPriority": 3
    }

Example Request:

POST https://coordmachinename:8000/api/agents/setAssignmentPriority?coordinatorId=0F0EA79D-3C8B-4DC5-9C2E-90D1DF0AD24E&version=1.5.0

Example Response:

Copy
[
    {
        "agentName": "agent007",
        "status": "OK"
    },
    {
        "agentName": "agent006",
        "status": "OK"
    }
]