Forums

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

How to get jira project tickets using order by clause (Rest API)

Venusaikumar Chelluboina
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!
October 31, 2022

I am trying to get the jira project tickets using Rest API POST method search. I am unable to include the order by clause in JQL json request body.

Request body:
{
jql: "project = PISS",
startAt: 0,
maxResults: 15,
orderby:{created:"ASC"},
fields: {
"summary",
"status",
"assignee"
}
}

 

Response:

The external system did not understand the request

error-result-guidance

The request was missing required details or was improperly formatted HTTP/1.1 400 Bad Request

1 answer

0 votes
Sunny Ape
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 3, 2022

Hello @Venusaikumar Chelluboina 

The sorting is done by the JQL, so the ORDER BY goes within the JQL statement, not as a request parameter:

{
jql: "project = PISS ORDER BY created ASC",
startAt: 0,
maxResults: 15,
fields: {
"summary",
"status",
"assignee"
}
}

 

Suggest an answer

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

Atlassian Community Events