Roles

List Roles API

API to retrieve all the roles for the tenant

SecurityapiKey
Responses
200

Request Succeded

400

Bad request

401

Unauthorized request

get/authz2/v1/roles/
Request samples
Response samples
application/json
{
  • "count": 0,
  • "roles": [
    ]
}

Create New Role API

API to Create New role for the tenant

SecurityapiKey
Request
Request Body schema: application/json
required
name
string
description
string
Responses
200

Request Succeded

400

Bad request

401

Unauthorized request

post/authz2/v1/roles/
Request samples
application/json
{
  • "name": "string",
  • "description": "string"
}
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "role_type": 0
}

Get Role API

API to retrieve the role for the tenant

SecurityapiKey
Request
path Parameters
role_id
required
string <uuid>

Role ID

Responses
200

Request Succeded

400

Bad request

401

Unauthorized request

get/authz2/v1/roles/{role_id}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "role_type": 0
}

Patch Role API

API to update role details

SecurityapiKey
Request
path Parameters
role_id
required
string <uuid>

Role ID

Request Body schema: application/json
required
name
string
description
string
Responses
200

Request Succeded

400

Bad request

401

Unauthorized request

patch/authz2/v1/roles/{role_id}
Request samples
application/json
{
  • "name": "string",
  • "description": "string"
}
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "role_type": 0
}

Delete Role API

API to delete the role for the tenant

SecurityapiKey
Request
path Parameters
role_id
required
string <uuid>

Role ID

Responses
204

Deleted succesfully

400

Bad request

401

Unauthorized request

delete/authz2/v1/roles/{role_id}
Request samples
Response samples
application/json
{
  • "status": 0,
  • "code": 0,
  • "error": "string",
  • "errors": [
    ],
  • "message": "string"
}

Update Role Scopes API

API to update scopes of an roles for the tenant

SecurityapiKey
Request
path Parameters
role_id
required
string <uuid>

Role ID

Request Body schema: application/json
required
scope_ids
Array of strings
scope_names
Array of strings
Items Enum: "read:device" "read:group" "read:blueprint" "read:directory_record" "create:device_command:SET_DEVICE_LOCKDOWN_STATE" "create:device_command:REBOOT" "create:device_command:BEEP_DEVICE" "create:device_command:WIPE" "create:device_command:UPDATE_HEARTBEAT" "create:device_command:NOTIFY_DEVICE" "create:device_command:LOCK" "create:device_command:SET_KIOSK_APP" "update:device:group" "create:device:tag" "update:device:tag" "delete:device:tag" "update:device:alias" "create:template_upgrade" "create:device_command:SET_STREAM_VOLUME" "create:device_command:SET_BRIGHTNESS_SCALE" "create:device_command:SET_ROTATION_STATE" "create:device_command:SET_SCREEN_OFF_TIMEOUT" "create:device_command:SET_WALLPAPER" "create:device_command:SET_WIFI_STATE" "create:device_command:ADD_WIFI_AP" "create:device_command:REMOVE_WIFI_AP" "create:device_command:SET_STATIC_IP" "create:device_command:SET_ETHERNET_SETTINGS" "create:device_command:SET_GPS_STATE" "create:device_command:SET_BLUETOOTH_STATE" "create:device_command:SET_TIMEZONE" "create:device_command:SET_ADB_STATE" "create:device_command:UPDATE_DEVICE_CONFIG" "create:device_command:UPDATE_BLUEPRINT" "create:device_command:SHUT_DOWN" "create:device_command:CLEAR_PASSCODE" "read:device_app" "create:device_command:REFRESH_APPLIST" "create:device_command:INSTALL" "create:device_command:INSTALL_APP" "create:device_command:UNINSTALL" "create:device_command:UNINSTALL_APP" "create:device_command:SET_APP_STATE" "create:device_command:CLEAR_APP_DATA" "create:device_command:SET_APP_PERMISSION" "create:device_command:REQUEST_BUGREPORT" "create:device_command:SET_NEW_POLICY" "create:group" "create:group_command:REBOOT" "create:group_command:LOCK" "create:group_command:UPDATE_HEARTBEAT" "create:group_command:WIPE" "create:group_command:NOTIFY_DEVICE" "create:group_command:SET_KIOSK_APP" "create:group_command:SET_STREAM_VOLUME" "create:group_command:SET_BRIGHTNESS_SCALE" "create:group_command:SET_ROTATION_STATE" "create:group_command:SET_SCREEN_OFF_TIMEOUT" "create:group_command:SET_WALLPAPER" "create:group_command:SET_WIFI_STATE" "create:group_command:ADD_WIFI_AP" "create:group_command:REMOVE_WIFI_AP" "create:group_command:SET_STATIC_IP" "create:group_command:SET_ETHERNET_SETTINGS" "create:group_command:SET_GPS_STATE" "create:group_command:SET_BLUETOOTH_STATE" "create:group_command:SET_TIMEZONE" "create:group_command:SET_ADB_STATE" "create:group_command:UPDATE_DEVICE_CONFIG" "create:group_command:UPDATE_BLUEPRINT" "create:group_command:INSTALL" "create:group_command:INSTALL_APP" "create:group_command:UNINSTALL" "create:group_command:UNINSTALL_APP" "create:group_command:SET_APP_STATE" "create:device_command:INITIATE_OFFER" "read:device_screenshot" "create:device_command:CAPTURE_SCREENSHOT" "create:device_screenshot" "read:device_graph" "read:event_feed" "create:blueprint" "update:blueprint" "delete:blueprint" "create:device_command:CONVERGE" "update:device:blueprint" "update:group:blueprint" "provision:device" "read:compliance_policy" "create:compliance_policy" "update:compliance_policy" "delete:compliance_policy" "read:provisioning_template" "create:provisioning_template" "update:provisioning_template" "delete:provisioning_template" "create:provisioning_template:imei_serial" "update:provisioning_template:imei_serial" "delete:provisioning_template:imei_serial" "update:provisioning_template:wifi_management" "read:app" "read:emm" "create:emm" "update:emm" "create:app:esper_android" "update:app:esper_android" "delete:app:esper_android" "read:alert" "read:pipeline" "read:geofence" "read:report" "create:report" "read:personal_access_token" "create:personal_access_token" "update:personal_access_token" "delete:personal_access_token" "read:foundation_build" "read:foundation_device_model" "update:foundation_build" "update:foundation_device_model" "read:foundry_event" "update:command" "read:user:group" "create:app:esper_ios" "update:app:esper_ios" "delete:app:esper_ios"
Responses
200

Request Succeded

400

Bad request

401

Unauthorized request

put/authz2/v1/roles/{role_id}/scopes
Request samples
application/json
{
  • "scope_ids": [
    ],
  • "scope_names": [
    ]
}
Response samples
application/json
{
  • "count": 0,
  • "scopes": [
    ]
}

List Role Scopes API

API to retrieve scopes of an roles for the tenant

SecurityapiKey
Request
path Parameters
role_id
required
string <uuid>

Role ID

Responses
200

Request Succeded

400

Bad request

401

Unauthorized request

get/authz2/v1/roles/{role_id}/scopes
Request samples
Response samples
application/json
{
  • "count": 0,
  • "scopes": [
    ]
}