If get organization in a solid subdomain, this way works:
curl --request GET \
--url 'https://mysubdomain.atlassian.net/rest/servicedeskapi/organization' \
--user 'my@email.com:<access_token>' \
--header 'Accept: application/json'
But this way doesn't work:
curl --request GET \
--url 'https://api.atlassian.com/admin/v1/orgs' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
Also this way doesn't work:
curl --request GET \
--url 'https://api.atlassian.com/admin/v1/orgs' \
--user 'my@email.com:<access_token>' \
--header 'Accept: application/json'
The error code is:
{"code":401,"message":"Unauthorized"}
The access token was created on this page:
https://id.atlassian.com/manage-profile/security/api-tokens
Why it doesn't work?
Hello, Good day. The access token that you are using will not help on Org level. Try the token suggested on following link https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/
Thank you.
This way can get organization data from one special organization. But if I have multiple organizations on this page:
How can I get all of them with API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.