v1

latestOpenAPI 3.1.02026-07-13372867.8 KB
editor

Replace String

Replaces all occurrences of a string in a file with a new string.

post/api/editor/str-replace

Request body

pathstring required

File path to modify

old_strstring required

String to replace

new_strstring required

Replacement string

Example request

{
  "new_str": "new text",
  "old_str": "old text",
  "path": "/path/to/file.txt"
}

Response

Successfully replaced string