Skip to main content

Save report version

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

Saves a report of type SlideDeck as it is now in its Version history, with an optional name, so it can be restored later with restoreReportVersion, for example before a change the user may want to take back. Rollstack already saves one before each change of the slides agent, each run and each template apply. Only its editors may. Each call saves another version.

Requires the slide_decks:write scope.

Operation ID: saveReportVersion.

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

  • name (string): A name for the version, as members will see it in the report's Version history, from 1 to 100 characters. Without one, the app names it after the time it was saved. Example: Before the Q3 restyle.

Response 201

Success

application/json

  • id (string, required): Identifies the version. Pass it as versionId to restoreReportVersion.
  • name (string or null, required): The name the version was saved with, such as Before applying Acme for the one a template apply saves. null when it has none: the app then names it after its kind or the time it was saved.
  • kind (string, required): What saved the version.

    • autoSaved: Rollstack, while the report was edited, and just before a version was restored or a template applied.
    • saved: a member, with saveReportVersion.
    • beforeRun, afterRun: a run, just before and after it updated the report.
    • beforeSlidesAgent, afterSlidesAgent: the slides agent, just before and after it changed the report. A reply's versionBeforeId names the one before it.
    • slidesAgent: an earlier version of the slides agent.

    One of autoSaved, saved, beforeRun, afterRun, beforeSlidesAgent, afterSlidesAgent, slidesAgent.

  • savedBy (object or null, required): The member whose edit, run, message or call saved it. null if their account was deleted.
    • id (number, required): The member's user id, the same as their id in listMembers.
    • name (string, required): The member's name, as shown in Rollstack.
    • email (string, required): The member's email address.
  • createdAt (string (date-time), required): When the version was saved.