Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Security

Note

All operations on this page require valid Access Tokens see Access Token Operations for more information on creating tokens.

View Agent State 
Status
subtletrue
colourGreen
titleread

reports the agents name, ID, build status and enabled/disabled state.

GET /rest/agents/1.0/{ID}/state?uuid={tokenId}   
Expand
Code Block
languagejs
titleResponse
{
  "id": 131073,
  "name": "Default Agent",
  "enabled": true,
  "busy": false
}

 

View Agent State - Shell Consumable Text 
Status
subtletrue
colourGreen
titleread

reports the agents name, ID, build status and enabled/disabled state As a file that can be consumed with a shells 'source' command.

Tip

This is useful inside a loop to wait for existing builds to finish before taking action on the host server.

GET /rest/agents/1.0/{agentId}/state/text?uuid={tokenId}
Expand
Code Block
languagebash
titleResponse
ENABLED=true
BUSY=false

Disable Agent 
Status
subtletrue
colourYellow
titlechange

Removes the agent from the active build pool. Existing builds will complete. 

POST /rest/agents/1.0/{agentId}/state/disable?uuid={tokenId}
Expand
titleClick here to expand response...
Code Block
languagejs
titleResponse
{
  "id": 131073,
  "name": "Default Agent",
  "enabled": false,
  "busy": false
}

Enable Agent 
Status
subtletrue
colourYellow
titlechange

Removes the agent from the active build pool. Existing builds will complete. 

POST /rest/agents/1.0/{agentId}/state/enable?uuid={tokenId}
Expand
titleClick here to expand response...
Code Block
languagejs
titleResponse
{
  "id": 131073,
  "name": "Default Agent",
  "enabled": true,
  "busy": false
}

 

 

Pre 1.5 Operations

Expand

View Agent State 
Status
subtletrue
colourGreen
titleread

reports the agents name, ID, build status and enabled/disabled state.

GET /rest/agent/1.0/{ID}?uuid={tokenId}   
Expand
Code Block
languagejs
titleResponse
{
  "id": 131073,
  "name": "Default Agent",
  "enabled": true,
  "busy": false
}

 

View Agent State - Shell Consumable Text 
Status
subtletrue
colourGreen
titleread

reports the agents name, ID, build status and enabled/disabled state As a file that can be consumed with a shells 'source' command.

Tip

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}
Expand
Code Block
languagebash
titleResponse
ENABLED=true
BUSY=false

Disable Agent 
Status
subtletrue
colourYellow
titlechange

Removes the agent from the active build pool. Existing builds will complete. 

POST /rest/agent/1.0/{agentId}/disable?uuid={tokenId}
Expand
titleClick here to expand response...
Code Block
languagejs
titleResponse
{
  "id": 131073,
  "name": "Default Agent",
  "enabled": false,
  "busy": false
}

Enable Agent 
Status
subtletrue
colourYellow
titlechange

Removes the agent from the active build pool. Existing builds will complete. 

POST /rest/agent/1.0/{agentId}/enable?uuid={tokenId}
Expand
titleClick here to expand response...
Code Block
languagejs
titleResponse
{
  "id": 131073,
  "name": "Default Agent",
  "enabled": true,
  "busy": false
}

...