Hub site REST API

You can use the SharePoint REST interface to register sites as hub sites, associate existing sites with hub sites, and obtain or update information about hub sites.

The SharePoint Online (and SharePoint 2016 and later on-premises) REST service supports combining multiple requests into a single call to the service by using the OData $batch query option.

For details and links to code samples, see Make batch requests with the REST APIs.

Prerequisites

Before you get started, make sure that you're familiar with the following:

REST commands

The following REST commands are available for working with hub sites:

Scenarios

Some of the following scenario examples are not intuitive from the method name. See each cmdlet article for more details.

Update a hub site

Call the GetById method to update a hub site.

Disassociate a site from its hub site

To remove, or disassociate a site from a hub site, call JoinHubSite with the value "00000000-0000-0000-0000-000000000000".

See also