Project

General

Profile

Actions

Bug #6966

closed

API: sorting should contain a default direction

Added by Walden Raines almost 10 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Difficulty:
medium
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

If you do not specify a direction when using the order parameter you will receive the following error message:

{"displayMessage":"Cannot sort by ''","errors":["Cannot sort by ''"]}

We should default to DESC if no direction is supplied.

Steps to Reproduce

1. Hit an index URL with ordering such as /katello/api/v2/products?order=name&organization_id=1
2. Notice above error message

Actions

Also available in: Atom PDF