method
LocalAPI.Create
func (local *LocalAPI) Create(
ctx context.Context,
collection string,
values store.Values,
actor *store.Document,
localeOptions ...LocaleOptions,
) (store.Document, error)Create and validate a document through the shared operation engine.
Example
post, err := app.Local().Create(
ctx,
"posts",
store.Values{"title": store.String("Hello, Ridu")},
actor,
)Related types
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.
ValuesA map of field names to typed values.
DocumentA stored document with status and version metadata.
LocaleOptionsLocale selection for one single-document Local API operation.