Skip to content

Commit 900a73a

Browse files
Update REST-getbyid-method.md
Added a new example to set the ParentHubSiteId, setting the parent hub assocation. Btw, also created a blog about this approach: https://www.expiscornovus.com/2023/03/16/parent-hub-association/
1 parent cef7108 commit 900a73a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/features/hub-site/REST-getbyid-method.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,29 @@ https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-49
110110
}
111111
```
112112

113+
### Associate a hub with another hub (parent hub association)
114+
115+
#### Sample request
116+
117+
```HTTP
118+
POST
119+
https://contoso.sharepoint.com/_api/HubSites/GetById('f93eff08-5806-499c-92db-38800eefbe44')
120+
```
121+
122+
```JSON
123+
{
124+
"__metadata": { "type": "SP.HubSite" },
125+
"Title":"Marketing hub site",
126+
"LogoUrl": "https://contoso.sharepoint.com/sites/marketing/SiteAssets/__hubLogo____hubLogo__.png",
127+
"Description": "Hub site for marketing coordination",
128+
"ParentHubSiteId":"269da5d4-6a9e-45a5-9502-a74d14977293"
129+
}
130+
```
131+
132+
#### Sample response
133+
134+
**Status code:** 204
135+
113136
## See also
114137

115138
- [Hub site REST API](hub-site-rest-api.md)

0 commit comments

Comments
 (0)