Edit source files with string replacement
Atomically applies ordered exact-string edits to up to 50 files and 200 edits in total as one head version. Each oldStr must match once unless replaceAll is true, and any failing edit aborts the whole call. Set dryRun to validate and count replacements without committing. Takes the edit lease when no leaseToken is sent.
Authorizations
Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.
Body
1Files to edit (up to 50, and 200 edits in total). Every edit across every file commits as one version, or none of them do.
1 - 50 elementsValidate every edit and report the replacement counts without committing.
Omit to have Cactal take the edit lease for you; pass a token from websiteSourceCode.lease.acquire to take over from another editor.
1Response
The new head version plus per-file replacement counts.
Head version after the edit: the previous head plus one, or the unchanged head when changed is false.
false when the edit was a no-op and no new version was created.
Per-file replacement counts, in request order. Reported for dryRun calls too, which commit nothing.