Skip To Content

Add Role

Description

Adds a role to the role store. This operation is available only when the role store is a read-write store such as the default ArcGIS Serverstore. If the name of the role exists in the role store, an error will be returned.

Request parameters

ParameterDetails
rolename

The name of the role. The name must be unique in the role store.

Example

rolename=editors
description

An optional field to add comments or a description for the role.

Example

description=Group of users that can edit maps
f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

Below is a sample POST request for add:


POST /webadaptor/admin/security/roles/add HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

rolename=editors&description=Group of users that can edit maps&f=json

The operation parameters can also be provided in JSON format and submitted as a value to the role parameter.

role={
    "rolename": "<rolename>",
    "description": "<description>"
}

JSON Response example

{"status": "success"}