SP.Site.getWebTemplates Method (sp.js)
Returns the collection of site definitions that are available for creating Web sites within the site collection.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.Site.getWebTemplates()
Parameters
LCID
A 32-bit unsigned integer that specifies the language of the site definitions that are returned from the site collection.overrideCompatLevel
Specifies the compatibility level of the site to return from the site collection. If this value is 0, the compatibility level of the site is used.
Return value
SP.WebTemplateCollection
An SPWebTemplateCollection object that represents the site definitions.
Remarks
The method provided here mainly for the case when creating new spsite in compatibility mode, e.g. 14 in a 15 farm, where Admin Site's compatibility level is by default used.
REST resource endpoint
Endpoint URI structure
http://<sitecollection>/<site>/_api/site/getWebTemplates(LCID,overrideCompatLevel)
HTTP requests
This resource supports the following HTTP commands:
- POST
POST syntax
POST http://<sitecollection>/<site>/_api/site/getWebTemplates(LCID,overrideCompatLevel)
Resource parameters
LCID
overrideCompatLevel