Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,962
Community Members
 
Community Events
168
Community Groups

Rest api not connecting


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

1 comment

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?

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": []}

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.

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":.............

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.

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events