View Agent State
reports the agents name, ID, build status and enabled/disabled state.
GET /rest/agent/1.0/{ID}?uuid={tokenId}
Response
{ "id": 131073, "name": "Default Agent", "enabled": true, "busy": false }
View Agent State - Shell Consumable Text
reports the agents name, ID, build status and enabled/disabled state As a file that can be consumed with a shells 'source' command.
This is useful inside a loop to wait for existing builds to finish before taking action on the host server.
GET /rest/agent/1.0/{agentId}/text?uuid={tokenId}
Response
ENABLED=true BUSY=false
Disable Agent
Removes the agent from the active build pool. Existing builds will complete.
POST /rest/agent/1.0/{agentId}/disable?uuid={tokenId}
Response
{ "id": 131073, "name": "Default Agent", "enabled": false, "busy": false }
Enable Agent
Removes the agent from the active build pool. Existing builds will complete.
POST /rest/agent/1.0/{agentId}/enable?uuid={tokenId}
Response
{ "id": 131073, "name": "Default Agent", "enabled": true, "busy": false }