search

Search file contents with grep

Changed on

Search file contents in a repository using git grep with regex patterns

get/search/grep

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/search/grep
  • Auth
    none declared

Query parameters

repository_idinteger required

Repository ID

patternstring required

Regex pattern to search for

globstring

File path filter (e.g. .go, src/**/.ts)

limitinteger

Maximum number of file results (default 10, max 200)

Response

OK

Changes