SP.Site Methods (sp.js)

The following table lists the methods of the SP.Site object.

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

Methods

Method

Description

createPreviewSPSite

Creates a temporary evaluation SPSite for this SPSite, for the purposes of determining whether an upgrade is likely to be successful.

extendUpgradeReminderDate

Extend the upgrade reminder date for this SPSite by the days specified at WebApplication.UpgradeReminderDelay.

getCatalog

Specifies the list template gallery, site template gallery, Web Part gallery, master page gallery, or other galleries from the site collection, including custom galleries that are defined by users.

getChanges

Specifies the collection of the site collection changes from the change log that have occurred within the scope of the site collection, based on the specified query.

getCustomListTemplates

Specifies the collection of custom list templates for a given site.

getWebTemplates

Returns the collection of site definitions that are available for creating Web sites within the site collection.

initPropertiesFromJson

invalidate

Invalidates cached upgrade information about the site collection so that this information will be recomputed the next time it is needed.

needsUpgradeByType

true if the object needs to be upgraded; otherwise, false.

openWeb

Returns the site at the specified URL.

openWebById

Returns the site with the specified GUID.

runHealthCheck

Runs a health check as follows. (The health rules referenced below perform an implementation-dependent check on the health of a site collection)

runUpgradeSiteSession

Either runs a site collection upgrade, or schedules it to be run in the future, depending on available system resources and the value of the queueOnly parameter.The user executing this method MUST be a farm administrator or a site collection administrator.

updateClientObjectModelUseRemoteAPIsPermissionSetting

Sets whether the client-side object model (CSOM) requests that are made in the context of any site inside the site collection require UseRemoteAPIs permission.