slideshowSave procedure writes a full array of Slideshow objects to the filesystem under the given dataset ID. It returns the new digest of the saved state, which you can use to detect staleness on the next save.
Request
POST /rpc/slideshowSave
Input
The dataset to write to. Must be a non-empty string and must not be
"all". This identifies the file or directory on disk where the slideshows will be persisted.The full array of slideshows to save. The entire array is written atomically — partial updates are not supported. See the Slideshow type reference for the complete shape.
An optional staleness guard. If provided, the server compares this value against the current on-disk digest before writing. If they differ — meaning another write happened since you last loaded — the save may be rejected.Pass the
digest value returned by a previous slideshowLoad or slideshowSave call to enable this check. Omit it to skip staleness detection and always overwrite.Response
Always
true on a successful save. Errors are returned as ORPC error responses, not as success: false.A content-based digest of the saved state. Store this value and pass it as
expectedDigest on the next save to prevent overwriting concurrent changes.The filesystem path where the data was written.
Examples
Example response
Staleness protection
TheexpectedDigest field implements optimistic concurrency control. The workflow is:
- Call
slideshowLoadto get the current data. - Call
slideshowSaveto save, and capture thedigestfrom the response. - On the next save, pass that
digestasexpectedDigest. - If another client saved in the meantime, the digests will differ and the save is rejected.
- On rejection, reload the latest data, re-apply your changes, and save again.