Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,490
Community Members
 
Community Events
165
Community Groups

REST API call to get all components of project

Edited

Hello,

I want to get all of the components of a given project via API call.

Basic auth is disabled, we are using Kantega, I have a token and I am adminitator of the intance so permissions are not the issue.

I can successfuly open the the REST url in the browser

I've tried the following:

` curl -XGET -H "Authorization: OAuth <myTOKEN>" -H 'Accept: application/json' https://jiraqa.comapny.com/rest/api/latest/project/PRojectKey/components`

`curl -XGET -H "Authorization: OAuth <myTOKEN>" https://jiraqa.comapny.com/rest/api/latest/project/XXX/components`

 

Both return

{"errorMessages":["No project could be found with key 'XXX'."],"errors":{}}%

1 answer

0 votes
Stefan Salzl Community Leader May 21, 2022

Hi @Angel Urumov and welcome to the atlassian community,

the url needs to contain the correct key of your project you want to get the components from. As I see the project key that your call is calling is „XXX“. Is this key correct? Does a project with the key XXX exist?

Best
Stefan

Hello Stefan,

'XXX' is a placeholder. In the API call I am using the real key and as I mentioned it works when I try via browser with same URL as the API call.

 

Regards,

Angel

Stefan Salzl Community Leader May 23, 2022

One more thing I found during some research was that there can be set several restrictions (eg IP range). see the link below:

https://kantega-sso.atlassian.net/wiki/spaces/KSE/pages/235601943

Could you please check if anything is set there?

Best
Stefan

The IPs from which I am accessing are allowed.

 

Regards,

Angel

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you