GET:site/roles/{roleid}

Overview

public. Retrieve a role

Uri Parameters
NameTypeDescription
roleidstringeither an integer role ID or "=" followed by a double uri-encoded role name
Query Parameters

None

Return Codes
NameValueDescription
BadRequest400Invalid input parameter or request body
NotFound404Requested role could not be found
Ok200The request completed successfully

Message Format

Output:

<permissions>
    <operations mask="{int}">{text}</operations> 
    <role id="{int}" href="{uri}">{text}</role> 
</permissions>

Implementation Notes

Use GET:site/operations to retrieve a list of all operations currently defined on the site. 

Code Samples

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>
Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08