searchItems

Function
import { searchItems } from "@esri/arcgis-rest-portal";
//
searchItems('water')
  .then(response) // response.total => 355

Search a portal for items. See the REST Documentation for more information.

Parameters

Parameter Type Default Notes

Returns

A Promise that will resolve with the data from the response.

Promise<ISearchResult<IItem>>
Property Type Notes
nextStart number
num number
query string
results IItem[] | IGroup[] | IItem | IGroup
start number
total number
aggregations Optional {
counts:
{
fieldName:
string
fieldValues:
Array<{
count:
number
value:
any
}>
}
}

Aggregations will only be present on item searches when fieldCounts are requested.

nextPage Optional function() : Promise<ISearchResult<IItem | IGroup>>

Function defined in packages/arcgis-rest-portal/src/items/search.ts:21