This type represents an administrative user.
The considered APS type (download
)
extends the PAUser,
AdminUser APS type(s) and looks as follows:
{
"name": "PAAdminUser",
"id": "http://parallels.com/aps/types/pa/admin-user/1.2",
"apsVersion": "2.0",
"implements": [
"http://parallels.com/aps/types/pa/user/1.2",
"http://aps-standard.org/types/core/admin-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-admin-users?<RQL-filter>
GET /aps/2/collections/admin-users
The APS type used to create a staff member 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 specifies the customer APS ID in the URL to create a link
to the customer’s 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/admin-user/1.2"
},
"isAccountAdmin": true,
"login": "mw@aps.test",
"password": "p@$$w0rd",
"email": "mw@aps.test",
"givenName": "Mike",
"familyName": "Wilson",
"telVoice": "1(888)1234567",
"addressPostal": {
"streetAddress":"11, ISVone",
"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/admin-user/1.2",
"id": "1c8763a4-ed0e-470b-a24e-4e05c7efb61e",
"status": "aps:ready",
"revision": 4,
"modified": "2016-09-27T08:11:34Z",
"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": "11, ISVone"
},
"disabled": false,
"displayName": "",
"email": "mw@aps.test",
"familyName": "Wilson",
"fullName": "",
"givenName": "Mike",
"isAccountAdmin": true,
"locale": "en_US",
"locked": false,
"login": "mw@aps.test",
"memberId": 6,
"servicesMode": "NONE",
"telVoice": "1#888#1234567#",
"userId": 6,
"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/1c8763a4-ed0e-470b-a24e-4e05c7efb61e/services"
}
}
}
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.
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”.