POST
/
api
/
editor
/
str-replace
curl --request POST \
  --url http://localhost:4242/{computer_name}/api/editor/str-replace \
  --header 'Content-Type: application/json' \
  --data '{
  "new_str": "new text",
  "old_str": "old text",
  "path": "/path/to/file.txt"
}'
This response does not have an example.

Body

application/json
path
string
required

File path to modify

Example:

"/path/to/file.txt"

old_str
string
required

String to replace

Example:

"old text"

new_str
string
required

Replacement string

Example:

"new text"

Response

204
_mintlify/placeholder

Successfully replaced string