Get Role Information

This API is used to retrive the role information.

URL: /role

Type: GET

Parameters

Param Type Name Description Field Type
Header sessionId** (or) Token** Use either Session Id or Token received after login String
Query gwkey Tenant Key. Needed only in case of multitenant installations String
Query gwsource** Source from which the request is triggered (for example, web, external) String
Query roleName ** Name of the role. String

** - Mandatory value

Possible Response Message and Code

HTTP Code Description Response Message
200 OK Role Information Retrieved Successfully
400 Bad Request Role name cannot be empty
404 Not Found Role name is not found

Sample Request/Response

Use Case

Get the information about the role role_1.

Request URL

https://appviewxapi.com/avxapi/role?roleName=role_1&gwkey=f000ca01;gwsource=external

Request Payload

NA

Response
{
 "response": {
 "name": "role_1",
 "description": "role_1 details",
 "permissions": [
 "permission_1"
 ],
 "state": "A",
 "_id": "log",
 "_keywords": [
 "role used to test role functions.",
 "log",
 "Enabled"
 ]
 },
 "message": "Role Information Retrieved Successfully",
 "appStatusCode": null,
 "tags": null
 }