This APS type defines the platform built-in User Management Service that exposes some operations to manage service users.
In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "UserManagement",
"id": "http://www.parallels.com/pa/pa-core-services/user-management/1.0",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"global": true
},
"operations": {
"createServiceUsers": {
"path": "users",
"verb": "POST",
"response": {
"type": "array",
"items": {
"type": "object"
}
},
"errorResponse": {
"type": "object"
}
},
"deleteServiceUsers": {
"path": "users",
"verb": "DELETE",
"errorResponse": {
"type": "object"
}
},
"updateServiceUsers": {
"path": "users",
"verb": "PUT",
"response": {
"type": "array",
"items": {
"type": "object"
}
},
"errorResponse": {
"type": "object"
}
},
"checkUserData": {
"path": "users/checkData",
"verb": "POST",
"errorResponse": {
"type": "object"
}
}
}
}
The APS type is used to create a singleton APS resource exposing its operations for API calls. The call syntax depends on the operation. For example, a call of an operation that accepts input parameters both in the URL string and in the body looks as follows:
POST /aps/2/services/user-manager/<operation-path>?<query-params>
{/*<body params>*/}
In the above call, the verb can be either GET, PUT, POST, or DELETE as specified in the definition of the operation.
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
POST |
/users |
If successful, this method returns a list of created users in the response body. |
Create several service users from the input list. |
|
DELETE |
/users |
If successful, this method returns the 200 OK standard status code. |
Delete service users specified in the input list of user IDs. |
|
PUT |
/users |
If successful, this method returns a list of updated users in the response body. |
Update the properties of the service users specified in the input list of user objects. |
|
POST |
/users/checkData |
If successful, this method returns the 200 OK standard status code. |
Check if the specified input user representation corresponds to the user object stored in the database. |
HTTP Request
POST /aps/2/services/user-manager/users
Description
Create several service users from the input list.
Returns
If successful, this method returns a list of created users in the response body.
HTTP Request
DELETE /aps/2/services/user-manager/users
Description
Delete service users specified in the input list of user IDs.
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
PUT /aps/2/services/user-manager/users
Description
Update the properties of the service users specified in the input list of user objects.
Returns
If successful, this method returns a list of updated users in the response body.
HTTP Request
POST /aps/2/services/user-manager/users/checkData
Description
Check if the specified input user representation corresponds to the user object stored in the database.
Returns
If successful, this method returns the 200 OK standard status code.
Create sample users by calling the following custom operation:
POST /aps/2/services/user-manager/users
Content-Type: application/json
X-Options-Send-Invitation: true
[
{
"aps": {
"type": "http://parallels.com/aps/types/pa/admin-user/1.2",
"id": "719f6815-1db7-4229-85d2-61f30ae8b9de"
},
"isAccountAdmin": true,
"login": "jbakham@aps.test",
"email": "jbakham@aps.test",
"givenName": "Jeff",
"familyName": "Bakham",
"displayName": "Jeff Bakham",
"telVoice": "1(888)1234567",
"addressPostal": {
"streetAddress":"11, ISVone",
"locality":"Herndon",
"region":"VA",
"countryName":"us",
"postalCode":"12345"
},
"organization": {
"aps": {
"id": "6344049b-8763-417d-837b-490ba0896f41"
}
}
},
{
"aps": {
"type": "http://parallels.com/aps/types/pa/service-user/1.2",
"id": "548e2fa9-2444-4b64-ac97-cb97f0d1ca77"
},
"isAccountAdmin": false,
"login": "tfisher@aps.test",
"email": "tfisher@aps.test",
"givenName": "Tom",
"familyName": "Fisher",
"displayName": "Tom Fisher",
"telVoice": "1(888)1230002",
"addressPostal": {
"streetAddress":"12, ISVusers",
"locality":"Herndon",
"region":"VA",
"countryName":"us",
"postalCode":"12345"
},
"organization": {
"aps": {
"id": "6344049b-8763-417d-837b-490ba0896f41"
}
}
}
]
In response, the APS controller must return the JSON representation of the created users.