Skip to main content

Apply template

POST https://api.rollstack.com/public/v1/reports/{id}/template

Switches a report of type SlideDeck to a template's theme, slide masters, layouts and slide size, as the Templates drawer in the app does. Its slides keep their content and move to the template's matching layouts; the answer names the slides that had no match, and the version saved just before as versionBeforeId: restore it with restoreReportVersion to undo the change. Only its editors may, and not while the report is running or the slides agent is working on it.

Requires the slide_decks:write scope.

Operation ID: applyReportTemplate.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • templateId (string, required): The template, by its id from listTemplates. Rollstack's own template has the fixed id rollstack-signature. Example: rollstack-signature.

Response 200

Success

application/json

  • templateName (string, required): The name of the template the report now uses.
  • versionName (string, required): The name of the version of the report saved just before, in its Version history.
  • versionBeforeId (string, required): The version saved just before. Restore it with restoreReportVersion to undo the change.
  • closestLayoutSlides (array of integer, required): The slides, by number from 1, whose layout the template has no match for: they moved to the template's closest layout, so tell the user to check them.
  • noLayoutSlides (array of integer, required): The slides, by number from 1, with no layout, such as ones pasted from PowerPoint: they only got the template's colors and fonts.