method

LocalAPI.Delete

func (local *LocalAPI) Delete( ctx context.Context, collection, id string, actor *store.Document, localeOptions ...LocaleOptions, ) (store.Document, error)

Delete an authorized document, moving it to trash when the collection enables trash.

Source core/local.go:636

@param ctx
Request context.
@param collection
Authored collection slug.
@param id
Document ID.
@param actor
Authenticated actor, or nil.
@param localeOptions
Optional locale selection.
@returns
The deleted or trashed document, or an operation error.

Related types

  • LocalAPI

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

  • Document

    A stored document with status and version metadata.

  • LocaleOptions

    Locale selection for one single-document Local API operation.