Forums

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

REST API does not return any data with API token

Aseem Mohanty
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!
March 31, 2020

I realize that this has been asked a few times before and I have gone through the threads to no avail. 

I have google oauth based account on JIRA cloud. In the UI I can see all projects, issues, reports and have some admin rights.

My curl request:

curl --request GET --url 'https://org.atlassian.net/rest/api/2/project' --user 'username@org.tld:api_token' --header 'Accept: application/json'

> GET /rest/api/2/project HTTP/2
> Host: org.atlassian.net
> Authorization: Basic <base64-encoded-un/token>
> User-Agent: curl/7.64.1
> Accept: application/json
>


< HTTP/2 200
< server: AtlassianProxy/1.15.8.1
< vary: Accept-Encoding
< cache-control: no-cache, no-store, no-transform
< content-type: application/json;charset=UTF-8
< strict-transport-security: max-age=315360000; includeSubDomains; preload
< date: Tue, 31 Mar 2020 17:49:56 GMT
< atl-traceid: xxxxxxxxxxxxxxx
< x-arequestid: xxxxxxxxxxxxxxxxxxxx
< x-xss-protection: 1; mode=block
< timing-allow-origin: *
< x-content-type-options: nosniff
< micros-issuer: micros/edge-authenticator
< set-cookie: atlassian.xsrf.token=xxxxxxxxxxxxxxxxxxx; Path=/; Secure
<
* Connection #0 to host org.atlassian.net left intact
[]* Closing connection 0

 

I am a bit lost as to why this would not work. Based on my reading of the API docs, this should just work. What am I missing?

 

Any help would be greatly appreciated.

 

Thanks.

 

1 answer

1 accepted

0 votes
Answer accepted
Aseem Mohanty
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!
March 31, 2020

Apparently the . in an email address matters :). 

 

Solved.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events