Hello I am trying to search for a strings within my project using the REST api but can't really understand the doc... For example I want to search for issues in the project CO and the summary must contain *test ssl*. Im expecting some payload that shows last updated etc..
Hi Dennis,
welcome to Atlassian Community.
You are on the right track.
Which section of the documentation is unclear to you?
Based on this example section you will have to adjust the jql= part to query for what you are searching (for example the summary).
The response then should be similar to the one in the example section.
Cheers,
Daniel
So looking at the example :
curl \ -D- \ -u admin:admin \ -X POST \ -H "Content-Type: application/json" \ --data '{"jql":"project = QA","startAt":0,"maxResults":2,"fields":["summary","key"]}' \ "http://localhost:8080/rest/api/2/search"
But let's say I wanted to search for the string "test ssl" in the summary how would I do it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should be not more complicated like this:
POST: /rest/api/2/search
body:
{
jql: "project = TEST And summary = example",
maxResults: 1000,
startAt:1000
}
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having issues with this as well.
I'm trying to post a jql query. This works --data line is important here:
curl -D- \
-u PERSONAL_DATA_REMOVED \
-X POST \
-H "Content-Type: application/json" \
--data '{"jql":"summary~\"Testing\"","startAt":0,"maxResults":50,"fields":["id","key"]}' \
"https://localhost:8080/rest/api/2/search"
But when I replace the data with this it does not (it returns no results. I know for a fact there is an issue containing it:
--data '{"jql":"summary~\"Testing mail for user: mail@domain.com 2021-07-05\"","startAt":0,"maxResults":50,"fields":["id","key"]}' \
Could you please advise?
Thanks very much.
Jan-Willem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this looks good! I cannot spot any obvious mistake. Moreover I tested it with this Summary on my instance but it gave me back this very one issue - so I cannot figure out why it should not be working for you.
Is the user you are authentication with having permissions on this issue?
Can you open it through Jira itself (user interface) instead of API?
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.