method

LocalAPI.RestoreVersionWithOptions

func (local *LocalAPI) RestoreVersionWithOptions( ctx context.Context, collection, id string, revision int, draft bool, options MutationOptions, ) (store.Document, error)

Restore a retained revision with explicit draft, concurrency, locale, and response controls.

Source core/local.go:628

@param ctx
Request context.
@param collection
Versioned collection slug.
@param id
Document ID.
@param revision
Retained revision to restore.
@param draft
Keep the restored document unpublished when true.
@param options
Write and response options.
@returns
The restored current document, or an operation error.

Related types

  • LocalAPI

    In-process content operations that share the REST authorization and lifecycle pipeline.

  • MutationOptions

    Authorization, optimistic concurrency, response population, create status, and locale controls for one write.

  • Document

    A stored document with status and version metadata.