Skip to main content
Client App BuilderVersion: v3

Search the app's code for literal text.

POST/ai-builder-api/cli/projects/{projectId}/sandbox/search

Finds where text appears in the app's source files (ts, tsx, js, jsx, vue, json, md, css), with dependencies and build output left out. The text is matched literally, not as a pattern. Read the files it finds with POST .../sandbox/view.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:clientportal-ai.readonly
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

The API version.

Available optionsv3
Example:v3

Path Parameters

projectIdstringrequired

Project identifier.

Possible values: Value must match regular expression ^prj_[A-Za-z0-9_-]+$

Example:prj_01HXQ8Z6J9K2

Body

querystringrequired

The text to find, matched literally. It cannot start with '-'.

Possible values: >= 2 characters and <= 200 characters

Example:useCourses
pathsstring[]

Folders to search, relative to the workspace root; the whole app when absent.

Possible values: <= 2

Example:["apps/clientportal-custom-app"]
ignoreCaseboolean

Match regardless of case.

Example:false
maxResultsinteger

The most matching lines to return; 30 by default.

Possible values: >= 1 and <= 60

Example:30

Response

The matching lines, at most maxResults.

querystringrequired

The text searched for.

Example:useCourses
hitsobject[]required

The matching lines.

hitCountintegerrequired

How many lines matched, up to maxResults.

Example:1
truncatedbooleanrequired

True when more lines matched than were returned.

Example:false
searchedPathsstring[]required

The folders searched.

Example:["."]