Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

eSecurity

All operations on this page require an Authenticated Administrator

 

View All Tokens

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

GET /rest/agent/1.0/tokens/
 Click here to expand...
Response
[
  {
    "uuid": "d0ea6653-05e2-4d51-9d89-665cdfe86be6",
    "name": "readOnly",
    "read": true,
    "change": false
  },
  {
    "uuid": "7ba167aa-631c-4771-b197-fcb459cc7fd7",
    "name": "read and write",
    "read": true,
    "change": true
  }
]

 

Create Token

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.

POST /rest/agent/1.0/tokens
 Click here to expand to see request...
Response
  {
    "name": "informational name",
    "read": true,
    "change": false
  }

Note: Response mirrors request but includes the UUID.

 Click here to expand response...
Response
 {
    "uuid": "7ba167aa-631c-4771-b197-fcb459cc7fd7",
    "name": "informational name",
    "read": true,
    "change": false
  }

Update Token

Alter the name, or permissions of an existing token.

PUT /rest/agent/1.0/tokens/{tokenId}
 Click here to expand to see request...
Response
  {
    "uuid": "7ba167aa-631c-4771-b197-fcb459cc7fd7",
    "name": "give me more power",
    "read": true,
    "change": true
  }

Note: Response mirrors request 

 Click here to expand response...
Response
 {
    "uuid": "7ba167aa-631c-4771-b197-fcb459cc7fd7",
    "name": "give me more power",
    "read": true,
    "change": true
  }
  • No labels