JSON API » roles » roles/access/get

Gets whether a role has access to a role privilege.

Input parameters

Does not require authentication.

NameTypeDescriptionRequiredDefault value
roleIntegerID of role.Yes
privilegeStringPrivilege.Yes

Responses

CodeDescription
200Success.

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

VersionChanges
3.13Function added.