Working with folders by using REST
You can retrieve a folder inside a document library when you know its URL
method: POST
body: { '__metadata': { 'type': 'SP.Folder' }, 'ServerRelativeUrl': '/document library relative url/folder name'}
Headers:
Authorization: "Bearer " + accessToken
X-RequestDigest: form digest value
accept: "application/json;odata=verbose"
content-type: "application/json;odata=verbose"
content-length:length of post body
You can retrieve a folder inside a document library when you know its URL
The following example shows how to create a folder.
url: http://site url/_api/web/foldersmethod: POST
body: { '__metadata': { 'type': 'SP.Folder' }, 'ServerRelativeUrl': '/document library relative url/folder name'}
Headers:
Authorization: "Bearer " + accessToken
X-RequestDigest: form digest value
accept: "application/json;odata=verbose"
content-type: "application/json;odata=verbose"
content-length:length of post body
For Nintex - Call HTTP web service + REST API
Address: site_URL_api/web/getfolderserverrelativeurl('Share%Document')/folders/add(NewFolder')
Request Type : HTTP Post
Request Headers: "accept: "application/json;odata=verbose"
content-type: "application/json;odata=verbose""
content-type: "application/json;odata=verbose""
What do I need If I want to show all files within a special folder in a library? Can you please help me out?
ReplyDelete