Skip to main content
POST
/
fs
/
{source_id}
/
grep
Grep search
curl --request POST \
  --url https://apigcp.trynia.ai/v2/fs/{source_id}/grep \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pattern": "<string>",
  "path": "",
  "case_sensitive": false,
  "whole_word": false,
  "fixed_string": false,
  "max_total_matches": 100,
  "max_matches_per_file": 10,
  "context_lines": 3,
  "output_mode": "content"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

source_id
string
required

Body

application/json
pattern
string
required

Regex pattern

path
string
default:""

Path prefix filter

case_sensitive
boolean
default:false
whole_word
boolean
default:false
fixed_string
boolean
default:false
max_total_matches
integer
default:100
Required range: 1 <= x <= 10000
max_matches_per_file
integer
default:10
Required range: 1 <= x <= 100
context_lines
integer
default:3
Required range: 0 <= x <= 10
output_mode
string
default:content

content|files_with_matches|count

Response

Successful Response