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?
It should be not more complicated like this:
POST: /rest/api/2/searchbody:
POST: /rest/api/2/search
body:
{jql: "project = TEST And summary = example",maxResults: 1000,startAt:1000}
Hi @Daniel Ebers
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.
It looks like you're new here. Sign in or register to get started.