how to pass search parameters to a POST /rest/api/2/search call?

The docs on /search call here:

https://docs.atlassian.com/software/jira/docs/api/REST/1000.1568.0/#api/2/search-searchUsingSearchRequest

define a schema as:

{ 
"
id": "https://docs.atlassian.com/jira/REST/schema/search-request#",
"
title": "Search Request",
"
type": "object",
"
properties": {
"jql": {
"type": "string" },
"startAt": {
"type": "integer"
},
"maxResults": {
"type": "integer"
},
"fields": {
"type": "array",
"items": {
"type": "string"
}
},
"validateQuery": { "type": "string" },
"properties": {
"type": "array",
"items": {
"type": "string"
}
},
"fieldsByKeys": {
"type": "boolean"
}
}
,
"
additionalProperties": false,
"
required": [
"fieldsByKeys"
]
}

 

On a GET request I would the the issuetype = Epic with something like:

/rest/api/2/search?jql=project%3D%22Project%20Name%22%20AND%20issuetype%3D%22Epic%22

 

How would I get the same result for the POST request?

 

 

 

1 answer

1 accepted

This widget could not be displayed.
Timothy Chin Community Champion Dec 07, 2017

The documentation provides an example JSON body for the POST request:

{ "jql": "project = HSP", "startAt": 0, "maxResults": 15, "fields": [ "summary", "status", "assignee" ], "fieldsByKeys": false }

The value for JQL should be the actual JQL query (escaped and all).

@Timothy Chin, thank you for your reply. I had, in fact, already found that out.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

573 views 25 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you