Search files
POST
/v1/workspaces/{workspace_id}/fs/_/grep
const url = 'https://app.everruns.com/api/v1/workspaces/example/fs/_/grep';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"path_pattern":"example","pattern":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.everruns.com/api/v1/workspaces/example/fs/_/grep \ --header 'Content-Type: application/json' \ --data '{ "path_pattern": "example", "pattern": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspace_id
required
string
Workspace ID (wsp_<32-hex>)
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
path_pattern
Optional path glob (**/*.rs, docs/*.md).
string | null
pattern
required
Regex pattern to search for.
string
Examplegenerated
{ "path_pattern": "example", "pattern": "example"}Responses
Section titled “Responses”Search results
Media typeapplication/json
Response wrapper for list endpoints.
All list endpoints return responses wrapped in a data field.
object
data
required
Array of items returned by the list operation.
Array<object>
Grep result for a file
object
matches
required
Array<object>
Grep match result
object
line
required
string
line_number
required
integer
path
required
string
path
required
string
Examplegenerated
{ "data": [ { "matches": [ { "line": "example", "line_number": 1, "path": "example" } ], "path": "example" } ]}Invalid regex pattern
Internal server error