Assets
Change Requests

Edit an asset's file content via string-replace edits, as a ChangeRequest

post/api/v1/assets/{assetId}/edit-content

Request

  • Base URL: https://api-docs.busabase.com
  • URL: https://api-docs.busabase.com/api/v1/assets/{assetId}/edit-content
  • Auth: none declared

Path parameters

assetIdstring required

Request body

messagestring

Explanation shown to the human reviewer. Write a conventional-commit style subject — imperative verb + what + why, e.g. "Fix typo in setup instructions".

submittedBystring
autoMergeboolean

Whether to approve and merge this change immediately. Omitted defaults to merging immediately if the actor has write access on the target node, otherwise falling back to a pending Change Request; pass explicit false to force review even with write access. This rewrites the real mounted file bytes; the previous content stays in the Change Request history, so it is recoverable but not one-click undoable.

Response

Applied the string-replace edits (coding-agent Edit-tool semantics: unique-match or replaceAll) to the asset's current mounted Drive/Skill file content and recorded the result as a ChangeRequest — merged immediately when the actor has write access on the mounting node, left "in_review" otherwise or when autoMerge: false is passed. Reuses the existing filetree update-via-CR pipeline end to end, including baseContentHash optimistic-concurrency conflict protection at merge time. Requires the asset to be mounted in exactly one editable Drive/Skill location.

idstring required
baseIdstring required
targetType'base' | 'node' required
nodeIdstring required
status'in_review' | 'changes_requested' | 'approved' | 'rejected' | 'merged' | 'abandoned' | 'conflict' required
submittedBystring required
sourceMetaobject required
reviewPolicySnapshotobject required
mergeSummaryobject required

Filled in when the change request merges. slugChanges (present only when non-empty) lists items a restore brought back under a new slug because another item took the old one while they were in the Trash: { nodeId, nodeType, name, fromSlug, toSlug }. Read the new slug from here instead of assuming the old one.

rejectedReasonstring required
reviewedAtstring required
mergedAtstring required
createdAtstring required
updatedAtstring required
operationCountnumber required

Changes

No recorded changes to this operation across all 1 revision of this API.