I m trying to make a REST API call to SharePoint Online from a Java application where i want to get all the files in the Sharepoint site along with its custom metadata.
Now if i use the following query it gets me all the files based on the filter specified but it doesn't fetch all the items fields i.e. file metadata :
https://example.com/sites/sitename/_api/Web/GetFolderByServerRelativeUrl('/sites/sitename'foldername')/Files?$expand=Files&$filter=TimeLastModified gt datetime'2016-8-20T09:59:32'
Now if i use this query below it get me all the metadata of the files but the filter doesnt work and it returns all the files in the folder instead of the fetching the ones based on the filter=TimeLastModified.
https://example.com/sites/sitename/_api/Web/GetFolderByServerRelativeUrl('/sites/foldername')?$expand=Files$expand=Folders/ListItemAllFields,Files/ListItemAllFields&$filter=TimeLastModified gt datetime'2017-5-20T09:59:32'
Can someone please guide me how can i fetch the files based on the filter=TimeLastModified which also retrieves all "ListItemAllFields" so that it gets all the file's metadata as well at the same time ?