Reference

Search files

Finds lines that match a regular expression, like grep -rn. Skips binary files and files over 1 MiB.

GET
/namespaces/{namespace}/branches/{branch}/search

On a branch whose namespace has a linked index, only the files that hold every trigram the pattern needs are read, and files changed since the index last caught up are read too, so a search over a huge tree takes about as long as one over the files that can match. Such a search covers the files the link indexes; the skywake-searched header says index or scan.

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

namespace*string

A namespace of your organization, such as prod/app, or <org>:<namespace> for a public namespace of another one. Encode / as %2F.

branch*string

A branch, such as main or agents/fix-1. Encode / as %2F.

Query Parameters

pattern*string
Length1 <= length <= 1000
path?string

Search only under this folder.

Lengthlength <= 4096
Default""
glob?string

Search only paths this glob matches. Without / it matches a name at any depth.

Length1 <= length <= 1000
ignoreCase?string

Match letters of either case. False by default.

Value in"true""false"
at?string

Read an older commit of the branch instead of its head.

Match^[0-9a-f]{64}$
limit?|

The most matches to return. 100 by default.

Response Body

The matches.

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/namespaces/string/branches/string/search?pattern=string'
Example Response
[  {    "path": "string",    "line": 0,    "text": "string"  }]