find Items
Finds portal items that match the specified query parameters. This method obtains a PortalQueryResultSet object that contains PortalItem objects. Use PortalQueryResultSet.results to obtain the collection of PortalItem objects that match the query parameters. Since portal items can be maps, layers, applications or tools, use the PortalQueryParameters to restrict which items are returned. If you provide a simple keyword string for the search, such as "florida", this method searches a default set of high performance index fields, such as title, tags, snippet, description, type, and typekeywords.
For more advanced searches, you can preface your simple keyword strings with ArcGIS Portal Directory REST named fields followed by a colon (:). These advanced searches can take advantage of Boolean operators (AND, NOT, OR, -) and a range of special characters. For a more information, see the Search reference document in the ArcGIS Portal Directory REST API. Here are some examples of advanced search strings:
To find one specific portal item by its Id: "id:00e5e70929e14055ab686df16c842ec1"
To find all WebMap portal items with the word 'florida' in the Title field: "title:florida AND type:web map"
To find all Layer Package portal items with the word 'florida' in the Title field: "title:florida AND type:layer package"
To find all portal items with the word 'florida' in the Title field and the word 'esri' in the LicenseInfo field: "title:florida AND licenseinfo:esri"
To find all portal items with the word 'florida' in the Title field and not have the word 'esri' in the LicenseInfo field: "title:florida NOT licenseinfo:esri"
To find all portal items with located within a specific spatial extent and the word 'esri' in the LicenseInfo: "extent:-114.3458, 21.7518 - -73.125, 44.0658 AND licenseinfo:esri"
To find all portal items with a SpatialReference.WKID of 4267: "spatialreference:4267"
To find all portal items with a SpatialReference.WKID of 4267 or have the word 'cancer' in the Title field: "spatialreference:4267 OR title:cancer"
If you want to find items that belong to a group, then use PortalGroup.findItems(PortalGroupContentSearchParameters) to search group content.
Return
a Result of PortalQueryResultSet containing the portal items that were found
Since
200.0.0
Parameters
the PortalQueryParameters used to search