I want to start using service accounts to make REST API calls in some scripts, but first I want to test using Postman to make sure I have all the correct permissions setup.
I created a service account
Then using postman I'm sending a GET request to:
https://api.atlassian.com/ex/jira/{cloudId]/rest/api/3/issue/NHSWS-17124
I've tried using 'Bearer Token' and 'Basic Auth', but both always result in a 404 Not Found error.
I think I have my Cloud ID correct. The documentation says...
To find your Cloud ID:
Go to admin.atlassian.com .
Locate the string after /s/ in your admin URL or response, such as 1a11d016-8984-4c3e-b9ab-142dd06acb1b.
When I do this I don't see any /s/ in my admin URL, but I do see something that looks like this after /o/ in the admin url.
I was able to retrieve the ID from our admin.atlassian.com ...
https://admin.atlassian.com/s/0....../
Here is another way to obtain the ID..
To find the cloud ID, go to admin.atlassian.com > Apps > Atlassian apps > It will list UI, you will see a listing of all of your "sites"(aka apps). You need to locate your JSM site and click on the "..." icon in the Actions column > "Manage Jira Service Management apps" option. Afterward in the new tab - you will find the cloudID in the URL contains your site ID (after /s).
See image...
Hope this helps.
Best, Joseph Chung Yin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That all looks accurate.
I was able to get this working using Basic Auth with the service account email for the Username: format looks like--> ServiceAccount-abcxyz@serviceaccount.atlassian.com and the token for the password.
The scopes can be tricky so read up on those to make sure you have the right one's. Kind of sucks that you cannot see or change them after the fact so get screenshots.
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.