In this document:
In many cases, services (mail boxes, storage, virtual servers, etc.) acquired by a customer must be assigned to service users. In this scenario, you will create one or more services users linked with the customer account created earlier.
Source data is similar to the data used for creating the staff member, except for the following:
Security token - the customer admin’s token.
Warning
Do not use the provider admin’s token when creating a service user for a customer.
APS type - PAServiceUser, which ID is “http://parallels.com/aps/types/pa/service-user/1.2”.
The isAdmin
property - false.
Before you start creating a new user, verify if there is a user with similar properties.
Get a list of all service users:
GET /aps/2/resources?implementing(http://parallels.com/aps/types/pa/service-user/1.2)
Verify if there is a user with the email address belonging to the new user:
GET /aps/2/resources?implementing(http://parallels.com/aps/types/pa/user/1.2),eq(email,na@aps.test)
The APS type used to create a user contains a required relationship with the account.
The best way to provision such objects is to follow the Provisioning Resources with Required Links
operation. The REST request must require creation of a link on the users
collection along
with creation of the user to whom the link leads to:
POST /aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed/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"
},
"organization": {
"aps": {
"link": "strong",
"href": "aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed",
"id": "e489cb96-e988-475a-854b-0d0a67a18aed"
}
}
}
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/e489cb96-e988-475a-854b-0d0a67a18aed",
"id": "e489cb96-e988-475a-854b-0d0a67a18aed"
}
},
"services": {
"aps": {
"link": "collection",
"href": "/aps/2/resources/e21e19e0-5951-43a7-8103-8c5606398379/services"
}
}
}
The same way, you can create more users.
You have successfully created service users.
You can use additional verification of the user existence: