This is the base APS type for other platform user types.
In this document:
The considered APS type (download
)
extends the User APS type(s) and looks as follows:
{
"name": "PAUser",
"id": "http://parallels.com/aps/types/pa/user/1.2",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/user/1.0"
],
"relations": {
"organization": {
"type": "http://aps-standard.org/types/core/account/1.0",
"required": true
}
},
"properties": {
"memberId": {
"type": "integer",
"description": "Member id",
"final": true
},
"userId": {
"type": "integer",
"description": "User id",
"final": true
},
"subscriptionId": {
"type": "integer",
"description": "Subscription id"
},
"isAccountAdmin": {
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"locked": {
"type": "boolean",
"readonly": true,
"default": "false"
},
"servicesMode": {
"type": "string",
"required": true,
"default": "NONE",
"enum": [
"NONE",
"PRIVATE",
"PUBLIC"
],
"enumTitles": [
"No services assigned.",
"Only services from the private subscription assigned to the user.",
"Services from public subscriptions assigned to the user."
]
},
"serviceReferrerId": {
"type": "string"
},
"invitationDate": {
"type": "string",
"readonly": true,
"format": "date-time"
}
},
"operations": {
"invite": {
"path": "invite",
"verb": "POST",
"errorResponse": {
"type": "object"
}
},
"activate": {
"path": "activate",
"verb": "POST",
"errorResponse": {
"type": "object"
}
},
"resetPassword": {
"path": "resetPassword",
"verb": "POST",
"errorResponse": {
"type": "object"
}
},
"unlock": {
"path": "unlock",
"verb": "POST",
"errorResponse": {
"type": "object"
}
},
"disable": {
"path": "disable",
"verb": "POST",
"errorResponse": {
"type": "object"
}
},
"enable": {
"path": "enable",
"verb": "POST",
"errorResponse": {
"type": "object"
}
},
"loginHistory": {
"path": "loginHistory",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "UserLoginHistoryItem"
}
},
"errorResponse": {
"type": "object"
}
},
"setAvatar": {
"path": "avatar",
"verb": "PUT",
"errorResponse": {
"type": "object"
}
},
"removeAvatar": {
"path": "avatar",
"verb": "DELETE",
"errorResponse": {
"type": "object"
}
},
"listPrivileges": {
"path": "privileges",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "string"
}
},
"errorResponse": {
"type": "object"
}
}
},
"structures": {
"UserLoginHistoryItem": {
"type": "object",
"properties": {
"loginTime": {
"type": "string",
"format": "date-time"
},
"ipAddress": {
"type": "string"
}
}
}
}
}
NAME | TYPE | ATTRIBUTES | DEFAULT | DESCRIPTION |
---|---|---|---|---|
disabled | Boolean | Not Required | The flag that shows if the user is inactive (true) or active (false). | |
invitationDate | Date | Not Required Read Only | Date and time when the invitation was sent to the user. | |
isAccountAdmin | Boolean | Not Required | If true, the user has administrative privileges in the control panel. Otherwise, this is a service user (service consumer). | |
locked | Boolean | Not Required Read Only | false | The lock flag that shows if the password protection system locked the user (true) or not (false). |
memberId | Integer | Not Required Final | Member ID, unique in scope of all users with administrative privileges in the platform. | |
serviceReferrerId | String | Not Required | Service referrer ID. | |
servicesMode | String | Required | NONE | Specifies which of the following service types are assigned to the user:
NONE – no services
assigned.
PRIVATE – at least one service from the private subscription assigned.
PUBLIC – only
services from public (non-private) subscriptions assigned.
|
subscriptionId | Integer | Not Required | The platform internal ID of the subscription that the user was created from. The subscription is also known as the private subscription for the user. | |
userId | Integer | Not Required Final | User ID, unique in scope of all users in the platform. |
NAME | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
organization | Account | Yes | Account (http://aps-standard.org/types/core/account/1.0) the user works for. |
NAME | VALUES | DESCRIPTION |
---|---|---|
ServiceMode |
|
Service mode:
NONE - No services are assigned to the user.PRIVATE - Only services from
the private subscription are assigned to the user.PUBLIC - Services from public subscriptions
are assigned to the user. |
OPERATION | VERB | PATH | RETURNS | Description |
---|---|---|---|---|
activate | POST | activate | If successful, this method returns the 200 OK standard status code. | Activate the user. |
disable | POST | disable | If successful, this method returns the 200 OK standard status code. | Disable the user and the related services. |
enable | POST | enable | If successful, this method returns the 200 OK standard status code. | Enable the user and the related services. |
invite | POST | invite | If successful, this method returns the 200 OK standard status code. | Send an invitation to the newly created user. |
listPrivileges | GET | privileges | If successful, this method returns a list of user’s privileges in the response body. | Get a list of the user privileges. |
loginHistory | GET | loginHistory | If successful, this method returns a list of the user login history in the response body using the (date-time, IP address) format. | Get the login history of the user. |
removeAvatar | DELETE | avatar | If successful, this method returns the 200 OK standard status code. | Delete the “avatar” objext (for example, photo) of the user. |
resetPassword | POST | resetPassword | If successful, this method returns the 200 OK standard status code. | Reset the user’s password. |
setAvatar | PUT | avatar | If successful, this method returns the 200 OK standard status code. | Update the “avatar” object (for example, photo) of the user. |
unlock | POST | unlock | If successful, this method returns the 200 OK standard status code. | Remove restriction enforced by the password protection mechanism. |
HTTP Request
POST /aps/2/resources/{aps-id}/activate
Description
Activate the user.
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
POST /aps/2/resources/{aps-id}/disable
Description
Disable the user and the related services.
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
POST /aps/2/resources/{aps-id}/enable
Description
Enable the user and the related services.
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
POST /aps/2/resources/{aps-id}/invite
Description
Send an invitation to the newly created user.
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
GET /aps/2/resources/{aps-id}/privileges
Description
Get a list of the user privileges.
Returns
If successful, this method returns a list of user’s privileges in the response body.
HTTP Request
GET /aps/2/resources/{aps-id}/loginHistory
Description
Get the login history of the user.
Returns
If successful, this method returns a list of the user login history in the response body using the (date-time, IP address) format.
HTTP Request
DELETE /aps/2/resources/{aps-id}/avatar
Description
Delete the “avatar” objext (for example, photo) of the user.
Parameters
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
identityId | String | Identity Id |
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
POST /aps/2/resources/{aps-id}/resetPassword
Description
Reset the user’s password.
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
PUT /aps/2/resources/{aps-id}/avatar
Description
Update the “avatar” object (for example, photo) of the user.
Parameters
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
dataUrl | String | URL |
identityId | String | Identity Id |
Returns
If successful, this method returns the 200 OK standard status code.
HTTP Request
POST /aps/2/resources/{aps-id}/unlock
Description
Remove restriction enforced by the password protection mechanism.
Returns
If successful, this method returns the 200 OK standard status code.
An item in the user login history.
NAME | TYPE | ATTRIBUTES | DEFAULT | DESCRIPTION |
---|---|---|---|---|
ipAddress | String | Not Required | IP address of the user’s computer. | |
loginTime | Date | Not Required | The date of the user login. |
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.