4

I have an ajax request to retrieve the items from a list:

/_api/lists/getbytitle('MyList')/Items?$top=100&$orderby=Created&$select=......

Now this returns me 100 of items, but they're ordered only after they're returned.

Is it possible to order all the items in the list first and then return 100 newest items?

For example:

My list has 105 items.

My current request returns items with IDs 1-100 ordered by Created date.

I need my request to return the items with IDs 6-105 (100 newest items).

1 Answer 1

13

What about:

/_api/Web/Lists/GetByTitle('MyList')/Items?$top=100&$orderby=Created desc

It worked for me.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.