Roles

Description

This resource lists custom roles of an organization.

Request Parameters

Parameter

Details

[Common Parameters]

For a complete listing, see common parameters.

[Paging Parameters]

For a complete list of paging parameters, see paging parameters.

returnPrivileges

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

Response Properties

Property

Details

[Paging Properties]

The following paging properties are included in the response and they are described in paging properties.

roles

A JSON array of role objects. See the response properties of role for details.

If returnPrivileges=true, a role object example:

{
      "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"
      ]
    }

Example Usage

URL for Roles

http://www.arcgis.com/sharing/rest/portals/LkFyxb9zDq7vAxxx/roles

JSON Response Syntax

{
  "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

{
  "total": 29,
  "start": 1,
  "num": 3,
  "nextStart": 4,
  "roles": [
    {
      "id": "iAAAABCXAAAA75AA",
      "name": "customViewer",
      "description": "Custom Viewer",
      "created": 1471479114000,
      "modified": 1471479114000
    },
    {
      "id": "1eo7LSAhbNiG1q9t",
      "name": "customPublisher",
      "description": "Custom Publisher",
      "created": 1468436439000,
      "modified": 1468436439000
    },
    {
      "id": "2a5MU7lBcBWutf4S",
      "name": "customUser",
      "description": "Custom User",
      "created": 1472061684000,
      "modified": 1472061684000
    }
  ]
}

10/6/2017