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
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
avatarURIoptional | String | URI for loading employee avatar. If no picture exists, this will be skipped. |
impersonationsoptional | Object[] | Collection of impersonators. Only for User role. |
| active | Boolean | true = You are impersonating this user now. |
emailoptional | String | Impersonator's e-mail. |
empNooptional | String | Impersonator's employee no. |
| fullName | String | Impersonator's full name. |
initialsoptional | String | Impersonator's initials. |
| userId | String | Impersonator's user ID. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |