The "listPrivileges" action returns a list of privileges that you can assign to roles. Privileges are returned in ascending alphabetical order and can be filtered by action, object, or scope.
Request examples
Typical
{
"action": "listPrivileges",
"params": {
"privilegeRegexFilter": "CodePackage"
},
"apiVersion": "1.0",
"requestId": "3",
"debug": "max",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Minimal
{
"action": "listPrivileges",
"params": {},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Maximal
{
"authToken": "",
"result": {
"privileges": [
"alterAnyCodePackageInAnyDatabase",
"alterAnyCodePackageInOneDatabase",
"alterOneCodePackage",
"cloneAnyCodePackageInAnyDatabase",
"cloneAnyCodePackageInOneDatabase",
"cloneOneCodePackage",
"createAnyCodePackageInAnyDatabase",
"createAnyCodePackageInOneDatabase",
"describeAnyCodePackageInAnyDatabase",
"describeAnyCodePackageInOneDatabase",
"describeOneCodePackage",
"describeTheSecurityOfAnyCodePackageInAnyDatabase",
"describeTheSecurityOfAnyCodePackageInOneDatabase",
"describeTheSecurityOfOneCodePackage",
"executeAnyCodePackageInAnyDatabase",
"executeAnyCodePackageInOneDatabase",
"executeOneCodePackage",
"listAnyCodePackageInAnyDatabase",
"listAnyCodePackageInOneDatabase",
"listTheHistoryOfAnyCodePackageInAnyDatabase",
"listTheHistoryOfAnyCodePackageInOneDatabase",
"listTheHistoryOfOneCodePackage",
"manageAnyCodePackageInAnyDatabase",
"manageAnyCodePackageInOneDatabase",
"manageOneCodePackage",
"manageTheSecurityOfAnyCodePackageInAnyDatabase",
"manageTheSecurityOfAnyCodePackageInOneDatabase",
"manageTheSecurityOfOneCodePackage",
"revertAnyCodePackageInAnyDatabase",
"revertAnyCodePackageInOneDatabase",
"revertOneCodePackage"
]
},
"requestId": "",
"errorCode": 0,
"errorMessage": ""
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
partialPrivilegeName |
The "partialPrivilegeName" property causes the response to include only items with names that match the value specified. The match starts at the beginning of the name, making it a "starts with" match instead of a "substring" match. If the partial name is empty, null, or omitted, it matches all names. You cannot use this property in tandem with the "privilegeRegexFilter" property. |
Optional with default of ""
|
string | 1 to 64 bytes |
privilegeRegexFilter |
The "privilegeRegexFilter" property filters the response based on the specified regular expression. You cannot use this property in tandem with the "partialPrivilegeName" property. |
Optional with default of ""
|
regular expression |
Action
Object
Scope
|
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
privileges |
The "privileges" property lists all privileges that match the filters set in the request. |
array of strings | 0 or more "privilege" strings |