SP.FolderCollection.add Method (sp.js)

Adds the folder that is located at the specified URL to the collection.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.FolderCollection.add()

Parameters

  • strUrl
    Type: String

    A string that specifies the URL of the folder, either a fully-qualified URL, or a server-relative or Web-relative URL.

  • url

Return value

Type: SP.Folder

REST resource endpoint

See FolderCollection resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/folders/add(url)

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/folders/add(url)

Resource parameters

  • url