CloudBees CI requires authentication tokens for users to access the API endpoints. These tokens can be generated in the CloudBees CI UI.
To generate an API authentication token:
-
From the dashboard, select your user name on the right of the top navigation bar.
-
Select Configure from the left pane.
-
Select Add new Token under API Token.
-
Enter a name to distinguish the token.
-
Select the copy icon and save the token in a safe place so you can use it later.
Once you leave the page, the token will no longer be visible so you will not be able to copy it again.
You can use the same token to access CloudBees CI APIs and the CLI. The keys are valid until the user revokes them in the UI.
You can create multiple keys. You may want multiple keys for instance if you supply a token to an external "less trusted" service which you will want to regenerate more often.
Authorization for requests depends on the API you are accessing and is set at the user level.