Code Example

// JavaScript
var $REST = require("gd-sprest");

// TypeScript
import { Site } from "gd-sprest";

Code Examples

Get Site URL by ID

Site Exists REST API


Name Type Description
AllowCreationDeclarativeWorkflow boolean A value that specifies whether creation of declarative workflows can be used on this site collection.
AllowDesigner boolean Gets or sets a value that specifies whether a designer can be used on this site collection.
AllowMasterPageEditing boolean Gets or sets a value that specifies whether master page editing is allowed on this site collection.
AllowRevertFromTemplate boolean Gets or sets a value that specifies whether this site collection can be reverted to its base template.
AllowSaveDeclarativeWorkflowAsTemplate boolean  
AllowSavePublishDeclarativeWorkflow boolean  
AllowSelfServiceUpgrade boolean Whether version to version upgrade is allowed on this site.
AllowSelfServiceUpgradeEvaluation boolean Whether upgrade evaluation site collection is allowed.
AuditLogTrimmingRetention number  
CanUpgrade boolean Property indicating whether or not this object can be upgraded.
Classification string  
CompatibilityLevel string Gets the major version of this site collection for purposes of major version-level compatibility checks.
CurrentChangeToken string  
DisableAppViews boolean  
DisableCompanyWideSharingLinks boolean  
DisableFlows boolean  
ExternalSharingTipsEnabled boolean  
GroupId string  
Id string Gets the GUID that identifies the site collection.
LockIssue string Gets or sets the comment that is used in locking a site collection.
MaxItemsPerThrottledOperation number Gets a value that specifies the maximum number of list items allowed per operation before throttling will occur.
NeedsB2BUpgrade boolean  
PrimaryUri string Specifies the primary URI of this site collection, including the host name, port number, and path.
ReadOnly boolean Gets or sets a Boolean value that specifies whether the site collection is read-only, locked, and unavailable for write access.
RequiredDesignerVersion string  
SandboxedCodeActivationCapability number  
ServerRelativePath Types.IResourcePath  
ServerRelativeUrl string Gets the server-relative URL of the root Web site in the site collection.
ShareByEmailEnabled boolean  
ShowPeoplePickerSuggestionsForGuestUsers boolean  
ShareByLinkEnabled boolean Property that indicates whether users will be able to share links to documents that can be accessed without logging in.
ShowUrlStructure boolean Gets or sets a value that specifies whether the URL structure of this site collection is viewable.
StatusBarLink string  
StatusBarText string  
TrimAuditLog boolean  
UIVersionConfigurationEnabled boolean Gets or sets a value that specifies whether the Visual Upgrade UI of this site collection is displayed.
UpgradeInfo UpgradeInfo Specifies the upgrade information of this site collection.
UpgradeReminderDate string Specifies a date, after which site collection administrators will be reminded to upgrade the site collection.
UpgradeScheduled boolean  
UpgradeScheduledDate string  
Upgrading boolean Specifies whether the site is currently upgrading.
Url string Gets the full URL to the root Web site of the site collection, including host name, port number, and path.
Usage UsageInfo Gets a value that specifies usage information about the site, including bandwidth, storage, and the number of visits to the site collection.

Queryable Properties

Method Type Description
Audit() Audit  
EventReceivers() EventReceivers Gets the event receivers associated with the site.
EventReceivers(id: string) EventReceiver Gets the event receiver associated with the site.
Features() Features Gets a value that specifies the collection of the site collection features for the site collection that contains the site.
Owner() User Gets or sets the owner of the site collection. (Read-only in sandboxed solutions)
RecycleBin() _Results_ Gets a value that specifies the collection of recycle bin items for the site collection.
RootWeb() Web Gets a value that returns the top-level site of the site collection.
UserCustomActions() UserCustomActions Gets the user custom action for the list.
UserCustomActions(id: string) UserCustomAction Gets the user custom action(s) for the list.


Name Description
createPreviewSPSite(upgrade, sendEmail) 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(typeCatalog) 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(query) 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(web) Specifies the collection of custom list templates for a given site.
getWebTemplates(LCID, overrideCompatLevel) Returns the collection of site definitions that are available for creating Web sites within the site collection.
invalidate() Invalidates cached upgrade information about the site collection so that this information will be recomputed the next time it is needed.
needsUpgradeByType(versionUpgrade, recursive) Returns true if the object needs to be upgraded; otherwise, false.
openWeb(strUrl) Returns the site at the specified URL.
openWebById(gWebId) Returns the site with the specified GUID.
runHealthCheck(ruleId, bRepair, bRunAlways) Runs a health check as follows. The health rules referenced perform an implementation-dependent check on the health of a site collection.
runUpgradeSiteSession(versionUpgrade, queueOnly, sendEmail) 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.
update(data) Updates it’s properties.
updateClientObjectModelUseRemoteAPIsPermissionSetting(requireUseRemoteAPIs) 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.