Restore a project to a saved version
r3_release_restorePut a project's working copy back the way one of its releases (saved versions) had it: components added since are removed, removed ones come back, values and scripts go back to that version (each script as a new version on top of the current one), and the name. The user sees it at once in any R3 tab that has the project open. Only when the user asked for it.
Two steps: WITHOUT planToken it changes nothing and says what restoring would change, with a planToken; the same call WITH that planToken, once the user has seen the plan and agreed, restores. If the project changed in between, nothing is changed and the new plan comes back.
The whole restore is ONE change of yours: r3_editor_undo takes it back. It never changes which release is LIVE (what the public URL shows): that is r3_release_rollback. The release number comes from r3_release_list. Needs project:write (and code:write when scripts change).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| planToken | No | The planToken the first call answered; only when the user agreed to that plan. | |
| projectId | Yes | The project (r3_project_list). | |
| releaseNumber | Yes | The release to restore the working copy to (r3_release_list). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answer | Yes | This answer in words: what was done, what R3 measured, decided or refused, and what to do next. The same text as the result's text block. Read it: the fields beside it are the data, this is the guidance. | |
| headSeq | Yes | ||
| opCount | Yes | ||
| summary | Yes | ||
| restored | Yes | ||
| planToken | Yes | ||
| projectId | Yes | ||
| releaseNumber | Yes |