JSON API » roles » roles/access/get
Gets whether a role has access to a role privilege.
Input parameters
Does not require authentication.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
role | Integer | ID of role. | Yes | |
privilege | String | Privilege. | Yes |
Responses
Code | Description |
---|---|
200 | Success. |
Data returned
1 if role has access, 2 if role has read-only access, 0 if role does not have access.
Example: With required parameters
http://enswitch.example.com/api/json/roles/access/get/?role=1;privilege=system{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "1" } }
Change history
Version | Changes |
---|---|
3.13 | Function added. |