# Fetch module and permission template for role creation 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.READ` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **accept** `string` **Mandatory**: `application/umRoles.v1+json` Specifies the expected response format. Set to `application/addRole.v1+json` to receive the role creation response template in JSON format. ## Sample Request ```curl curl --request GET \ --url https://appdomain/emsapi/roles \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'accept: application/umRoles.v1+json' ``` ## Response Parameters ### HTTP Code 200 #### Response Body: application/json `JSON object` - **roleDetails** `JSON object` Product-keyed permission template used while creating a role. Each product contains module list and access flags. ## Possible Response Codes - **200** `HTTP code` ## Sample Response: HTTP 200 Role creation template payload with product modules and default permission flags. ```json { "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" } ] } } } ``` ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **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.