Rest api not connecting

Deleted user September 9, 2020


I am accessing url : https://hibu-us.atlassian.net/rest/api/2/search with api key.
Body: {"jql":"project = DIG","startAt":0,"maxResults":2,"fields":["id","key"]}
getting error
{
"errorMessages": [
"The value 'QA' does not exist for the field 'project'."
],
"warningMessages": []
}

Note: Able to access same in local Jirra running in Docker. Is any difference for clould jirra project :: value.
Jqul project value given as DIG, which is id of existing Hibu account project. But response is error.
Please help

5 answers

0 votes
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2020

Excellent. So the connection works, your credentials work, there is a project with the key DIG and it contains 15,759 issues. Everything is working as expected.

So, your problem with the initial error means whatever method you're using to authenticate with whatever tool / script you're using isn't working. Jira is just telling you "You haven't authenticated properly, so I'm not going to tell you if there is a project with the key DIG". Check how you're authenticating.

0 votes
Deleted user September 15, 2020

While hitting url in Browser got response with all cards details. [with logged in session]

URL: https://hibu-us.atlassian.net/rest/api/2/search?jql=project=DIG

{"expand":"schema,names","startAt":0,"maxResults":50,"total":15759,"issues":...................

Below URL 

https://hibu-us.atlassian.net/rest/api/2/search

Returned:

{"expand":"schema,names","startAt":0,"maxResults":50,"total":120453,"issues":.............
0 votes
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2020

Then the connection is working just fine, but, from Jira's perspective, there is no project with the key 'DIG', so it's just responding by saying "You're asking for something that I can't find" or your authentication is wrong and Jira is saying "You're not authenticated properly, so I'm not going to tell you if there is a project with that key"

Open a web browser and log into Jira at hibu-us.atlassian.net and open the project and double-check what the key is. Then, open a new tab in the same browser and try the REST query URL again (The browser will have a cached session authentication key so you won't need to authenticate). If the error still happens, you have something else very strange happening.

0 votes
Deleted user September 15, 2020

Same Error:400 Bad Request

GET: https://hibu-us.atlassian.net/rest/api/2/search?jql=project=DIG

Auth: API Key

{    "errorMessages": [        "The value 'DIG' does not exist for the field 'project'."    ],    "warningMessages": []}

0 votes
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2020

Try making the following request:

https://hibu-us.atlassian.net/rest/api/2/search?jql=project=DIG

Did it return a list of all the issues in the project with the key DIG?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events