REST API

Web

Code Example

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

// TypeScript
import { Web } from "gd-sprest";
Web()

Additional code examples can be found here.

Properties

Name Type Description
AllowRssFeeds boolean Gets a value that specifies whether the site allows RSS feeds.
AppInstanceId string The instance Id of the App Instance that this web represents.
Configuration number Gets either the identifier (ID) of the site definition configuration that was used to create the site, or the ID of the site definition configuration from which the site template used to create the site was derived.
Created string Gets a value that specifies when the site was created.
CustomMasterUrl string Gets or sets the URL for a custom master page file to apply to the website.
Description string Gets or sets the description for the site.
DocumentLibraryCalloutOfficeWebAppPreviewersDisabled boolean Determines if the Document Library Callout’s WAC previewers are enabled or not.
EnableMinimalDownload boolean Gets or sets a Boolean value that specifies whether the Web site should use Minimal Download Strategy.
ExcludeFromOfflineClient boolean  
Id string Gets a value that specifies the site identifier for the site.
Language boolean Gets a value that specifies the LCID for the language that is used on the site.
LastItemModifiedDate string Gets a value that specifies when an item was last modified in the site.
MasterUrl string Gets or sets the URL of the master page that is used for the website.
MembersCanShare boolean  
NoCrawl boolean  
NotificationsInOneDriveForBusinessEnabled boolean  
NotificationsInSharePointEnabled boolean  
OverwriteTranslationsOnChange boolean  
PreviewFeaturesEnabled boolean  
QuickLaunchEnabled boolean Gets or sets a value that specifies whether the Quick Launch area is enabled on the site.
RecycleBinEnabled boolean Gets or sets a value that determines whether the recycle bin is enabled for the website.
RequestAccessEmail string  
SaveSiteAsTemplateEnabled boolean Gets or sets a Boolean value that specifies whether the Web site can be saved as a site template.
ServerRelativePath ResourcePath  
ServerRelativeUrl string Gets or sets the server-relative URL for the Web site.
SiteLogoDescription string  
SiteLogoUrl string  
SyndicationEnabled boolean Gets or sets a value that specifies whether the RSS feeds are enabled on the site.
TenantTagPolicyEnabled boolean  
ThemeData string  
ThemedCssFolderUrl _string  
ThirdPartyMdmEnabled _boolean  
Title string Gets or sets the title for the Web site.
TreeViewEnabled boolean Gets or sets value that specifies whether the tree view is enabled on the site.
UIVersion number Gets or sets the user export interface (UI) version of the Web site.
UIVersionConfigurationEnabled boolean Gets or sets a value that specifies whether the settings UI for visual upgrade is shown or hidden.
Url string Gets the absolute URL for the website.
WebTemplate string Gets the name of the site definition or site template that was used to create the site.

Queryable Properties

Method Return Type Description    
AllowCreateDeclarativeWorkflowForCurrentUser() boolean Specifies whether the current user can create declarative workflows. If not disabled on the Web application, the value is the same as the AllowCreateDeclarativeWorkflow property of the site collection. (Default: true)  
AllowDesignerForCurrentUser() boolean Gets a value that specifies whether the current user is allowed to use a designer application to customize this site.    
AllowMasterPageEditingForCurrentUser() boolean Gets a value that specifies whether the current user is allowed to edit the master page.    
AllProperties() PropertyValues Property Bag    
AllowRevertFromTemplateForCurrentUser() boolean Gets a value that specifies whether the current user is allowed to revert the site to a default site template.    
AllowSaveDeclarativeWorkflowAsTemplateForCurrentUser() boolean Specifies whether the current user can save declarative workflows as a template. If not disabled on the Web application, the value is the same as the AllowSaveDeclarativeWorkflowAsTemplate property of the site collection. (Default value: true)  
AllowSavePublishDeclarativeWorkflowForCurrentUser() boolean Specifies whether the current user can save or publish declarative workflows. If not disabled on the Web application, the value is the same as the AllowSavePublishDeclarativeWorkflowAsTemplate property of the site collection. When enabled, can only be set by a site collection administrator. (Default value: true)
AllProperties()   Gets a collection of metadata for the Web site.    
AppTiles() AppTiles      
AssociatedMemberGroup() Group Gets or sets the group of users who have been given contribute permissions to the Web site.    
AssociatedOwnerGroup() Group Gets or sets the associated owner group of the Web site.    
AssociatedVisitorGroup() Group Gets or sets the associated visitor group of the Web site.    
Author() User      
AvailableContentTypes() ContentTypes Gets the collection of all content types that apply to the current scope, including those of the current Web site, as well as any parent Web sites.  
AvailableFields() Fields Gets a value that specifies the collection of all fields available for the current scope, including those of the current site, as well as any parent sites.    
ClientWebParts()        
ContentTypes() ContentTypes Gets the content types that are associated with the web.    
ContentTypes(id: string) ContentType Gets the content type that are associated with the web.    
CurrentUser() User Gets the current user of the site.    
DataLeakagePreventionStatusInfo()        
DescriptionResource() ResourcePath      
DesignerDownloadUrlForCurrentUser()**_ Gets the URL where the current user can download SharePoint Designer.      
EffectiveBasePermissions() string Represents the intersection of permissions of the app principal and the user principal. In the app-only case, this property returns only the permissions of the app principal. To check only user permissions (ignoring app permissions), use the GetUserEffectivePermissions method.    
EventReceivers() EventReceivers Gets the event receivers associated with the web.    
EventReceivers(id: string) EventReceiver Gets the event receiver associated with the web.    
Features() Gets a value that specifies the collection of features that are currently activated in the site.      
Fields() Fields Gets the fields in the web.    
Fields(internalNameOrTitle: string) Field Gets the field in the web.    
Folders() Folders Gets the folders contained in the root folder.    
Folders(url: string) | Folder Gets the folder contained in the root folder.      
Lists() Lists Gets the lists in the Web.    
Lists(name: string) List Gets the list in the Web.    
ListTemplates()   Gets the list definitions and list templates available for creating lists on the site.    
ListTemplates(name: string) Gets the list definition or list template available for creating lists on the site.      
Navigation() Navigation Gets a value that specifies the navigation structure on the site, including the Quick Launch area and the top navigation bar.    
ParentWeb() Web Gets the parent website of the specified website.    
PushNotificationSubscribers()   Gets the collection of push notification subscribers over the site.    
RecycleBin()   Specifies the collection of recycle bin items of the recycle bin of the site.    
RegionalSettings()   Gets the regional settings that are currently implemented on the website.    
RoleDefinitions() RoleDefinitions Gets the role definitions for the web.    
RoleDefinitions(name: string) RoleDefinition Gets the role definitions for the web.    
RootFolder() Folder Gets the root folder in the web.    
RootFolder(url: string) | File Gets the file in the web’s root folder.      
ShowUrlStructureForCurrentUser() Gets a value that specifies whether the current user is able to view the file system structure of this site.      
SiteGroups() SiteGroups Gets the site groups for the web.    
SiteGroups(name: string) Group Gets the site groups for the web.    
SiteUserInfoList()   Gets the UserInfo list of the site collection that contains the Web site.    
SiteUsers() Users Gets the collection of all users that belong to the site collection.    
SiteUsers(id) User Gets the collection of all users that belong to the site collection.    
SupportedUILanguageIds() number Specifies the language code identifiers (LCIDs) of the languages that are enabled for the site.    
TenantAppCatalog() ITenantAppCatalog      
ThemeInfo() The theming information for this site. This includes information like colors, fonts, border radii sizes etc.      
TitleResource() ResourcePath      
UserCustomActions() UserCustomActions Gets the user custom actions for the web.    
UserCustomActions(id: string) UserCustomAction Gets the user custom action for the web.    
WebInfos() WebInfos Represents key properties of the subsites of a site.    
Webs() Webs Gets a Web site collection object that represents all Web sites immediately beneath the Web site, excluding children of those Web sites.    
WorkflowAssociations() Gets a value that specifies the collection of all workflow associations for the site.      
WorkflowTemplates() Gets a value that specifies the collection of workflow templates associated with the site.      

Methods

Name Description  
applyTheme(colorpaletteurl, fontschemeurl, backgroundimageurl, sharegenerated) Applies the theme specified by the contents of each of the files specified in the arguments to the site.  
applyWebTemplate(name) Applies the specified site definition or site template to the Web site that has no template applied to it.  
breakRoleInheritance(copyRoleAssignments, clearSubScopes) Creates unique role assignments for the securable object.  
delete() Deletes the web.  
doesPushNotificationSubscriberExist(id) Checks whether the push notification subscriber exist for the current user with the given device application instance ID.  
doesUserHavePermissions(high, low) Returns whether the current user has the given set of permissions.  
ensureUser(loginName: string) | User Checks whether the specified login name belongs to a valid user in the site. If the user doesn’t exist, it will add the user to the site.  
executeRemoteLOB(inputStream) Sends data to an OData service.  
getAppBdcCatalog() The app BDC catalog.  
getAppBdcCatalogForAppInstance(id) The app BDC catalog for the specified app instance.  
getAppInstanceById(id) Retrieves an AppInstance installed on this Site.  
getAppInstancesByProductId(id) Retrieves all AppInstances installed on this site that are instances of the specified App.  
getAvailableWebTemplates(lcid, doIncludeCrossLanguage) Returns a collection of site templates available for the site.  
getCatalog(galleryType) Returns the list gallery on the site. (Gallery Types: WebTemplateCatalog - 111, WebPartCatalog - 113, ListTemplateCatalog - 114, MasterPageCatalog - 116, SolutionCatalog - 121, ThemeCatalog - 123, DesignCatalog - 124, AppDataCatalog - 125)  
getChanges(query) Returns the collection of all changes from the change log that have occurred within the scope of the site, based on the specified query.  
getContextWebInformation() The context information for the site. Static method.  
getCustomListTemplates() The custom list templates for the site.  
getDocumentLibraries(url) The document libraries on a site. Static method. (SharePoint Online only)  
getEntity(namespace, name) The specified external content type in a line-of-business (LOB) system application.  
getFileByServerRelativeUrl(url) File Returns the file object located at the specified server-relative URL.
getFolderByServerRelativeUrl(url) Folder Returns the folder object located at the specified server-relative URL.
getList(url) List The list at the specified site-relative URL. (SharePoint Online only)
getPushNotificationSubscriber(id) The push notification subscriber over the site for the specified device application instance ID.  
getPushNotificationSubscribersByArgs(args) Queries for the push notification subscribers over the site for the specified value of custom arguments. Null or empty custom arguments will return subscribers without any filtering.  
getPushNotificationSubscribersByUser(loginName) Queries for the push notification subscribers over the site for the specified user.  
getSubwebsFilteredForCurrentUser(nWebTemplateFilter, nConfigurationFilter) WebInfo Returns the collection of child sites of the current site based on the specified query. (SharePoint Online only)
getUserById(id) User Returns the user corresponding to the specified member identifier for the current site.
getUserEffectivePermissions(loginName) The effective permissions that the specified user has within the current application scope.  
getWebUrlFromPageUrl(url) The site URL from a page URL. Static method.  
loadAndInstallApp(appPackageStream) Uploads and installs an app package to this site.  
loadAndInstallAppInSpecifiedLocale(appPackageStream, installationLocaleLCID) Uploads and installs an App package on the site in a specified locale.  
loadApp(appPackageStream, installationLocaleLCID) Uploads an App package and creates an instance from it.  
mapToIcon(filename, progid, size) Returns the name of the image file for the icon that is used to represent the specified file.  
processExternalNotification(stream) Processes a notification from an external system.  
registerPushNotificationSubscriber(deviceAppInstanceId, serviceToken) Registers the subscriber for push notifications over the site. If the registration already exists, the service token is updated with the new value.
resetRoleInheritance() Resets the role inheritance for the securable object and inherits role assignments from the parent securable object.  
unregisterPushNotificationSubscriber(id) Unregisters the subscriber for push notifications from the site.  
update(data) Updates it’s properties.  

Web Creation Information

Name Type Description  
Description string The description of the new site.  
Language number The locale ID that specifies the language of the new site.  
Title string A value that specifies the title of the new site.  
Url string The URL leaf name of the new site. The URL must not contain the following: (_Characters: ~, “, #, %, &, *, :, <, >, ?, \, {, , or }, String: \x7f, Consecutive Characters: . or / characters, Starting Characters: ., /, or _ characters, Ending Characters: . or / characters)_
UseSamePermissionsAsParentSite boolean A value that specifies whether the new site will inherit permissions from its parent site.  
WebTemplate string A value that specifies the name of the site template to be used for creating the new site. (Use the GetAvailableWebTemplates method to get the names of available web templates on the site.)  

Web Information

Name Type
Configuration number
Created string
Description string
Id string
Language number
LastItemModifiedDate string
LastItemUserModifiedDate string
ServerRelativeUrl string
Title string
WebTemplate string
WebTemplateId number