method
LocalAPI.Restore
func (local *LocalAPI) Restore(
ctx context.Context,
collection,
id string,
revision,
expectedRevision int,
actor *store.Document,
localeOptions ...LocaleOptions,
) (store.Document, error)Restore a retained revision as the current published document.
Example
restored, err := app.Local().Restore(
ctx,
"posts",
postID,
revisionToRestore,
currentRevision,
actor,
)Related types
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.
DocumentA stored document with status and version metadata.
LocaleOptionsLocale selection for one single-document Local API operation.