I try to get the list of projects with the rest api. I use a test account and use the following call
https://<prj>.atlassian.net/rest/api/3/project/
What am I doing wrong ?
Help appreciated
Hi @ALAIN THIRE
Are you logged in to Atlassian when using edge?
Do you have the API token and email in postman?
Regards
Aaron
Hi, desn't matter wether Iam logged in or not in edge
https://atvantage.atlassian.net/rest/api/3/project/ returns in the expected list of projects
However if I do the call in postman it doesn't work
@Aaron Pavez _ServiceRocket_ Following this issue. I am having the same issue in our Jira instance. We are hosted in AWS(not Atlassian cloud). When making the GET /rest/api/2/project call from within an integration partner's software and using a bearer token that has full Admin rights, we get 200, but no data back. We've added IPs and connection is working. And I can make the call from postman with the same token and it returns data.
Why would Jira return a 200 but no data?
Hi Alain,
When using postman, instead of password, we need to use our API token for this to work .
Postman application with basic authentication: username + api token
Hope this helps.
I was having the same issues, this worked! In the Headers there needs to be an entry with the key as "Authorization" with the value "Basic <Username: api-token>", but the username + token has to be encrypted in base64. The Token also needs to be inside the password field inside of the Authorization Tab. Don't know why the Documentation is so awfully written.
Figured out that the Jira API sometimes returns no data when the token being used in the request passes authentication and authorization but there is no data to return. This is 'bad practice' for an API, it should return a 204(successful but no content) or an empty data set at minimum.
Might be a completely unrelated topic, but why do I get a 200OK response for a similar request mentioned by Ramashry - when I use the wrong Auth (token) - with an empty result set?
It's completely non-trivial from user's perspective what's happening and what is the reason for the dataset?
Request:
curl --location 'https://[redacted].atlassian.net/rest/api/3/project/search' \--header 'Accept: application/json' \--header 'Authorization: Basic something'
Response:
{"self": "https://[redacted].atlassian.net/rest/api/3/project/search?maxResults=50&startAt=0","maxResults": 50,"startAt": 0,"total": 0,"isLast": true,"values": []}
This topic has been locked because the thread has become a bit dated. If you’d like to keep the conversation going or have additional questions, we encourage you to start a new topic. You can read more about necro posting (“raising threads from the dead”) in our Community Guidelines .
Thanks!
It looks like you're new here. Sign in or register to get started.