This type represents the Privilege Management Service that exposes common operations on privileges.
In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "PrivilegeManagement",
"id": "http://www.parallels.com/pa/pa-core-services/privilege-management/1.0",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"global": true
},
"operations": {
"registerPrivileges": {
"path": "privileges",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"privileges": {
"kind": "body",
"type": "array"
}
}
},
"unregisterPrivileges": {
"path": "privileges",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"privileges": {
"kind": "body",
"type": "array"
}
}
}
},
"structures": {
"Privilege": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Privilege title",
"required": true
},
"allowLocked": {
"type": "boolean",
"default": "false"
},
"area": {
"type": "string",
"description": "Privilege scope",
"default": "clients",
"enum": [
"provider",
"resellers",
"clients"
]
},
"name": {
"type": "string",
"description": "Privilege value",
"required": true
}
}
}
}
}
The APS type is used to create a singleton APS resource exposing its operations for API calls. The call syntax depends on the operation. For example, a call of an operation that accepts input parameters both in the URL string and in the body looks as follows:
POST /aps/2/services/privilege-manager/<operation-path>?<query-params>
{/*<body params>*/}
In the above call, the verb can be either GET, PUT, POST, or DELETE as specified in the definition of the operation.
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
POST |
/privileges |
If successful, this method returns the 200 OK standard status code. |
Register a list of privileges. |
|
DELETE |
/privileges |
If successful, this method returns the 200 OK standard status code. |
Unregister a list of privileges. |
HTTP Request
POST /aps/2/services/privilege-manager/privileges
Description
Register a list of privileges.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
privileges |
Array |
List of privileges Privilege to register. |
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
DELETE /aps/2/services/privilege-manager/privileges
Description
Unregister a list of privileges.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
privileges |
Array |
List of privileges Privilege to unregister. |
Returns
If successful, this method returns the 200 OK standard status code.
Privilege structure.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
title |
String |
Required |
The title of the structure. |
|
allowLocked |
Boolean |
Not Required |
false |
Allow the password lock mechanism. |
area |
Enum |
Not Required |
clients |
The type of accounts affected by the privilege:
“provider” - affects the provider’s users.
“resellers” - affects the users of the resellers.
“clients” - affects the users of the customers.
|
name |
String |
Required |
The name of the structure. |
For more details and examples on the use of custom privileges, refer to Integration with Platform Privileges.