SP.Site.openWeb Method (sp.js)
Returns the site at the specified URL.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.Site.openWeb()
Parameters
strUrl
Type: StringThe server-relative URL or site-relative URL of the site to return. If strUrl is empty, the top-level site is returned.
Return value
Type: SP.Web
The site at the specified server-relative URL or site-relative URL.
Remarks
It must not be null.
REST resource endpoint
Endpoint URI structure
http://<sitecollection>/<site>/_api/site/openWeb(strUrl)
HTTP requests
This resource supports the following HTTP commands:
- POST
POST syntax
POST http://<sitecollection>/<site>/_api/site/openWeb(strUrl)
Resource parameters
- strUrl