Edit Cascade Asset
cascade_editUpdate an existing Cascade CMS asset by sending its full replacement body. Requires the asset id.
Instructions
Edit an existing Cascade CMS asset.
Accepts the full asset body (same envelope shape as cascade_create). The workflow is symmetric when cascade_read is called with read_mode: "raw": modify the raw asset envelope and pass the same envelope back to cascade_edit. Some asset types require a prior cascade_check_out.
Payload conventions:
Edit replaces the asset body, so send the full object as read — do not try to send only the fields you are changing.
When constructing an edit payload from scratch (not round-tripping a read), still omit optional fields you have no intention of setting; don't invent defaults.
Prefer id over path on every id/path pair (metadataSetId over metadataSetPath, etc.). Cascade resolves paths server-side.
Text encoding: same rules as cascade_create — rich-text fields must be well-formed XML with only the five XML built-in entities (
&,<,>,",'). See resourcecascade://text-encoding.
Args:
asset (object, required): Single-key envelope (same as cascade_create). Inner object must include
idto identify the existing asset.
Returns: Cascade OperationResult: { success: true } On failure: { success: false, message: "" }
Examples:
Use when: "Update a page's metadata" -> Read first with cascade_read; modify
asset.page.metadata; pass { asset: asset.asset } back.Use when: "Change a block's structured data" -> { asset: { xhtmlDataDefinitionBlock: { id: "...", structuredData: { ... } } } }
Use when: "Rewrite a symlink's target" -> { asset: { symlink: { id: "...", linkURL: "https://new.example.com" } } }
Don't use when: The asset doesn't exist — use cascade_create.
Don't use when: You want a partial patch — Cascade's edit replaces the asset body; always send the full object.
Error Handling:
"Asset not found" when id doesn't resolve
"Permission denied" when credentials lack edit rights
"Asset is checked out by another user" when the asset is locked
"Validation error" when required fields are missing or malformed. Responses are JSON text; structuredContent is authoritative when the response fits. Oversized responses return bounded _cache metadata for cascade_read_response. For cascade_read, read_mode controls preview versus raw Cascade payload shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | No | The asset payload to edit. Must include `id` to identify the target asset. Parent-folder fields are ignored on edit — use move to relocate. |