Forums

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

hello, please i have this error in JQL with rest api:

desombre eboko
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!
November 12, 2021
that is my error message
{
    "errorMessages": [
        "Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'Rest'. (line 1, character 34)"
    ],
    "errors": {}
}
that is my JSON POST: 
{
    "jql": "project~Teste AND summary~second Rest Issue",
    "startAt": 0,
    "maxResults": 15,
    "fields": [
        "summary",
        "status",
        "assignee"
    ]
}
thank you

3 answers

1 vote
Nic Brough -Adaptavist-
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.
November 12, 2021

There's three things wrong with your JQL:

"jql": "project~Teste AND summary~second Rest Issue",

  • You need spaces to delimit fields and operators in JQL 
  • You need quotes around strings if they have spaces in them
  • The project "field" is a select field, not text, you can't use the fuzzy operator search (~)

Try:

"jql": "project = Teste AND summary ~ 'second Rest Issue' ",

0 votes
John Funk
Community Champion
July 9, 2022

Hi @desombre eboko  - Did you ever get this to work?

0 votes
Alex Medved _ConfiForms_
Community Champion
November 12, 2021

Hi

I see 2 errors here - project cannot use ~ and you need to wrap the parameter for summary like this

project=Test AND summary~"second Rest Issue"

 

https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ 

Alex

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events