Studio Apps
createStudioAppFileFromTemplate
New Page from a Template
createStudioAppFileFromTemplate: make a NEW page in a Studio app from a page that already exists: copy templatePath to newPath, filling the template's slots as you go, so a guide, a listing or a…
Arguments
appIdstringrequiredThe Studio app IDlistSlotsbooleanoptionalWhen true, WRITE NOTHING and just return the slots templatePath exposes, so you can ask the person for exactly what you cannot know. newPath is ignored on this call.newPathstringrequiredPath of the page to create, within the app (e.g. 'guide-september.html'). Must differ from templatePath.overwritebooleanoptionalReplace newPath if a file is already there. Defaults to false, which refuses with a CONFLICT instead. Only pass true when the person has said to replace that page.replacementsobjectoptionalSlot name to value, applied to the copy. Escaped as HTML text unless the template's declaration marks that slot raw. Max 2000 characters per value: write longer copy in afterwards with editStudioAppFile.requestIdstringoptionalOptional idempotency/trace key, echoed on coded errors. Re-sending the same call after a CONFLICT still refuses: change newPath or pass overwrite.templatePathstringrequiredPath of the existing page to copy, within the app (e.g. 'welcome-guide.html'). Must be a text file.
Returns
If newPath already exists the call changes NOTHING and returns a CONFLICT: pick another path, or pass overwrite: true when the person has said to replace that page.
Ask for it
The Cloud routes these requests to this verb.
- new guide from the last one
- make a page like X
- duplicate this page as Y
- another one of these for Friday
- copy the welcome guide for the new guest
- start a page from the template
Pair it with
The verbs that finish the job.