@@ -24,6 +24,7 @@ The following REST commands are available for working with site designs and site
24
24
25
25
- ** CreateSiteScript** &ndash ; Creates a new site script.
26
26
- ** GetSiteScripts** &ndash ; Gets a list of information on existing site scripts.
27
+ - ** GetSiteScriptFromList** &ndash ; Creates site script syntax from an existing SharePoint list.
27
28
- ** GetSiteScriptMetadata** &ndash ; Gets information about a specific site script.
28
29
- ** UpdateSiteScript** &ndash ; Updates a site script with new values.
29
30
- ** DeleteSiteScript** &ndash ; Deletes a site script.
@@ -152,6 +153,59 @@ Here is an example of the JSON returned after calling **GetSiteScripts**.
152
153
}
153
154
```
154
155
156
+ ## GetSiteScriptFromList
157
+
158
+ Gets the site script syntax for a specific list
159
+
160
+ ### Parameters
161
+
162
+ | Parameter | Description |
163
+ | ------------| --------------|
164
+ | listUrl | The url of the list to retrieve site script |
165
+
166
+
167
+ ### Examples
168
+
169
+ Here's an example of retrieving a site script JSON object from the Contoso customer list.
170
+
171
+ ``` javascript
172
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteScriptFromList" , {listUrl: " https://consoso.sharepoint.com/sites/projectgo/Lists/Contoso%20customer%20list" });
173
+ ```
174
+ <br />
175
+
176
+ Here is an example of the JSON returned after calling ** GetSiteScriptFromList** .
177
+
178
+ ``` json
179
+ {"@odata.context" :" https://constoso.sharepoint.com/sites/projectgo/_api/$metadata#Edm.String" ,"value" :"{
180
+ "actions" : [
181
+ {
182
+ "verb" : " createSPList" ,
183
+ "listName" : " Contoso customer list" ,
184
+ "templateType" : 100 ,
185
+ "subactions" : [
186
+ {
187
+ "verb" : " addSPView" ,
188
+ "name" : " All Items" ,
189
+ "viewFields" : [
190
+ " LinkTitle"
191
+ ],
192
+ "query" : " " ,
193
+ "rowLimit" : 30 ,
194
+ "isPaged" : true ,
195
+ "makeDefault" : true
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ "verb" : " addNavLink" ,
201
+ "url" : " Lists/Contoso customer list/AllItems.aspx" ,
202
+ "displayName" : " Contoso customer list" ,
203
+ "isWebRelative" : true
204
+ }
205
+ ]
206
+ }"}
207
+ ```
208
+
155
209
## GetSiteScriptMetadata
156
210
157
211
Gets information about a specific site script. It also returns the JSON of the script.
@@ -325,7 +379,7 @@ Applies a site design to an existing site collection.
325
379
Here's an example of applying a site design to the ProjectGo site collection.
326
380
327
381
``` javascript
328
- RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.ApplySiteDesign" , {siteDesignId: " 614f9b28-3e85-4ec9-a961-5971ea086cca" , " webUrl" : " https://contoso.microsoft .com/sites/projectgo" });
382
+ RestRequest (" /_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.ApplySiteDesign" , {siteDesignId: " 614f9b28-3e85-4ec9-a961-5971ea086cca" , " webUrl" : " https://contoso.sharepoint .com/sites/projectgo" });
329
383
```
330
384
331
385
## AddSiteDesignTaskToCurrentWeb
0 commit comments