Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create API token for Jira organisation creation using REST API

Ninad Desai
Contributor
May 31, 2021

Hello Experts,

I am new to Atlassian products (currently using Trial version) and trying to create a JIRA organization using REST API (in Python) as defined in the below document in step 2).

1) As the first step, I had used this https://support.siteimprove.com/hc/en-gb/articles/360004317332-How-to-create-an-API-token-from-your-Atlassian-account to create api token and used it for doing  step 2) 

2)Trying to create JIRA organization using :

https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization/#api-rest-servicedeskapi-organization-post

while testing this, I am getting:
Response [403] = Returned if the user does not have permission to complete this request  i.e as per my understanding; the API token created in step 1) do not have right permission


Can someone advice me if there is any other kind of API token that needs to be created for this ? and if so, can someone navigate me to the right documentation of that API token creation process

5 answers

1 accepted

0 votes
Answer accepted
Daniel Ebers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2021

Hi @Ninad Desai

using the documentation it should work:
https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

Have you double checked if you can execute a very simple request (for example listing projects or so) to verify if REST API access works okay?
https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

I am just saying this because it would be interesting to know if the endpoint you want to use is not working like you want it to or if it is a general issue (for example authentication and such).

You could use this example (or any other you can find on that page) for a short cross check:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-projectidorkey-get

The mentioned one just displays information about a project and exists - for a test it should be enough.

Regards,
Daniel

Ninad Desai
Contributor
June 15, 2021

Hi @Daniel Ebers ,

 

Thanks for the response. Was able to fix the issue (unfortunately root cause is, I had missed selecting JIRA service management product for my account, even before using my rest API call)

This can be marked as resolved now

Regards,
Ninad

0 votes
Ninad Desai
Contributor
June 1, 2021

(If in case of any other way apart from one I mentioned above if anyone aware of)

Anyone who could help me out for understanding how to create API token which will have permission to create a JIRA organization as well?

0 votes
Ariel Kauan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2021

Yes it's right.
You will have to validate the endpoints :/

Ninad Desai
Contributor
May 31, 2021

Could you kindly elaborate with any possible example please about what exactly you mean by validate endpoints as I am not getting the same 

0 votes
Ariel Kauan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2021

It should work.
Confirm that you have access to site-admins or just Jira Administrators.

Ninad Desai
Contributor
May 31, 2021

Hi @Ariel Kauan ,

 

Thanks for coming back. I confirm that the atlassian account with which I created this token has "SITE ADMIN" role. Hope that's the right access needed here right to create account? 

 

Regards,
Ninad

0 votes
Felicia Kelley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2021
Hi I have the same problem and it sends me to the same side that I sent you to however I even had some issues even entering this comment hair I wanted to say if it helps me that if you go on top and click on format and go down to code block you're able to even be able to answer your comment like I am now doing so by doing that because other than that it won't even let me right right here

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events