Skip To Content
ArcGIS Developer
Dashboard

users: User Search (Community)

  • URL:https://[root]/community/users
  • Child Resources:User

Example Usage

ArcGIS Online URL

https://www.arcgis.com/sharing/rest/community/users?q=john

ArcGIS Enterprise URL

https://machine.domain.com/webadaptor/sharing/rest/community/users?q=john

Description

The User Search operation searches for users in the portal. It is only available to authenticated users.

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

The results only contain users that the calling user has permissions to see. Users can control this visibility by changing the access property of their user.

Care should be taken when using ArcGIS REST API search operations (search, user search, group search, group content 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

ParameterDetails
[Common Parameter]

For a complete listing, see Common parameters.

q

The query string to search the users against.

See Search reference for advanced options.

Example: q=john+smith

filter

Structured filtering through specifying field name followed by a colon and the term you are looking for with double quotation marks. It is designed to allow passing in application level filters based on its context. Specified field value should be an exact keyword match of the value interested, partially match the filter keyword will fail the matching and not return meaningful results.

See Search reference for advanced options.

Example

filter=firstname:"John"
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 (return 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.

Example: num=50 (returns a max of 50 results in the response)

sortField

Field to sort by.

Values: username | created | fullname | modified

sortOrder

Describes whether the returned results are in ascending or descending order. Default is ascending.

Values: asc | desc

Response Properties

PropertyDetails
total

The total number of results that matches the query. It is counted accurately up to 10000, if the total number is greater than this value, 10000 will be returned. The top 10000 query results are available to retrieve via pagination.

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.

users

A JSON array of user objects. See the response properties for User.

JSON Response Syntax


            {
  "total": <total number of results>
  "start": <results in first set>,
  "num": <number of results per page>,
  "nextStart": <result number of next page>,
  "results": [{
      "username": "<username>",
      "id": "<id>",
      "fullName": "<first name> <last name>",
      "firstName": "<first name>",
      "lastName": "<last name>",
      "description": "<description>", 
	     "tags": [ 
         "<tag1>",
          "tag2>"        
       ],   
      "culture": <culture code>,  
      "cultureFormat": <culture format>,      
      "region": <region>, 
      "units": "<unit>",    
	     "thumbnail": "<file name>",  
      "created": date created shown in UNIX time, 
      "modified": date modified shown in UNIX time,
      "provider": "<provider>"
    }
}

JSON Response Example

{
  "total": 182,
  "start": 1,
  "num": 2,
  "nextStart": 3,
  "results": [
    {
      "username": "jsmith",
      "id": "f0e41e451b7167f3eb0ec9d28d447d15",
      "fullName": "John Smith",
      "firstName": "John",
      "lastName": "Smith",
      "description": "I work for the city of Redlands as a senior planner.",
      "tags": [
         "urban planner",
         "GIS"
      ],
      "culture": "en-GB",
      "cultureFormat": null,
      "region": "WO",
      "units": "english",
      "thumbnail": "mySelf.jpg",
      "created": 1429650697000,
      "modified": 1538593838000,
      "provider": null
    },
    {
      "username": "jhenry",
      "id": "47d37aa11e7b0de343274e3ad54d09ab",
      "fullName": "John Henry",
      "firstName": "John",
      "lastName": "Henry",
      "description": "I'm a full time student at UCSB.",
      "tags": [
        "Department of Geography",
        "GIS"
      ],
      "culture": "en-US",
      "cultureFormat": null,
      "region": "US",
      "units": "english",
      "thumbnail": "john_at_the_beach.jpg",
      "created": 1530814493000,
      "modified": 1530814536000,
      "provider": null
    }
  ]
}