You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I am working on text search(against all fields) with Jira API. One word works well. For example:
http://localhost:8888/rest/api/2/search?jql=text~Clinic
However how to query with multiple words, like
http://localhost:8888/rest/api/2/search?jql=text~Clinic Trial
I am trying to use AND
http://localhost:8888/rest/api/2/search?jql=text~"Clinic AND Trial"
Neither works.
Any suggestion?
Thanks!
Hey Ritong,
How about the below approach?
text ~ ‘clinic’ and text ~ ‘trial’
CCM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No it does not work. Here is my command
curl -D- -u username:password -X GET -H "Content-Type: application/json" http://localhost:8888/rest/api/2/search?jql=text~'Clinic' and text~'Trial'
It executed the first part but threw error in the second part
curl: (6) Could not resolve host: and
curl: (6) Could not resolve host: text~'Trial'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ritong
curl interprets parts of your query
Can you try
curl -D- -u username:password -X GET -H "Content-Type: application/json" "http://localhost:8888/rest/api/2/search?jql=text~'Clinic' and text~'Trial'"
so double quotes around the whole url to ensure that curl takes that as one argument
Cheers
Kurt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried a similar thing but the API did not like it. The Java code throw similar 400 error as well.
curl -D- -u username:password -X GET -H "Content-Type: application/json" "http://localhost:8888/rest/api/2/search?jql=text~'Clinic' and text~'Trial'"
HTTP/1.1 400
Transfer-Encoding: chunked
Date: Mon, 06 May 2019 02:08:59 GMT
Connection: close
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How about the below:
http://localhost:8888/rest/api/2/search?jql=text~Clinic%20and%20text~Trial
That doesn’t error on my environment at least.
CCM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.