@@ -69,8 +69,8 @@ Creates a new site script.
69
69
70
70
| Parameter | Description |
71
71
| --------------| --------------|
72
- | - Title | The display name of the site design. |
73
- | - Content | JSON value that describes the script. For more information, see [ JSON reference] ( site-design-json-schema.md ) .|
72
+ | Title | The display name of the site design. |
73
+ | Content | JSON value that describes the script. For more information, see [ JSON reference] ( site-design-json-schema.md ) .|
74
74
75
75
The following example creates a new site script that applies a custom theme.
76
76
@@ -153,7 +153,8 @@ Gets information about a specific site script. It also returns the JSON of the s
153
153
| id | The ID of the site script to get information about. |
154
154
155
155
``` javascript
156
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteScriptMetadata" , {id: " 07702c07-0485-426f-b710-4704241caad9" });
156
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteScriptMetadata" ,
157
+ {id: " 07702c07-0485-426f-b710-4704241caad9" });
157
158
```
158
159
159
160
Here is an example of the JSON returned after calling ** GetSiteScriptMetadata** .
@@ -200,8 +201,13 @@ var updated_site_script =
200
201
};
201
202
202
203
203
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.UpdateSiteScript" , {updateInfo: {Id: " 07702c07-0485-426f-b710-4704241caad9" ,
204
- Title: " New Contoso theme" , Description: " Updated Contoso site script" , Version: 2 , Content: JSON .stringify (updated_site_script)}});
204
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.UpdateSiteScript" ,
205
+ {updateInfo: {
206
+ Id: " 07702c07-0485-426f-b710-4704241caad9" ,
207
+ Title: " New Contoso theme" ,
208
+ Description: " Updated Contoso site script" ,
209
+ Version: 2 ,
210
+ Content: JSON .stringify (updated_site_script)}});
205
211
```
206
212
207
213
Here is an example of the JSON returned after calling ** UpdateSiteScript** .
@@ -230,7 +236,8 @@ Deletes a site script.
230
236
Here's an example of deleting a site script.
231
237
232
238
``` javascript
233
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteScript" , {id: " 07702c07-0485-426f-b710-4704241caad9" });
239
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteScript" ,
240
+ {id: " 07702c07-0485-426f-b710-4704241caad9" });
234
241
```
235
242
236
243
## CreateSiteDesign
@@ -339,7 +346,8 @@ Gets information about a specific site design.
339
346
Here's an example of getting information about a specific site design by ID.
340
347
341
348
``` javascript
342
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteDesignMetadata" , {id: " 614f9b28-3e85-4ec9-a961-5971ea086cca" });
349
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteDesignMetadata" ,
350
+ {id: " 614f9b28-3e85-4ec9-a961-5971ea086cca" });
343
351
```
344
352
345
353
Here is an example of the JSON returned after calling ** GetSiteDesignMetadata** .
@@ -379,7 +387,17 @@ Updates a site design with new values.
379
387
Here's an example that updates every value on an existing site design.
380
388
381
389
``` javascript
382
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.UpdateSiteDesign" , {updateInfo: {Id: " 614f9b28-3e85-4ec9-a961-5971ea086cca" , Title: " Contoso customer site" , Description: " Creates site with customer theme and list" , SiteScriptIds: [" 6b2b79e4-5da3-4352-8565-42a896fabd57" ," 2b997981-258b-4e1e-81ff-f6fbf7235a1f" ], PreviewImageUrl: " https://contoso.sharepoint.com/SiteAssets/customer_site.png" ,PreviewImageAltText: " Customer site with list and theme" , WebTemplate: " 68" , Version: 7 , IsDefault: false }});
390
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.UpdateSiteDesign" ,
391
+ {updateInfo: {
392
+ Id: " 614f9b28-3e85-4ec9-a961-5971ea086cca" ,
393
+ Title: " Contoso customer site" ,
394
+ Description: " Creates site with customer theme and list" ,
395
+ SiteScriptIds: [" 6b2b79e4-5da3-4352-8565-42a896fabd57" ," 2b997981-258b-4e1e-81ff-f6fbf7235a1f" ],
396
+ PreviewImageUrl: " https://contoso.sharepoint.com/SiteAssets/customer_site.png" ,
397
+ PreviewImageAltText: " Customer site with list and theme" ,
398
+ WebTemplate: " 68" ,
399
+ Version: 7 ,
400
+ IsDefault: false }});
383
401
```
384
402
385
403
Here is an example of the JSON returned after calling ** UpdateSiteDesign** .
@@ -411,7 +429,8 @@ Deletes a site design.
411
429
Here's an example of deleting a site design.
412
430
413
431
``` javascript
414
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteDesign" , {id: " f9e76746-5076-4bd2-bad3-e611c488fa85" });
432
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteDesign" ,
433
+ {id: " f9e76746-5076-4bd2-bad3-e611c488fa85" });
415
434
```
416
435
417
436
## GetSiteDesignRights
@@ -428,7 +447,8 @@ Gets a list of principals that have access to a site design.
428
447
Here's an example of getting view rights for a specific site design.
429
448
430
449
``` javascript
431
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteDesignRights" , {id: " dc076f7b-6c15-4d76-8f85-948a17f5dd18" });
450
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteDesignRights" ,
451
+ {id: " dc076f7b-6c15-4d76-8f85-948a17f5dd18" });
432
452
```
433
453
434
454
Here is an example of the JSON returned after calling ** GetSiteDesignRights** .
@@ -493,5 +513,7 @@ Revokes access from a site design for one or more principals.
493
513
Here's an example of revoking view rights from a site design for Patti (fictional user at Contoso.)
494
514
495
515
``` javascript
496
- RestRequest (
" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.RevokeSiteDesignRights" , {id
: " 5d4756e9-e1f5-42f7-afa7-5fa5aac170aa" , principalNames
: [
" [email protected] " ] });
516
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.RevokeSiteDesignRights" ,
517
+ {id: " 5d4756e9-e1f5-42f7-afa7-5fa5aac170aa" ,
518
+ principalNames
: [
" [email protected] " ] });
497
519
```
0 commit comments