Skip to content

Grep

POST
/v1/sandbox/{sandboxID}/filesystem/grep

Search for a text pattern inside files. Use include to filter by file extension (e.g. *.go).

sandboxID
required
string

Unique sandbox identifier.

object
path
required

Base directory to search from.

string
pattern

Text pattern to search for within files.

string
nullable
include

File pattern filter e.g. *.go

string
nullable
exclude

Glob patterns to exclude (e.g. node_modules, .git).

Array<string>

Search results.

object
items
required

List of search matches.

Array<object>
object
path
required

File path containing the match.

string
line
required

Line number of the match.

integer format: uint64
content
required

Content of the matching line.

string

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string