It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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.

1 answer

0 votes

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.

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

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'

I am having the same problema 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

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