public. Retrieve a role
| Name | Type | Description |
| roleid | string | either an integer role ID or "=" followed by a double uri-encoded role name |
| Name | Type | Description |
| authenticate | bool? | Force authentication for request (default: false) |
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| NotFound | 404 | Requested role could not be found |
| Ok | 200 | The request completed successfully |
Output:
<permissions>
<operations mask="{int}">{text}</operations>
<role id="{int}" href="{uri}">{text}</role>
</permissions>
Use GET:site/operations to retrieve a list of all operations currently defined on the site.
The following code example retrieves information about the Admin role:
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("site", "roles", "=Admin").Get();
Sample response:
<permissions>
<operations mask="9223372036854779903">LOGIN,BROWSE,READ,SUBSCRIBE,UPDATE,CREATE,DELETE,CHANGEPERMISSIONS,CONTROLPANEL,ADMIN</operations>
<role id="5" href="http://deki-hayes/@api/deki/site/roles/5">Admin</role>
</permissions>