PAServiceUser

This type represents a service user.

In this document:

GraphViz

Schema

The considered APS type (download) extends the PAUser, ServiceUser APS type(s) and looks as follows:

{
  "name": "PAServiceUser",
  "id": "http://parallels.com/aps/types/pa/service-user/1.2",
  "apsVersion": "2.0",
  "implements": [
    "http://parallels.com/aps/types/pa/user/1.2",
    "http://aps-standard.org/types/core/service-user/1.0"
  ]
}

The APS type is used to manage a collection of APS resources. To get a list of resources from that collection, use the following API call:

GET  /aps/2/collections/pa-service-users?<RQL-filter>

Examples

Get all Service Users

GET /aps/2/collections/pa-service-users

Create Service User

The APS type used to create a user contains a required relationship with the account. One of the ways to provision such objects is to follow the Provisioning Resources with Required Links operation. The REST request must require creation of a link to the users collection along with creation of the user to whom the link leads to:

POST /aps/2/resources/6344049b-8763-417d-837b-490ba0896f41/users/

{
   "aps": {
      "type": "http://parallels.com/aps/types/pa/service-user/1.2"
   },
   "isAccountAdmin": false,
   "login": "na@aps.test",
   "password": "p@$$w0rd",
   "email": "na@aps.test",
   "givenName": "Nick",
   "familyName": "Archer",
   "telVoice": "1(888)1230002",
   "addressPostal": {
      "streetAddress":"12, ISVusers",
      "locality":"Herndon",
      "region":"VA",
      "countryName":"us",
      "postalCode":"12345"
   }
}

The response must look similar to:

HTTP/1.1 200 OK

{
   "aps": {
      "type": "http://parallels.com/aps/types/pa/service-user/1.2",
      "id": "e21e19e0-5951-43a7-8103-8c5606398379",
      "status": "aps:ready",
      "revision": 5,
      "modified": "2016-09-27T09:16:30Z",
      "package": {
         "id": "e86ef200-5751-4c2c-b342-e65483ede6d0",
         "href": "/aps/2/packages/e86ef200-5751-4c2c-b342-e65483ede6d0"
      }
   },
   "addressPostal": {
      "countryName": "us",
      "locality": "Herndon",
      "postalCode": "12345",
      "region": "VA",
      "streetAddress": "12, ISVusers"
   },
   "disabled": false,
   "displayName": "",
   "email": "an@aps.test",
   "familyName": "Archer",
   "fullName": "",
   "givenName": "Nick",
   "isAccountAdmin": false,
   "locale": "en_US",
   "locked": false,
   "login": "na@aps.test",
   "servicesMode": "NONE",
   "telVoice": "1#888#1230002#",
   "userId": 8,
   "organization": {
      "aps": {
         "link": "strong",
         "href": "/aps/2/resources/6344049b-8763-417d-837b-490ba0896f41",
         "id": "6344049b-8763-417d-837b-490ba0896f41"
      }
   },
   "services": {
      "aps": {
         "link": "collection",
         "href": "/aps/2/resources/e21e19e0-5951-43a7-8103-8c5606398379/services"
      }
   }
}

Configure User

The following example illustrates how to change the phone number and postal address:

PUT /aps/2/resources/583f9d71-0e0b-4f65-8e76-56089de9378e

{
   "telCell": "+1 888 345-1234",
   "addressPostal": {
      "streetAddress":"88, ISV users",
      "locality":"Herndon",
      "region":"VA",
      "countryName":"US",
      "postalCode":"54387"
   }
}

In case of success, the return code must be “200 OK” and the returned payload contains the JSON representation of the updated user resource.

Remove User

Sometimes it is necessary to remove a user resource from the platform, for example, when the represented user leaves a company registered in the platform. The respective request looks as follows:

DELETE /aps/2/resources/583f9d71-0e0b-4f65-8e76-56089de9378e

In case of success, the return code must be “204 No content”.