Skip to main content
Grep 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
pattern
string
required

Regular expression to search for.

path
string
required

Absolute path of the file or directory to search under.

ignore_case
boolean

Match case-insensitively (-i).

fixed_strings
boolean

Read pattern as a literal string, not a regex (-F).

include
string

Search only files whose name matches this glob, such as *.py (--include).

context
integer

Lines of context to print around each match (-C).

Required range: x >= 0
files_with_matches
boolean

Print only the names of files that match (-l).

count
boolean

Print only a count of matching lines per file (-c).

max_count
integer

Stop each file after this many matching lines (-m).

Required range: x >= 1

Response

OK

text
string
required
is_error
boolean
required