Get Privilege For User

URL:
https://<root>/security/users/getPrivilege
Methods:
POST
Required Capability:
Access allowed with any authorized privilege
Version Introduced:
10.1

Description

The getPrivilege 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

ParameterDetails

username

The username for the account that needs to have their privileges computed.

Example
Use dark colors for code blocksCopy
1
username=njones

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the getPrivilege operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
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=pjson

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
{
  "privilege": "<ADMINISTER|PUBLISH|ACCESS>"
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
{
  "privilege": "ADMINISTER"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.