Yes, bamboo does provide REST APIs - https://developer.atlassian.com/server/bamboo/rest-apis/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ho @Rajat Roy ,
Please check the "Using the Bamboo REST APIs" section - https://developer.atlassian.com/server/bamboo/using-the-bamboo-rest-apis/
You will need to get your Personal Access Token from the UI. There's no way to get that via API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's for the current user you are requesting the token.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah , we use OIDC , so service accounts cant login via the UI to generate tokens . So we were looking for an option to generate it for these accounts via some API .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Rajat Roy
You can use the below to generate token for the service account, you need to have the credential details of the service account, otherwise it won't be possible.
User including Admins cannot generate PAT tokens for other users. Admin users can only revoke tokens of other users.
curl --request POST \
--user serviceaccount_user_id:serviceaccount_password \
--url 'http:localhost:8085/rest/api/latest/access-token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "token name",
"permissions": [
"READ"
]
}'
Regards,
Shashank kumar
**please don't forget to Accept the answer if your query was answered**
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rajat Roy to add to @Shashank Kumar 's answer the valid values for permissions parameter are:
READ - The token will be allowed to read data from Bamboo.
TRIGGER - Allows the token to trigger builds and deployments.
USER - The token will have the same permissions as the service account.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.