Bug 1479483

Summary: no longer able to sort by descending order the api output in 58
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: APIAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED NOTABUG QA Contact: Dave Johnson <dajohnso>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8.0CC: fdewaley, jhardy, jtullo, obarenbo, smallamp
Target Milestone: GA   
Target Release: cfme-future   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-10 16:51:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Felix Dewaleyne 2017-08-08 15:47:58 UTC
Description of problem:
no longer able to sort by descending order the api output in 5.8

Version-Release number of selected component (if applicable):
5.8.1

How reproducible:
all the time

Steps to Reproduce:
1.# curl -k --user aa:bb -s -H Content-type: application/json -H Accept: application/json -X GET "https://example.cloudforms.com/api/requests?sort_by=id&sort_order=descending&limit=10&expand=resources" | python -m json.tool | egrep '\"id\":|updated_on'
2.
3.

Actual results:
the output is sorted in ascending order

Expected results:
the output is sorted as passed

Additional info:
no error raised in the logs for this
happens in 5.8.0 and 5.8.1, does not in 5.7

Comment 2 Jillian Tullo 2017-08-10 16:51:58 UTC
This is not a bug, as the method for sorting is via `sort_order=desc` or `sort_order=asc`. I have verified that sorting works via `sort_order=desc`

This is also documented in the API docs here: http://manageiq.org/docs/reference/latest/api/overview/query