SP.Site.openWebById Method (sp.js)

Returns the site with the specified GUID.

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



  • gWebId
    Type: SP.Guid

    A GUID that specifies which site to return.

Return value

Type: SP.Web

REST resource endpoint

Endpoint URI structure


HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/site/openWebById(gWebId)

Resource parameters

  • gWebId