How do I tell the API what I would like to sort by? Also which direction to sort by?
You provide a columns
parameter, which has a name
for all the columns you want to order by
e.g.
?columns[][name]=layout
You then provide an order
parameter, which contains a set of sort orders, referencing the keys in the columns parameter - e.g.
&order[][column]=1&order[][dir]=desc
Dan,
Thank you for the reply. I think I can figure that out.
Can this information be added to the documentation? Or is it already, and I just don’t know where to look?
I’ve added it to the bug which talks about these “grid” parameters being added to the docs.
Media Type seems to be different somehow. I get a server error with it. I see that it is possible in the CMS. Any insight on sorting by media type?
Edit:
Found that Media Type should be “mediatype”, and Name should be “Name”