Application Packaging Standard

Last updated 18-Mar-2019

PAAccount

This type represents an account, either a Customer, Reseller, or Provider in the platform. One administrative user, a User resource, must be created along with an account resource. The user resource depends on the account in accordance with the declared relationship. Additional administrative users may be added or removed, but it is prohibited to remove the only remaining administrative user.

Schema

The considered APS type (download) extends the Account APS type(s) and looks as follows:

{
  "name": "PAAccount",
  "id": "http://parallels.com/aps/types/pa/account/1.2",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/account/1.0"
  ],
  "relations": {
    "subscriptions": {
      "type": "http://parallels.com/aps/types/pa/subscription/1.0",
      "collection": true
    },
    "domains": {
      "type": "http://parallels.com/aps/types/pa/dns/zone/1.0",
      "collection": true
    },
    "templates": {
      "type": "http://parallels.com/aps/types/pa/serviceTemplate/1.0",
      "collection": true
    },
    "brands": {
      "type": "http://parallels.com/aps/types/pa/brand/1.0",
      "collection": true
    },
    "publicActor": {
      "type": "http://parallels.com/aps/types/pa/account/public/actor/1.0",
      "assign": {
        "access": {
          "referrer": false
        }
      }
    },
    "parent": {
      "type": "http://parallels.com/aps/types/pa/account/1.2"
    },
    "accounts": {
      "type": "http://parallels.com/aps/types/pa/account/1.2",
      "collection": true,
      "assign": {
        "access": {
          "referrer": false
        }
      }
    },
    "adminContactUser": {
      "type": "http://aps-standard.org/types/core/user/1.0",
      "backrel": false
    },
    "billingContactUser": {
      "type": "http://aps-standard.org/types/core/user/1.0",
      "backrel": false
    },
    "techContactUser": {
      "type": "http://aps-standard.org/types/core/user/1.0",
      "backrel": false
    },
    "bssAccountInfo": {
      "type": "http://parallels.com/pa/bss-account-info/1.0"
    }
  },
  "properties": {
    "id": {
      "type": "integer",
      "required": true,
      "final": true
    },
    "type": {
      "type": "string",
      "required": true,
      "default": "CLIENT",
      "enum": [
        "ADMIN",
        "RESELLER",
        "CLIENT",
        "SYSTEM"
      ],
      "enumTitles": [
        "Provider",
        "Reseller",
        "Customer",
        "System"
      ]
    },
    "personal": {
      "type": "boolean",
      "required": true,
      "default": "true"
    },
    "locked": {
      "type": "boolean",
      "default": "false"
    },
    "adminContact": {
      "type": "Contact"
    },
    "billingContact": {
      "type": "Contact"
    },
    "techContact": {
      "type": "Contact"
    },
    "updatedBy": {
      "type": "string"
    },
    "externalId": {
      "type": "string",
      "access": {
        "global": false
      }
    }
  },
  "operations": {
    "resources": {
      "path": "/resources",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "SubscriptionResourceList"
        }
      },
      "errorResponse": {
        "type": "object"
      },
      "access": {
        "referrer": false
      }
    }
  },
  "structures": {
    "Contact": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "givenName": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "middleName": {
          "type": "string"
        },
        "organizationName": {
          "type": "string"
        },
        "telVoice": {
          "type": "string"
        },
        "telFax": {
          "type": "string"
        },
        "locale": {
          "type": "string",
          "default": "en_US"
        }
      }
    },
    "SubscriptionResourceList": {
      "type": "object",
      "properties": {
        "subscriptionId": {
          "type": "string",
          "required": true
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "http://aps-standard.org/types/core/subscription/1.0#SubscriptionResource"
          }
        }
      }
    }
  }
}

Properties

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
adminContact Contact Not Required   Administrative Contact data.
billingContact Contact Not Required   Billing Contact data.
id Integer Required Final   Account ID in the platform.
locked Boolean Not Required false The account is locked (true) or unlocked (false).
personal Boolean Required true The account represents a person (true) or an organization (false).
techContact Contact Not Required   Technical Contact data.
type enum AccountType Required CLIENT Identifies an account type AccountType.

Relationship

NAME TYPE REQUIRED DESCRIPTION
accounts Collection of PAAccount No Child accounts (resellers and customers) if the current account is the provider or a reseller.
adminContactUser User No Administrative user of the account.
billingContactUser User No Billing user of the account.
brands Collection of paBrand No Brands created for the account.
bssAccountInfo BssAccountInformation No BSS account data; presents only if billing is enabled for the account.
domains Collection of PAHostedDomain No Domains owned by the account.
parent PAAccount No Parent account (the provider or a reseller, also known as the vendor for the considered account).
publicActor PublicActor No Public Actor related to the account is a system built-in object. Normally, APS applications do not use it.
subscriptions Collection of PASubscription No Subscriptions owned by the account.
techContactUser User No Technical user of the account.
templates Collection of PAServiceTemplate No Service templates owned by the account (the provider or a reseller).

Enums

NAME VALUES DESCRIPTION
AccountType
  • NOT_A_TYPE
  • ADMIN
  • RESELLER
  • CLIENT
  • SYSTEM
Account Type:
ADMIN - Provider
RESELLER - Reseller
CLIENT - Customer
SYSTEM - System (for the platform internal operations)

Custom Operations

OPERATION VERB PATH RETURNS Description
resources GET /resources   “/resources” custom operation (GET) returns resources SubscriptionResourceList for all subscriptions owned by the account.

resources

HTTP Request

GET /aps/2/resources/{aps-id}/resources

Description

“/resources” custom operation (GET) returns resources SubscriptionResourceList for all subscriptions owned by the account.

Returns

Structures

Contact

Contains contact data of a user, such as full name, email, and locale.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
email String Not Required   Email address.
familyName String Not Required   Family Name.
givenName String Not Required   Given Name.
locale String Not Required en_US Locale.
middleName String Not Required   Middle Name.
organizationName String Not Required   Organization Name.
telFax String Not Required   Fax number.
telVoice String Not Required   Phone number.

SubscriptionResourceList

Contains list of resources for a subscription.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
resources custom values array Not Required   List of resources.
subscriptionId String Required   Subscription UUID.

Examples

Please find general description of create-read-update-delete (CRUD) operations with resources, properties, and structures respectively at:

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