Forums

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

Jira API always returns "errorMessage": "Site temporarily unavailable"

joel
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!
January 14, 2020

I've been trying the following in Postman:

GET https://{{mycloudinstance}}/rest/api/2/mypreferences --user foo@bar.com:{{myjiratoken}}

and always get the response:

{    "errorMessage": "Site temporarily unavailable"}

I'm logged into the site so I'm pretty sure it's available.

I saw somewhere on the developer forum that you need to use a different base URL when using a token, but that discussion was for Confluence and I can't find a similar comment for Jira.

2 answers

0 votes
Deleted user December 10, 2021

I was having this problem, Postman version 9.3.1 for Windows, Jira Cloud.

I had to remove any pre-existing cookie by:

  • Request settings -> Disabling cookie jar
  • Request Cookies settings -> Remove cookie

And remove the Postman-Token header:

  • Postman app's settings File -> Settings -> General -> Headers -> turn off "Send Postman Token header"

Authorization: Basic Auth

Username: <your email>

Password: <your API token

 

Headers:

Check Host (calculated when request is sent)

Content-Type: application/json

 

The above got basic GET requests working for me.

 

0 votes
Fernando Bordallo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 14, 2020

Hello @joel

Looking at the docs for that resource you'll see there is a hard requirement on a key being passed. Also, check the additional header used in the example.

joel
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!
January 14, 2020

Thanks @Fernando Bordallo I missed that.   Unfortunately, that didn't do the trick.

I have 2 different API tokens:

  • one was generated via https://id.atlassian.com/manage/api-tokens.  It has no key, but does have a label.  The token is very short, less than 32 chars.
  • the 2nd one has a key and is much longer and was generated from the Test Management console and has an expiry.  

I've tried both of them but still get the same result.  I tried the label with the token generated via id.atlassian.com/manage/api-tokens, I tried the key from Test Management, I mixed them up, but no success.

Like Fernando Bordallo likes this
Fernando Bordallo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 15, 2020

Hello again @joel

Where the docs state key it does not refer to your token or any other access key. It refers to the key of the key:value pair of the user preferences you are requesting. 

For example:

  • user preference key = personalized.nickName
  • user preference value = "Johny Dee"

Your API request would be the following:

curl --request GET \
  --url '/rest/api/2/mypreferences?key=personalized.nickName' \
  --user 'my.email@example.com:my_api_token' \
  --header 'Accept: application/json'
Cézar Augusto
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!
September 16, 2020

I am having the same problem here with:

POST https://{{mycloudinstance}}/rest/api/3/issue

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
for creating an issue.

The documentation about the fields for this request doesn't help much either..

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events