SP.Web.applyWebTemplate Method (sp.js)
Applies the specified site definition or site template to the Web site that has no template applied to it.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.Web.applyWebTemplate(webTemplate)
Parameters
webTemplate
Type: StringThe name of the site definition or the file name of the site template.
Return value
Undefined
Remarks
This method applies the specified site definition or site template to the Web site.
REST resource endpoint
See Web resource for more information.
Endpoint URI structure
http://<sitecollection>/<site>/_api/web/applyWebTemplate(webTemplate)
HTTP requests
This resource supports the following HTTP commands:
- POST
POST syntax
POST http://<sitecollection>/<site>/_api/web/applyWebTemplate(webTemplate)
Resource parameters
- webTemplate