General - Get user impersonations

API Url

Used for loading user impersonations.

GET
http://localhost:16010/ProMarkREST/rest/General/user_info/impersonations

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    avatarURIoptionalString

URI for loading employee avatar. If no picture exists, this will be skipped.

      impersonationsoptionalObject[]

Collection of impersonators. Only for User role.

        activeBoolean

true = You are impersonating this user now.

        emailoptionalString

Impersonator's e-mail.

        empNooptionalString

Impersonator's employee no.

        fullNameString

Impersonator's full name.

        initialsoptionalString

Impersonator's initials.

        userIdString

Impersonator's user ID.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"impersonations": [
{
"userId": "AARB",
"fullName": "Employee Mayer",
"empNo": "4",
"initials": "PD",
"email": "111@yy.ttt",
"active": false,
"avatarURI": "/rest/Resources/employees/184/avatar?eTag=771432258000"
},
{
"userId": "ABC",
"fullName": "test",
"active": false
}
]
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.