I am using below api to get files in descending order of modified date, but it not working.

url = _spPageContextInfo.webServerRelativeUrl + "/_api/Web/GetFolderByServerRelativeUrl('EmployeeDocumentList/703079322')?$expand=Files/ListItemAllFields&$orderby=TimeLastModified desc";

Is there anything that I am missing over here?

  • do you mean ascending order or descending ? If you want ascending order, just remove the desc at the end – Gautam Sheth Dec 8 '17 at 7:50
  • I have updated the question, I need it in descending order – KumarV Dec 8 '17 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.