Leap0

Grep

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

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

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

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token in the Authorization header. Alternatively, use the leap0-authorization header.

In: header

Path Parameters

sandboxID*string

Unique sandbox identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

path*string

Base directory to search from.

pattern?string

Text pattern to search for within files.

include?string

File pattern filter e.g. *.go

exclude?array<string>

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

Response Body

application/json

application/json

application/json

curl -X POST "https://api.leap0.dev/v1/sandbox/string/filesystem/grep" \  -H "Content-Type: application/json" \  -d '{    "path": "string"  }'
{  "items": [    {      "path": "string",      "line": 0,      "content": "string"    }  ]}
{  "message": "string",  "errors": [    {      "field": "string",      "error": "string"    }  ]}
{  "message": "string"}