Skip to content

Commit effe3b1

Browse files
Merge pull request SharePoint#8824 from expiscornovus/patch-1
Update REST-getbyid-method.md
2 parents cef7108 + 40ee7fc commit effe3b1

File tree

1 file changed

+38
-20
lines changed

1 file changed

+38
-20
lines changed

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

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: GetById REST method
33
description: Gets or updates information about a hub site.
4-
ms.date: 06/28/2022
4+
ms.date: 03/17/2023
55
ms.localizationpriority: medium
66
---
77

@@ -30,8 +30,6 @@ POST /_api/HubSites/GetById
3030
|Content-Type|application/json;odata=verbose;charset=utf-8|
3131
|x-requestdigest|The appropriate digest for current site.|
3232

33-
<br/>
34-
3533
When using POST to update a hub site with new information, use the following additional header values:
3634

3735
| Header | Value |
@@ -63,8 +61,7 @@ For GET, no request body is needed. When using POST to update a hub site with ne
6361
#### Sample request
6462

6563
```HTTP
66-
GET
67-
https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-499c-92db-38800eefbe44'
64+
GET https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-499c-92db-38800eefbe44'
6865
```
6966

7067
#### Sample response
@@ -73,19 +70,19 @@ https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-49
7370

7471
```JSON
7572
{
76-
"@odata.context": "https://contoso.sharepoint.com/_api/$metadata#hubsites/$entity",
77-
"@odata.type": "#SP.HubSite",
78-
"@odata.id": "https://contoso.sharepoint.com/_api/HubSites/GetById",
79-
"@odata.etag": "\"3\"",
80-
"@odata.editLink": "HubSites/GetById",
81-
"Description": null,
82-
"ID": "f93eff08-5806-499c-92db-38800eefbe44",
83-
"LogoUrl": "https://contoso.sharepoint.com/sites/marketing/SiteAssets/__hubLogo____hubLogo__.png",
84-
"SiteId": "f93eff08-5806-499c-92db-38800eefbe44",
85-
"SiteUrl": "https://contoso.sharepoint.com/sites/marketing",
86-
"Targets": "<acl><ace identityName=\"c:0t.c|tenant|0d4b97fc-37fb-4db3-84f3-d34243a3afac\" displayName=\"0t.c|tenant|0d4b97fc-37fb-4db3-84f3-d34243a3afac\" sid=\"\" binaryIdType=\"1\" binaryId=\"YzowdC5jfHRlbmFudHwwZDRiOTdmYy0zN2ZiLTRkYjMtODRmMy1kMzQyNDNhM2FmYWM=\" allowRights=\"1\" denyRights=\"0\" /></acl>",
87-
"TenantInstanceId": "00000000-0000-0000-0000-000000000000",
88-
"Title": ""
73+
"@odata.context": "https://contoso.sharepoint.com/_api/$metadata#hubsites/$entity",
74+
"@odata.type": "#SP.HubSite",
75+
"@odata.id": "https://contoso.sharepoint.com/_api/HubSites/GetById",
76+
"@odata.etag": "\"3\"",
77+
"@odata.editLink": "HubSites/GetById",
78+
"Description": null,
79+
"ID": "f93eff08-5806-499c-92db-38800eefbe44",
80+
"LogoUrl": "https://contoso.sharepoint.com/sites/marketing/SiteAssets/__hubLogo____hubLogo__.png",
81+
"SiteId": "f93eff08-5806-499c-92db-38800eefbe44",
82+
"SiteUrl": "https://contoso.sharepoint.com/sites/marketing",
83+
"Targets": "<acl><ace identityName=\"c:0t.c|tenant|0d4b97fc-37fb-4db3-84f3-d34243a3afac\" displayName=\"0t.c|tenant|0d4b97fc-37fb-4db3-84f3-d34243a3afac\" sid=\"\" binaryIdType=\"1\" binaryId=\"YzowdC5jfHRlbmFudHwwZDRiOTdmYy0zN2ZiLTRkYjMtODRmMy1kMzQyNDNhM2FmYWM=\" allowRights=\"1\" denyRights=\"0\" /></acl>",
84+
"TenantInstanceId": "00000000-0000-0000-0000-000000000000",
85+
"Title": ""
8986
}
9087
```
9188

@@ -94,8 +91,7 @@ https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-49
9491
#### Sample request
9592

9693
```HTTP
97-
POST
98-
https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-499c-92db-38800eefbe44'
94+
POST https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-499c-92db-38800eefbe44'
9995
```
10096

10197
#### Sample response
@@ -110,6 +106,28 @@ https://contoso.sharepoint.com/_api/HubSites/GetById?hubSiteId='f93eff08-5806-49
110106
}
111107
```
112108

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

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

0 commit comments

Comments
 (0)