roles: Roles

URL:
https://[root]/portals/[portalID]/roles
Methods:
GET
Child Resources:
Role

Example usage

The following is a sample ArcGIS Online request URL used to access the roles resource:

1
https://org.arcgis.com/sharing/rest/portals/0123456789ABCDEF/roles?returnPrivileges=true&f=pjson

The following is a sample ArcGIS Enterprise request URL used to access the roles resource:

1
https://machine.domain.com/webadaptor/sharing/rest/portals/0123456789ABCDEF/roles?returnPrivileges=true&f=pjson

Description

The roles resource lists the organization's custom roles.

Request parameters

ParameterDetails

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.

Example

1
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. Note that 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

1
2
//Returns a max of 50 results in the response
num=50

returnPrivileges

If true, each role object in the response will have a privileges property listing all the privileges it has.

Values: true | false

f

The response format. The default format is html.

Values: html | json | pjson

Response properties

PropertyDetails

total

The total number of results found for the whole query.

Example

1
"total": 29,

start

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

Example

1
"start": 1,

num

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

Example

1
"num": 3,

nextStart

The next entry index if the current result set doesn't contain all results, or -1 if it is the last batch.

Example

1
"nextStart": 4,

roles

A JSON array of role objects. See the response properties of role for details. The example below shows a role object when returnPrivileges is true.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "id": "0U0NudFddh5rtfsc",
  "name": "roleName",
  "description": "This is a custom role",
  "created": 1446057576000,
  "modified": 1446057576000,
  "privileges": [
    "features:user:edit",
    "portal:publisher:publishFeatures",
    "portal:publisher:publishTiles",
    "portal:user:createGroup",
    "portal:user:createItem",
    "portal:user:joinGroup",
    "portal:user:joinNonOrgGroup",
    "portal:user:shareGroupToOrg",
    "portal:user:shareGroupToPublic",
    "portal:user:shareToGroup",
    "portal:user:shareToOrg",
    "portal:user:shareToPublic",
    "portal:user:viewOrgGroups",
    "portal:user:viewOrgItems",
    "portal:user:viewOrgUsers"
  ]
}

JSON Response syntax

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
  "total": <total number of roles for the organization>,
  "start": <the first record index in the response>,
  "num": <the number of roles included in the response>,
  "nextStart": <the next entry index>,
  "roles": [
    {
      <role1>
    },
    {
      <role2>
    },
    {
      <role3>
    }
  ]
}

JSON Response example

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{
  "total": 6,
  "start": 1,
  "num": 10,
  "nextStart": -1,
  "roles": [
    {
      "id": "iAAAAAAAAAAAAAAA",
      "name": "Viewer",
      "description": "Viewer",
      "created": 1615440392550,
      "modified": 1615440392550,
      "privileges": [
        "portal:user:joinGroup",
        "portal:user:viewOrgGroups",
        "portal:user:viewOrgItems",
        "portal:user:viewOrgUsers",
        "premium:user:demographics",
        "premium:user:elevation",
        "premium:user:geocode",
        "premium:user:networkanalysis"
      ]
    },
    {
      "id": "iBBBBBBBBBBBBBBB",
      "name": "Data Editor",
      "description": "Data Editor",
      "created": 1615440392550,
      "modified": 1615440392550,
      "privileges": [
        "features:user:edit",
        "portal:user:joinGroup",
        "portal:user:viewOrgGroups",
        "portal:user:viewOrgItems",
        "portal:user:viewOrgUsers",
        "premium:user:demographics",
        "premium:user:elevation",
        "premium:user:geocode",
        "premium:user:networkanalysis"
      ]
    },
    {
      "id": "FnjKvnmkg7dfFYJL",
      "name": "Notebook_Adv",
      "description": "For Advanced Notebook users",
      "created": 1615441320983,
      "modified": 1615441321237,
      "privileges": [
        "features:user:edit",
        "portal:publisher:publishFeatures",
        "portal:user:createItem",
        "portal:user:joinGroup",
        "portal:user:shareToGroup",
        "portal:user:shareToOrg",
        "portal:user:viewOrgGroups",
        "portal:user:viewOrgItems",
        "portal:user:viewOrgUsers",
        "premium:publisher:createAdvancedNotebooks",
        "premium:publisher:createNotebooks",
        "premium:publisher:geoanalytics",
        "premium:publisher:rasteranalysis",
        "premium:publisher:scheduleNotebooks",
        "premium:user:elevation",
        "premium:user:geocode",
        "premium:user:geoenrichment",
        "premium:user:networkanalysis",
        "premium:user:spatialanalysis"
      ]
    },
    {
      "id": "QjZbbGVvJQi5BLVy",
      "name": "Notebook_Std",
      "description": "For Advanced Notebook users",
      "created": 1615441321390,
      "modified": 1615441321423,
      "privileges": [
        "features:user:edit",
        "portal:publisher:publishFeatures",
        "portal:user:createItem",
        "portal:user:joinGroup",
        "portal:user:shareToGroup",
        "portal:user:shareToOrg",
        "portal:user:viewOrgGroups",
        "portal:user:viewOrgItems",
        "portal:user:viewOrgUsers",
        "premium:publisher:createNotebooks",
        "premium:publisher:geoanalytics",
        "premium:publisher:rasteranalysis",
        "premium:publisher:scheduleNotebooks",
        "premium:user:elevation",
        "premium:user:geocode",
        "premium:user:geoenrichment",
        "premium:user:networkanalysis",
        "premium:user:spatialanalysis"
      ]
    },
    {
      "id": "H4PyrOyVjkDM9Ylu",
      "name": "WebAppsPub",
      "description": "For Web Apps Publisher users",
      "created": 1615441321448,
      "modified": 1615441321482,
      "privileges": [
        "features:user:edit",
        "portal:publisher:bulkPublishFromDataStores",
        "portal:publisher:publishFeatures",
        "portal:publisher:publishScenes",
        "portal:publisher:publishServerGPServices",
        "portal:publisher:publishServerServices",
        "portal:publisher:publishTiles",
        "portal:publisher:registerDataStores",
        "portal:user:createGroup",
        "portal:user:createItem",
        "portal:user:joinGroup",
        "portal:user:shareGroupToOrg",
        "portal:user:shareGroupToPublic",
        "portal:user:shareToGroup",
        "portal:user:shareToOrg",
        "portal:user:shareToPublic",
        "portal:user:viewOrgGroups",
        "portal:user:viewOrgItems",
        "portal:user:viewOrgUsers",
        "premium:publisher:geoanalytics",
        "premium:publisher:rasteranalysis",
        "premium:user:elevation",
        "premium:user:geocode",
        "premium:user:geoenrichment",
        "premium:user:networkanalysis",
        "premium:user:spatialanalysis"
      ]
    },
    {
      "id": "UtH97RjLjPG7s31W",
      "name": "TrackView_Viewer",
      "description": "For TrackView Viewers",
      "created": 1615441321505,
      "modified": 1615441321553,
      "privileges": [
        "portal:user:joinGroup",
        "portal:user:viewOrgGroups",
        "portal:user:viewOrgItems",
        "portal:user:viewOrgUsers",
        "portal:user:viewTracks",
        "premium:user:elevation",
        "premium:user:geocode",
        "premium:user:networkanalysis"
      ]
    }
  ]
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close