I am trying to fetch issues of a specific project using curl and JQL.
I have tried the same JQL in JIRA filter and also in the browser
XXX.atlassian.net/rest/api/2/search?jql=project%20=%20%27IT%20Access%20Management%27%20AND%20status%20=%20%27In%20Progress%27
But when I try this with curl it shows error:
{"errorMessages":["The value 'IT Access Management' does not exist for the field 'project'."],"warningMessages":[]}%
Here is the sample curl request
> encoded_jql=$(printf '%s' 'status = "In Progress" AND project = "IT Access Management"' | jq -s -R -r @URI)
>
curl -u "PUBLIC_KEY:PRIVATE_KEY" -X GET "https://XXXXX.atlassian.net/rest/api/3/search?jql=$encoded_jql"
Just to clarify, when I remove project filter it works fine. And with project filter it works well with JIRA filter and browser URL query.
Community moderators have prevented the ability to post new answers.
Hi @kapild
The call seems ok to the API via the browser.
In your curl the quotes seem to be wrong.
String needs to be quested with "string" and not 'string'
Hi
This KB article might help you.
ira-api-with-curl-throws-error-errormessages-the-value-xxx-does-not-exist-for-the-field-project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kapild
Are you sure the user you are using have permission on the "IT Access Management" project ?
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.