Skip to content

Commit 224c9ef

Browse files
committed
format fixes
1 parent a7a75d3 commit 224c9ef

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

docs/declarative-customization/site-design-rest-api.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ Creates a new site script.
6969

7070
|Parameter | Description |
7171
|--------------|--------------|
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).|
7474

7575
The following example creates a new site script that applies a custom theme.
7676

@@ -153,7 +153,8 @@ Gets information about a specific site script. It also returns the JSON of the s
153153
| id | The ID of the site script to get information about. |
154154

155155
```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"});
157158
```
158159

159160
Here is an example of the JSON returned after calling **GetSiteScriptMetadata**.
@@ -200,8 +201,13 @@ var updated_site_script =
200201
};
201202

202203

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)}});
205211
```
206212

207213
Here is an example of the JSON returned after calling **UpdateSiteScript**.
@@ -230,7 +236,8 @@ Deletes a site script.
230236
Here's an example of deleting a site script.
231237

232238
```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"});
234241
```
235242

236243
## CreateSiteDesign
@@ -339,7 +346,8 @@ Gets information about a specific site design.
339346
Here's an example of getting information about a specific site design by ID.
340347

341348
```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"});
343351
```
344352

345353
Here is an example of the JSON returned after calling **GetSiteDesignMetadata**.
@@ -379,7 +387,17 @@ Updates a site design with new values.
379387
Here's an example that updates every value on an existing site design.
380388

381389
```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}});
383401
```
384402

385403
Here is an example of the JSON returned after calling **UpdateSiteDesign**.
@@ -411,7 +429,8 @@ Deletes a site design.
411429
Here's an example of deleting a site design.
412430

413431
```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"});
415434
```
416435

417436
## GetSiteDesignRights
@@ -428,7 +447,8 @@ Gets a list of principals that have access to a site design.
428447
Here's an example of getting view rights for a specific site design.
429448

430449
```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"});
432452
```
433453

434454
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.
493513
Here's an example of revoking view rights from a site design for Patti (fictional user at Contoso.)
494514

495515
```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]"] });
497519
```

0 commit comments

Comments
 (0)