Define collection schema
define_collection_schemaDefine (or clear, with schema=null) a JSON Schema on a collection in a site's data store. A schema validates every appended record server-side, turning the collection into a typed backend. Defining a schema requires Pro. Scoped to a site you own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | A JSON Schema object to enforce, or null to make the collection schemaless | |
| site_id | Yes | The site that owns the collection | |
| collection | Yes | The collection name | |
| workspace_id | No | Optional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for). |