Plan a schema sync
plan_schema_syncWhat applying a schema sync document would do, without changing anything: each list, index and flow it would create, update, adopt, delete or leave alone, field by field, with warnings and errors, and blockedBy if it would be refused. Always call this before apply_schema_sync, and show the user the plan. The document is checked against the sync document schema locally first, at no cost. Needs the sync-schema permission. 1 request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prune | No | Also delete the lists and indexes this document's scope manages but no longer declares. Needs a scope | |
| document | Yes | The schema sync document: { "$schema": "https://jsonpad.io/schema/sync-v1.json", "scope": "my-app", "lists": { "<pathName>": { name, schema, rules, rulesTests, indexes: { "<pathName>": { pointer, valueType, ... } } } }, "flows": { ... } }. File references (rulesFile and so on) aren't supported: put the contents inline | |
| allowRebuild | No | Allow changes that rebuild an index in a list that has items (the index is unusable until it's rebuilt) | |
| allowDestructive | No | Allow a prune to delete lists that have items, and guard indexes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| applied | Yes | ||
| changes | No | ||
| summary | No |