Studio Apps
searchStudioAppFile
Search Studio App Files
Search the current text files of a Studio app with a safe JavaScript regular expression, without paging whole files through readStudioAppFile.
Arguments
appIdstringrequiredThe Studio app IDmaxMatchesintegeroptionalMaximum matches to return. Defaults to 20; maximum 100. The response says when more exist.pathstringoptionalOptional file path within the app. Omit to search every text file. Binary files are never searched.patternstringoptionalJavaScript regular-expression source without slash delimiters. Case-sensitive; unsafe backtracking shapes are rejected. Canonical name: this is a regex, not a free-text query: but `query` is accepted too.querystringoptionalAlias of `pattern`, for the spelling the other search verbs use. `pattern` wins if you send both; the value is still read as a regex.
Returns
Returns each matching span with UTF-8 byteStart/byteEnd, 1-based lineStart/lineEnd, bounded surrounding contextLines, and exact character offsets.
Declared limits
maxMatches: greater than 0maxMatches: maximum 100pattern: minimum length 1pattern: maximum length 500query: minimum length 1query: maximum length 500
Ask for it
The Cloud routes these requests to this verb.
- find this CSS rule in my app
- search my app files for cart-toggle
- where is this selector defined
Pair it with
The verbs that finish the job.