@@ -63,49 +63,16 @@ GET /groups/{group-id}/sites/root
63
63
### Example 1: Get a site using the site ID
64
64
#### Request
65
65
66
+ The following example shows a request that gets a site by its site ID. A site ID is the value of the ** id** property of its ** site** resource. For more information on the format of the site ID, see [ site] ( ../resources/site.md#id-property ) .
66
67
67
- # [ HTTP] ( #tab/http )
68
- <!-- { "blockType": "request", "name": "get-site", "scopes": "sites.read.all" } -->
68
+ <!-- { "blockType": "request", "name": "get-site", "scopes": "sites.read.all", "sampleKeys": ["contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"] } -->
69
69
70
70
``` msgraph-interactive
71
- GET https://graph.microsoft.com/v1.0/sites/{site-id}
71
+ GET https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE
72
72
```
73
73
74
- # [ C#] ( #tab/csharp )
75
- [ !INCLUDE [ sample-code] ( ../includes/snippets/csharp/get-site-csharp-snippets.md )]
76
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
77
-
78
- # [ CLI] ( #tab/cli )
79
- [ !INCLUDE [ sample-code] ( ../includes/snippets/cli/get-site-cli-snippets.md )]
80
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
81
-
82
- # [ Go] ( #tab/go )
83
- [ !INCLUDE [ sample-code] ( ../includes/snippets/go/get-site-go-snippets.md )]
84
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
85
-
86
- # [ Java] ( #tab/java )
87
- [ !INCLUDE [ sample-code] ( ../includes/snippets/java/get-site-java-snippets.md )]
88
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
89
-
90
- # [ JavaScript] ( #tab/javascript )
91
- [ !INCLUDE [ sample-code] ( ../includes/snippets/javascript/get-site-javascript-snippets.md )]
92
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
93
-
94
- # [ PHP] ( #tab/php )
95
- [ !INCLUDE [ sample-code] ( ../includes/snippets/php/get-site-php-snippets.md )]
96
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
97
-
98
- # [ PowerShell] ( #tab/powershell )
99
- [ !INCLUDE [ sample-code] ( ../includes/snippets/powershell/get-site-powershell-snippets.md )]
100
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
101
-
102
- # [ Python] ( #tab/python )
103
- [ !INCLUDE [ sample-code] ( ../includes/snippets/python/get-site-python-snippets.md )]
104
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
105
-
106
- ---
107
-
108
74
#### Response
75
+ The following example shows the response.
109
76
110
77
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
111
78
@@ -126,12 +93,15 @@ Content-type: application/json
126
93
127
94
### Example 2: Get a site by server relative URL
128
95
#### Request
129
- <!-- { "blockType": "request", "name": "get-site-by-url", "scopes": "sites.read.all" } -->
96
+ The following example shows a request that gets a site by its hostname and server relative path.
97
+
98
+ <!-- { "blockType": "request", "name": "get-site-by-url", "scopes": "sites.read.all", "sampleKeys": ["contoso.sharepoint.com:/teams/1drvteam"] } -->
130
99
``` http
131
- GET https://graph.microsoft.com/v1.0/sites/{hostname}:/{server-relative-path}
100
+ GET https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/teams/1drvteam
132
101
```
133
102
134
103
#### Response
104
+ The following example shows the response.
135
105
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
136
106
``` http
137
107
HTTP/1.1 200 OK
@@ -149,47 +119,15 @@ Content-type: application/json
149
119
150
120
### Example 3: Get the site of a group
151
121
#### Request
152
- # [ HTTP] ( #tab/http )
122
+ The following example shows a request that gets a group's site by the ** id** property of a [ group] ( ../resources/group.md ) .
123
+
153
124
<!-- { "blockType": "request", "name": "get-site-by-group"} -->
154
125
``` msgraph-interactive
155
- GET https://graph.microsoft.com/v1.0/groups/{group-id} /sites/root
126
+ GET https://graph.microsoft.com/v1.0/groups/2C712604-1370-44E7-A1F5-426573FDA80A /sites/root
156
127
```
157
128
158
- # [ C#] ( #tab/csharp )
159
- [ !INCLUDE [ sample-code] ( ../includes/snippets/csharp/get-site-by-group-csharp-snippets.md )]
160
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
161
-
162
- # [ CLI] ( #tab/cli )
163
- [ !INCLUDE [ sample-code] ( ../includes/snippets/cli/get-site-by-group-cli-snippets.md )]
164
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
165
-
166
- # [ Go] ( #tab/go )
167
- [ !INCLUDE [ sample-code] ( ../includes/snippets/go/get-site-by-group-go-snippets.md )]
168
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
169
-
170
- # [ Java] ( #tab/java )
171
- [ !INCLUDE [ sample-code] ( ../includes/snippets/java/get-site-by-group-java-snippets.md )]
172
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
173
-
174
- # [ JavaScript] ( #tab/javascript )
175
- [ !INCLUDE [ sample-code] ( ../includes/snippets/javascript/get-site-by-group-javascript-snippets.md )]
176
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
177
-
178
- # [ PHP] ( #tab/php )
179
- [ !INCLUDE [ sample-code] ( ../includes/snippets/php/get-site-by-group-php-snippets.md )]
180
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
181
-
182
- # [ PowerShell] ( #tab/powershell )
183
- [ !INCLUDE [ sample-code] ( ../includes/snippets/powershell/get-site-by-group-powershell-snippets.md )]
184
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
185
-
186
- # [ Python] ( #tab/python )
187
- [ !INCLUDE [ sample-code] ( ../includes/snippets/python/get-site-by-group-python-snippets.md )]
188
- [ !INCLUDE [ sdk-documentation] ( ../includes/snippets/snippets-sdk-documentation-link.md )]
189
-
190
- ---
191
-
192
129
#### Response
130
+ The following example shows the response.
193
131
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
194
132
``` http
195
133
HTTP/1.1 200 OK
0 commit comments