I am trying to fetch list of projects using REST API.
API: https://nwmworld.atlassian.net/rest/api/2/project
I am using basic authentication and I am providing my domain email id(e.g. altaf.samnani@company.com) as username and Jira API Key as Password.
When I hit Send button using postman, I am getting response: []
when i hit the same API from chrome browser where my jira login is already there, I am able to fetch all projects.
Can you please help me to resolve this?
Hello @Altaf Samnani ,
The v2 API end point your using is still there and should be working but there is a updated v3 endpoint I would recomend using for this one as well that will eventually phase out the v2 (but not any time soon though):
Additionally I just ran a test on my instance on both v2 and v3 endpoints via Curl, and the response came back in full without issue, and from your initial comments it sounds like the API token is formatted correctly in the call, but I just wanted to verify that the account you are logging into the instance with is the same account you are running the API call as, to rule out any permissions conflicts. Because if you can hit the endpoint logged in you should see the same data back doing a remote call as that same user account.
So overall if the user account settings are correct I am wondering if there is possibly something in the formatting somewhere else in the API call causing the error you are seeing, can you provide the full syntax for your call you are issuing, and in my tests the following formatting was working on my end:
curl -D- -u EMAIL:API_TOKEN -X GET -H "X-Atlassian-Token: no-check" https://BASE_URL.atlassian.net/rest/api/3/project
Regards,
Earl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.