SP.Site object
Represents a collection of sites in a Web application, including a top-level Web site and all its subsites.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
var object = new SP.Site()
Members
The Site object has the following members.
Constructor
The Site object has the following constructor.
Constructor |
Description |
---|---|
Initializes a new instance of the SP.Site object. |
Methods
The Site object has the following methods.
Method |
Description |
---|---|
Creates a temporary evaluation SPSite for this SPSite, for the purposes of determining whether an upgrade is likely to be successful. |
|
Extend the upgrade reminder date for this SPSite by the days specified at WebApplication.UpgradeReminderDelay. |
|
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. |
|
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. |
|
Specifies the collection of custom list templates for a given site. |
|
Returns the collection of site definitions that are available for creating Web sites within the site collection. |
|
Invalidates cached upgrade information about the site collection so that this information will be recomputed the next time it is needed. |
|
true if the object needs to be upgraded; otherwise, false. |
|
Returns the site at the specified URL. |
|
Returns the site with the specified GUID. |
|
Runs a health check as follows. (The health rules referenced below perform an implementation-dependent check on the health of a site collection) |
|
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. |
|
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. |
Properties
The Site object has the following properties.
Property |
Description |
---|---|
Gets or sets a value that specifies whether a designer can be used on this site collection. |
|
Gets or sets a value that specifies whether master page editing is allowed on this site collection. |
|
Gets or sets a value that specifies whether this site collection can be reverted to its base template. |
|
Whether version to version upgrade is allowed on this site. |
|
Whether upgrade evaluation site collection is allowed. |
|
Property indicating whether or not this object can be upgraded. |
|
Gets the major version of this site collection for purposes of major version-level compatibility checks. |
|
Provides event receivers for events that occur at the scope of the site collection. |
|
Gets a value that specifies the collection of the site collection features for the site collection that contains the site. |
|
Gets the GUID that identifies the site collection. |
|
Gets or sets the comment that is used in locking a site collection. |
|
Gets a value that specifies the maximum number of list items allowed per operation before throttling will occur. |
|
Gets or sets the owner of the site collection. (Read-only in sandboxed solutions.) |
|
Specifies the primary URI of this site collection, including the host name, port number, and path. |
|
Gets or sets a Boolean value that specifies whether the site collection is read-only, locked, and unavailable for write access. |
|
Gets a value that specifies the collection of recycle bin items for the site collection. |
|
Gets a value that returns the top-level site of the site collection. |
|
Gets the server-relative URL of the root Web site in the site collection. |
|
Property that indicates whether users will be able to share links to documents that can be accessed without logging in. |
|
Gets or sets a value that specifies whether the URL structure of this site collection is viewable. |
|
Gets or sets a value that specifies whether the Visual Upgrade UI of this site collection is displayed. |
|
Specifies the upgrade information of this site collection. |
|
Specifies a date, after which site collection administrators will be reminded to upgrade the site collection. |
|
Specifies whether the site is currently upgrading. |
|
Gets the full URL to the root Web site of the site collection, including host name, port number, and path. |
|
Gets a value that specifies usage information about the site, including bandwidth, storage, and the number of visits to the site collection. |
|
Gets a value that specifies the collection of user custom actions for the site collection. |
Remarks
Each Site object, or site collection, is represented within a SiteCollection object that consists of the collection of all site collections in the Web application.
The Usage property is not included in the default scalar property set for this type.
REST resource endpoint
Endpoint URI structure
http://<sitecollection>/<site>/_api/site
HTTP requests
This resource supports the following HTTP commands:
POST syntax
POST http://<sitecollection>/<site>/_api/site