Searches for items within a folder using a query Returns ()
Both of the methods displayed search in a specified folder and, if selected, the children folders.
The top method returns all objects that match.
| Name | Description |
|---|---|
| folder | The folder to search in |
| query | The search query string |
| page | The page number for paginated results |
| pageSize | The Page Size (default is 1000). Maximum allowed value is 20000. |
| includeChildFolders | Whether to include items from child folders in the search |
| spanScope | Whether to span across scope boundaries |
| forTags | Filter results by specific tags |
| limit | Maximum number of results to return |
| includeParents | Whether to include parent folder information |
| collationLocale | Optional ICU locale (e.g. “en”) to apply collation on the server-side Find. Pair with collationStrength. When set, the server uses a collation-aware index if possible. |
| collationStrength | Optional collation strength 1-5. 1 = case- and accent-insensitive. Ignored unless collationLocale is set. |
| hints | Index hints — either index names (e.g. “idx_commonname_ci”) or JSON key-spec strings, in priority order. Server uses the first whose index exists. |
| useTwoStageQuery | When true, the server runs the typeahead query alone first to get candidate ids, then applies permission filters narrowed to that id set. May provide performance improvement. |
| firstStageCandidateLimit | Cap for the first stage’s candidate id set when useTwoStageQuery is true. |
Example in C#
// Returns: IEnumerable<BaseInfo>
var baseInfo = await client.SearchAsync(FolderInfo folder, String query, Int32 page, Int32 pageSize, Boolean includeChildFolders, Boolean spanScope, String forTags, Int32 limit, Boolean includeParents, String collationLocale, Int32 collationStrength, String hints, Boolean useTwoStageQuery, Int32 firstStageCandidateLimit);
Example in CURL
#General Search
curl -X GET \
'https://api.us.acresecurity.cloud/api/f/Instance.key?q=YOUR_QUERY&page=0&pageSize=1000&includeChildFolders=False&spanScope=False' \
-H 'Authorization: Bearer TOKEN_GOES_HERE'