users: User Search (Organization)

URL:
https://[root]/portal/[portalID]/users/search
Methods:
GET

Example usage

The following is a sample ArcGIS Online request for the search operation:

Use dark colors for code blocksCopy
1
https://www.arcgis.com/sharing/rest/portal/0123456789ABCDEF/users/search?q=john

The following is a sample ArcGIS Enterprise request for the search operation:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/sharing/rest/portal/0123456789ABCDEF/users/search?q=john

Description

The search operation searches for users within an organization.

Request parameters

ParameterDetails

[Common Parameter]

See Common parameters for a complete list.

q

The query string used to search for users. See Search reference for advanced options.

Example

Use dark colors for code blocksCopy
1
q=john+smith

filter

The filter used when searching for users. It is structured filtering using a specifying field name followed by a colon and the keyword you are searching for with double quotation marks. It is designed to allow passing in application level filters based on its context. The specified field value should be an exact keyword match of the specified value; partially matching the filter keyword will fail and no meaningful results will be returned. See Search reference for advanced options.

Example

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
2
//returns result 11 as the first entry in the response
start=11

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 number of returned results may be less than the num value when the number of results remaining after the start value is less than the num value.

Example

Use dark colors for code blocksCopy
1
2
//Returns a maximum of 50 results in the response
num=50

sortField

Specify the fields that will be used to the sort search results.

Values: username | created | fullname | modified

sortOrder

Specify whether the returned results will be in ascending or descending order. The default value is asc.

Values: asc | desc

categories

Filter users by categories.

Example

Use dark colors for code blocksCopy
1
2
//parameter example
categories=categories/USA/redlands

f

The response format. The default format is html.

Values: html | json | pjson

Response properties

PropertyDetails

total

The total number of results that matches the query. It is counted accurately up to 10,000; if the total number is greater than this value, 10,000 will be returned. The top 10,000 query results are available to retrieve through 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 the results.

users

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

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  "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>",
      "groups": []
    }
  ]
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  "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,
      "groups": []
    },
    {
      "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,
      "groups": []
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.