Creating folder in SharePoint Library using Rest API
-
08-02-2021 - |
Domanda
I want to create a folder inside "Communications" document library in below site using rest api.
https://contoso.sharepoint.com/sites/SP
Can you please assist on how to do that?
Soluzione
You need to use the Folders
endpoint something like below:
_spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Folders/add('Communications/NewFolderName')"
Note: You need to pass the ServerRelativeUrl
inside the add
method.
Official documentation: Working with folders by using REST.
Similar question: Creating Folder using REST and JavaScript
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange