searchItems
FunctionsearchItems(search: string | ISearchOptions | SearchQueryBuilder): Promise<ISearchResult<IItem>>Search a portal for items. See the REST Documentation for more information.
import { searchItems } from "@esri/arcgis-rest-portal";
searchItems('water')
  .then(response) // response.total => 355Parameters
| Parameter | Type | Notes | 
|---|---|---|
search | string | ISearchOptions | SearchQueryBuilder | A string or RequestOptions object to pass through to the endpoint.  | 
Returns
Promise<ISearchResult<IItem>>A Promise that will resolve with the data from the response.