Skip to main content
POST
Parallel grep over a directory on a disk

Authorizations

Authorization
string
header
required

API key

Path Parameters

id
string
required

Disk ID (format dsk-{16 hex chars})

Pattern: ^dsk-[0-9a-f]{16}$
Example:

"dsk-0123456789abcdef"

Body

application/json
directory
string
required

Directory on the disk to search, relative to the disk root. An empty string or "/" means the disk root.

Example:

"data/logs"

pattern
string
required

Extended regular expression (passed to grep -E)

Example:

"ERROR|FATAL"

recursive
boolean
default:false

When true, walks subdirectories breadth-first.

maxDurationSeconds
integer
default:30

Wall-clock deadline for the entire request. Capped at 30 seconds because the runtime exec container itself is bounded at ~30s; longer requests would have their workers killed mid-scan.

Required range: 1 <= x <= 30
concurrency
integer
default:50

Maximum number of parallel grep workers. Higher values finish larger datasets within the deadline but consume proportionally more runtime capacity.

Required range: 1 <= x <= 100
maxResults
integer
default:1000

Stop scanning once the aggregator has this many matches. Returned matches are a sample of whichever workers reported first, not the lexicographically first N.

Required range: 1 <= x <= 10000

Response

Grep completed (possibly stopped early)

success
boolean
required
Example:

true

data
object
required