- URL:https://<users-url>/getPrivilege
(POST only)
- Required Capability:Default administrator role | All authorized privileges
- Version Introduced:10.1
Description
This operation returns the privilege associated with a user. The API tests all the rules to which the user belongs and returns the highest possible privilege.
Request parameters
Parameter | Details |
---|---|
username | The name of the user for whom the privilege needs to be computed. Example
|
f | The response format. The default response format is html. Values: html | json| pjson |
Example usage
Below is a sample POST request for getPrivilege:
POST /webadaptor/admin/security/users/getPrivilege HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
username=njones&f=json
JSON Response syntax
{
"privilege": "<ADMINISTER|PUBLISH|ACCESS>"
}
JSON Response example
{
"privilege": "ADMINISTER"
}