I've been using a CAML Query for getting all files in a document library in SharePoint 2013.
I used PnP with PowerShell for this purpose, but as I would like to get all files on Linux. I think it's feasable with curl with REST API but I cannot find the correct URL syntax. I would like to get at least all documents server relative urls and names (FileDirRef, FileRef, etc.).
I used this query taken from sharepoint-rest-api-recursively-fetch-all-folders-in-a-document-library, but I don't think it returns what I expect or I might not know how to parse it right.
$ curl -n "https://<site url>/_api/web/lists/GetByTitle('document library name')/items?$filter=FSObjType%20eq%201" -H "Accept: application/json;odata=verbose"
-n takes credentials from .netrc file.
I would like to send <View Scope='RecursiveAll'><Query><Where><IsNotNull><FieldRef Name='File_x0020_Type' /></IsNotNull></Where></Query></View> (which returns the right answer with Get-PnPListItem -List <library name> -Query "$camlQuery") with curl if possible.
queryinhttp://<sitecollection>/<site>/_api/web/lists(listid)/getItems(query)? What is@v1used twice? – jgran Feb 18 '22 at 13:21http://[site]/_api/Web/lists/getByTitle('[List]')/GetItems(<Query><Where><Eq><FieldRef%20Name='Sector'%20/><Value%20Type='TaxonomyFieldType'>Value</Value></Eq></Where></Query></View>"}with POST, butX-RequestDigestseems required. – jgran Feb 18 '22 at 15:02