method

LocalAPI.CreateWithOptions

func (local *LocalAPI) CreateWithOptions( ctx context.Context, collection string, values store.Values, options MutationOptions, ) (store.Document, error)

Create a document with draft, locale, population, and authorization options.

Source core/local.go:224

@param ctx
Request context.
@param collection
Authored collection slug.
@param values
Submitted field values.
@param options
Write and response options.
@returns
The authorized created document, or an operation error.

Related types

  • LocalAPI

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

  • Values

    A map of field names to typed values.

  • MutationOptions

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

  • Document

    A stored document with status and version metadata.