I am trying to retrieve folders in a sharepoint list where folder name starts with
https://**.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Salesforce')/Folders?$filter=Name startswith ‘abc’
error
{ "error": { "code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException", "message": { "lang": "en-US", "value": "The expression \"Name startswith ‘abc’\" is not valid." } } }
https://**.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Salesforce')/Folders?$select=Name$filter=contains(Name,'abc')
{ "error": { "code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException", "message": { "lang": "en-US", "value": "The expression \"Name$filter=contains(Name,'abc')\" is not valid." } } }
Please guide.
Sorry had to add &
https://****.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Salesforce')/Folders?$select=Name&$filter=((startswith(name,'test')))
now it is returning all folders. not the one that are started with test