Skip to main content
Edit tool

Authorizations

Authorization
string
header
required

The server's token (MIRAGE_AUTH_TOKEN) or a JWT. A daemon in the default local mode with no token accepts requests without one.

Path Parameters

workspace_id
string
required

The workspace's id.

Query Parameters

session_id
string

The session the call acts as; the default session when absent.

Body

application/json
path
string
required

Absolute path of the file to edit.

old_string
string
required

The exact text to replace.

new_string
string
required

The text to put in its place.

replace_all
boolean

Replace every occurrence instead of exactly one (default false).

Response

OK

text
string
required
is_error
boolean
required