Application Packaging Standard

Last updated 18-Mar-2019

PrivilegeManagement

This type represents the Privilege Management Service that exposes common operations on privileges.

Schema

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
        }
      }
    }
  }
}

Custom Operations

OPERATION VERB PATH RETURNS Description
registerPrivileges POST privileges If successful, this method returns the 200 OK standard status code. Register a list of privileges.
unregisterPrivileges DELETE privileges If successful, this method returns the 200 OK standard status code. Unregister a list of privileges.

registerPrivileges

HTTP Request

POST /aps/2/resources/{aps-id}/privileges

Description

Register a list of privileges.

Parameters

PARAMETER TYPE DESCRIPTION
privileges Privilege List of privileges Privilege to register.

Returns

If successful, this method returns the 200 OK standard status code.

unregisterPrivileges

HTTP Request

DELETE /aps/2/resources/{aps-id}/privileges

Description

Unregister a list of privileges.

Parameters

PARAMETER TYPE DESCRIPTION
privileges Privilege List of privileges Privilege to unregister.

Returns

If successful, this method returns the 200 OK standard status code.

Structures

Privilege

Privilege structure.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
allowLocked Boolean Not Required false Allow the password lock mechanism.
area String 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.
title String Required   The title of the structure.

Examples

Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.

PAUser