changes.
| By operating tokens, one can authorize/unauthorize agents, or access agent details including token value and latest usage information. |
| | {note}This feature is available since QuickBuild 5.0.23 {note} |
| h1. Authorize build agent |
| h2. Syntax |
| New build agent can be authorized to join the build grid by accessing below url: |
| {code}http://localhost:8810/rest/tokens/authorize?ip=<ip address of build agent>&port=<port of build agent>{code} |
| |
| The response is of mime type _text/plain_ and the content is identifier of the newly created token for the build agent. |
| |
| h2. Security |
| You will need to use http BASIC authentication to login as administrator to authorize the build agent. |
| |
| h2. Demo |
| We use [curl|http://curl.haxx.se/] to demonstrate how to authorize the build agent: |
| # Download the build agent package from Grid page and run it from a machine not authorized to join the grid. Assume IP address of the build agent is _192.168.2.100_ and port is _8811_. |
| # Open grid page of QuickBuild server and you should see the new build agent appearing in unauthorized agent list. |
| # Now run below command from anywhere: |
| {code}curl -u admin:admin "http://<QB server>:8810/rest/tokens/authorize?ip=192.168.2.100&port=8811"{code} |
| # If above command succeeds, the newly connected agent will appear in active node list after a while in grid page. |
| |
| h1. Unauthorize build agent |
| h2. Syntax |
| Authorized build agent can be unauthorized by accessing below url: |
| {code}http://localhost:8810/rest/tokens/unauthorize?ip=<ip address of build agent>&port=<port of build agent>{code} |
| |
| The response is of mime type _text/plain_ and the content is identifier of the removed token representing the build agent. |
| |
| h2. Security |
| You will need to use http BASIC authentication to login as administrator to unauthorize the build agent. |
| |
| h2. Demo |
| We use [curl|http://curl.haxx.se/] to demonstrate how to unauthorize the build agent: |
| # Assume you have an existing active build agent with ip address _192.168.2.100_ and port _8811_. |
| # Now run below command from anywhere: |
| {code}curl -u admin:admin "http://<QB server>:8810/rest/tokens/unauthorize?ip=192.168.2.100&port=8811"{code} |
| # If above command succeeds, the build agent will be removed from active node list after a while. |
| |
| h1. Get token value and latest used information of agents |
| h2. Syntax |
| Agent details can be accessed by accessing below url: |
| {code}http://localhost:8810/rest/tokens?address=<address of build agent>{code} |
| If param _address_ is not supplied, details of all agents will be returned. |
| |
| The response is of mime type _text/plain_ and the content is XML representation of the agent details. |
| |
| h2. Security |
| You will need to use http BASIC authentication to login as administrator to get agent details. |
| |
| h2. Demo |
| We use [curl|http://curl.haxx.se/] to demonstrate how to access details of the build agent: |
| # Assume you have an active build agent with address _matrix:8811_. |
| # Now run below command from anywhere: |
| {code}curl -u admin:admin "http://<QB server>:8810/rest/tokens?address=matrix:8811"{code} |
| # If above command succeeds, you will get XML representation of build agent details |