Fetch module and permission template for role creation

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Retrieves the role template payload used when creating roles, including product modules and permission flags. [0=Full-control; 1=Read-Write; 2=Read-Only; -1=No Access]

Endpoints

get /emsapi/roles

Request URL

https://{server-hostname}:8383/emsapi/roles

Scope

Admin.READCopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

acceptstringMandatory
application/umRoles.v1+jsonapplication/umRoles.v1+jsonCopied!

Specifies the expected response format. Set to application/addRole.v1+json to receive the role creation response template in JSON format.

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request GET \
  --url https://appdomain/emsapi/roles \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'accept: application/umRoles.v1+json'
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON object
Hide Sub-Attributes
roleDetailsJSON object

Product-keyed permission template used while creating a role. Each product contains module list and access flags.

Show Sub-Attributes
uem_safestringJSON object

Product-specific permission template. Each key is the internal product name (e.g., 'desktopCentral', 'osd', 'mdm', 'SecurityAddOn') containing its module configuration template.

Show Sub-Attributes
displayNamestring

Display name of the product (e.g., 'Endpoint Control', 'OSD Control', 'MDM', 'Security Add-on Control').

modulesJSON array

List of module permission template objects showing which modules are available for this product. Each module includes default permission flags and optional feature restrictions.

Show Sub-Attributes
JSON object
Show Sub-Attributes
0boolean

Default permission flag for access level 0.

1boolean

Default permission flag for access level 1.

2boolean

Default permission flag for access level 2.

displayNamestring

Module name (e.g., 'Configurations', 'Patch Management', 'Inventory', 'Enrollment').

valuestring

Internal value identifier for the module used when creating or updating roles (e.g., 'Configurations', 'Patch Management', 'MDM Enrollment').

isFeatureRestrictionAllowedJSON object

Access-level restriction details for modules that support read/write/fullControl granularity.

Show Sub-Attributes
readinteger

Read access level for the module.

writeinteger

Write access level for the module.

fullControlinteger

Full control access level for the module.

moduleIdstring

Module identifier. The Module ID can be fetched using the following API Get Module ID

-1boolean

Full module access flag. When true, grants complete access to the module.

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

Role creation template payload with product modules and default permission flags.

Copied!
  {
    "roleDetails": {
      "osd": {
        "displayName": "OSD Control",
        "modules": [
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Imaging",
            "value": "OSD Imaging"
          },
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Deployment",
            "value": "OSD Deployment"
          }
        ]
      },
      "desktopCentral": {
        "displayName": "Endpoint Control",
        "modules": [
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Configurations",
            "isFeatureRestrictionAllowed": {
              "read": 2,
              "fullControl": 0,
              "write": 0
            },
            "moduleId": "97913000000010497",
            "value": "Configurations"
          },
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Patch Management",
            "value": "Patch Management"
          },
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Inventory",
            "isFeatureRestrictionAllowed": {
              "read": 0,
              "fullControl": 0,
              "write": 0
            },
            "moduleId": "97913000000010506",
            "value": "Inventory"
          }
        ]
      },
      "mdm": {
        "displayName": "MDM",
        "modules": [
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Enrollment",
            "value": "MDM Enrollment"
          },
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Inventory",
            "isFeatureRestrictionAllowed": {
              "read": 0,
              "fullControl": 0,
              "write": 0
            },
            "moduleId": "186245000000000405",
            "value": "MDM Inventory"
          }
        ]
      },
      "SecurityAddOn": {
        "displayName": "Security Add-on Control",
        "modules": [
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Application Control",
            "value": "Application Control"
          },
          {
            "0": false,
            "1": false,
            "2": false,
            "-1": true,
            "displayName": "Next-Gen Antivirus",
            "value": "NGAV Mgmt"
          }
        ]
      }
    }
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.