Group Search

Description

The Group Search operation searches for groups in the portal.

The search index is updated whenever groups and organizations are created, updated, or deleted. There can be a lag between the time that a group is updated and the time when it's reflected in the search results.

The results only contain groups that the user has permission to access.

Care should be taken when using ArcGIS REST API search operations (search, user search, group search) to find items, groups, and users programmatically. The Portal uses a powerful search engine to index information and to allow full text searching on it. This search engine uses many different inputs to find the appropriate results and rank them. This often makes search 'fuzzy', making it ideal for human interaction, but not necessarily ideal for looking for specific records programmatically. Developers should avoid using search to find specific items (e.g. by title) as the results of these types of queries might change as the search engine evolves.

Request Parameters

Parameter

Details

[Common Parameters]

For a complete listing, see Common parameters.

q

The query string to search the groups against.

See Search reference for advanced options.

Example: q=arcgis+online

start

The number of the first entry in the result set response. The index number is 1-based.

The default value of start is 1 (for example, the first search result).

The start parameter, along with the num parameter, can be used to paginate the search results.

Example: start=11 (returns result #11 as the first entry in the response)

num

The maximum number of results to be included in the result set response.

The default value is 10, and the maximum allowed value is 100.

The start parameter, along with the num parameter, can be used to paginate the search results.

The actual number of returned results may be less than num. This happens when the number of results remaining after start is less than num.

sortField

Field to sort by.

Values: title | owner | created | modified

sortOrder

Describes whether order returns in ascending or descending order. Default is ascending.

Values: asc | desc

Response Properties

Property

Details

query

The query string searched.

total

The total number of results found for the whole query. The number of query results is limited to 10000.

start

The number of the first entry in the result set for this response. The index number is 1-based.

num

The number of results included in the result set for this response.

nextStart

The next entry index if the current result set doesn't contain all results.

results

A JSON array of group objects. See the response properties for Group.

Example Usage

URL for Group Search

http://www.arcgis.com/sharing/rest/community/groups?
q=Redlands&f=pjson

JSON Response Syntax

{
  "query": "<query>",
  "total": total number of results returned,
  "start": start number,
  "num": number in result set,  
  "nextStart": -1,
  "results": [{
    "id": "<group id>",
    "title": "<group title>",
    "isInvitationOnly": true | false,
    "owner": "<group owner username>",
    "description": "<description>",
    "snippet": "<summary>",
    "tags": [
      "<tag1>",
      "<tag2>",
      "<tag3>"
    ],
  "phone": "<contact>",
  "sortField": "title",
  "sortOrder": "asc",
  "isViewOnly": false,
  "isFav": "false,
  "thumbnail": file name,
  "created": date created shown in UNIX time,
  "access": "private | org | public "
  }]
}

JSON Response Example

{
  "query": "Redlands",
  "total": 1,
  "start": 1,
  "num": 10,
  "nextStart": -1,
  "results": [{
    "id": "2146ddb18dbe4fe1bb11dc9594164546",
    "title": "Street Maps",
    "isInvitationOnly": false,
    "owner": "jsmith",
    "description": "The street map group provides street maps for the city of Redlands.",
    "snippet": "City of Redlands maps",
    "tags": [
      "Redlands",
      "street",
      "maps"
    ],
    "phone": "jsmith@esri.com",
    "sortField": "title",
    "sortOrder": "asc",
    "isViewOnly": false,
    "isFav": false,
    "thumbnail": "streets.jpg",
    "created": 1258061693000,
    "access": "public"
  }]
}

10/6/2017