WhoAmI
Returns detailed information about the user account that is currently using an access token. If the access token is not valid, the request will return information about the Guest account.
Syntax
Copy
POST <<i>host_address</i>>/api/openApi/WhoAmI
Content-Type: application/json
token=<<i>access_token</i>>
| Parameter | Description |
|---|---|
host_address
|
URL of the FintechOS platform server. |
access_token |
Access token used to connect to the API endpoint. For details, see GetToken. |
Response
Copy
{
"NumberOfResults": 0,
"TotalNumber": 0,
"RequestedSkip": 0,
"RequestedTake": 0,
"Records": [
{
"picture": "[{\"Name\":\"mypicture.png\",\"RealName\":\"mypicture_17ca7108-5997-403f-8d0e-d677e80916dc.png\",\"IsSuccess\":true,\"Message\":null,\"ClientScript\":null,\"Serialized\":null,\"ErrorCode\":0,\"UIResult\":null}]",
"systemUserTypeId": "f0481274-2b9f-4b14-b83b-c6cca4cb7c92",
"isGuest": null,
"externalId": 1,
"systemuserid": "c175bfe5-eafd-422f-a57f-7d85e806c38b",
"userName": "jdoe",
"confirmPassword": null,
"phoneNumber": null,
"isAuthorized": true,
"isAdministrator": true,
"portalId": null,
"externalSystemUserId": null,
"businessUnitId": "a3d2909b-df67-49d6-b7e0-2dc912c12484",
"email": "p2@fintechos.com",
"password": null,
"displayName": "Administrator",
"primaryattributedisplayname": "jdoe",
"aLookup1_name": "Back Office",
"systemUserTypeId_displayname": "Back Office",
"aLookup2_name": null,
"portalId_displayname": null,
"aLookup3_name": null,
"externalSystemUserId_displayname": null,
"aLookup4_name": "root",
"businessUnitId_displayname": "root"
}
],
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0,
"UIResult": null
}
| Key | Description |
|---|---|
picture
|
If a profile picture was uploaded for the user account, this field indicates the filename and the real filename (internal unique name) of that picture. |
systemUserTypeId
|
Unique internal ID for the user type, such as back office, guest, Portal, or other custom types. |
isGuest
|
|
externalId
|
Legacy feature |
systemuserid
|
Unique internal identifier for the user account. |
userName
|
Name used to log into the user account. |
confirmPassword
|
null - this attribute is populated only temporarily during password setup/reset |
phoneNumber
|
User's phone number |
isAuthorized
|
|
isAdministrator
|
|
portalId
|
Unique internal identifier of the assigned portal for portal system user types. |
externalSystemUserId
|
Legacy feature |
businessUnitId
|
Unique internal identifier of the business unit to which the user belongs. |
email
|
User account's email address. |
password
|
null - this attribute is populated only temporarily during password setup/reset |
displayName
|
User name, as it is displayed in the user interface. This value may differ from the actual user name. |
primaryattributedisplayname
|
Legacy feature |
aLookup1_name
|
User type, such as back office, guest, Portal, or other custom types. |
systemUserTypeId_displayname
|
User type, as it is displayed in the user interface. This value may differ from the actual user type name. |
aLookup2_name
|
Portal name (for portal type users only). |
portalId_displayname
|
Portal name, as it is displayed in the user interface (for portal type users only). This value may differ from the actual portal name. |
aLookup3_name
|
Legacy feature |
externalSystemUserId_displayname
|
Legacy feature |
aLookup4_name
|
Business unit to which the user belongs. |
businessUnitId_displayname
|
Business unit to which the user belongs, as it is displayed in the user interface. This value may differ from the actual business unit name. |
Examples
In this example:
- We request detailed account information for a user authenticated with the e3e92c13-c15c-4e29-a6f2-1c44abc130f7 access token on the https://FintechOSStudio server.
- The user has a profile picture called mypicture.png (internal unique name mypicture_17ca7108-5997-403f-8d0e-d677e80916dc.png).
- The user name is jdoe (internal unique ID 4afdc8a9-eb91-4359-81d6-c3a462fae866).
- The account has administrator privileges ("isAdministrator": true) and is currently active ("isAuthorized": true).
- The user belongs to the IT business unit (internal unique ID a3d2909b-df67-49d6-b7e0-2dc912c12484).
- The user's email address is jdoe@fintechos.com.
- The type of user account is Back Office.
Request
Copy
POST https://FintechOSStudio/api/openApi/WhoAmI
Content-Type: application/json
token="e3e92c13-c15c-4e29-a6f2-1c44abc130f7"
Response
Copy
{
"NumberOfResults": 0,
"TotalNumber": 0,
"RequestedSkip": 0,
"RequestedTake": 0,
"Records": [
{
"picture": "[{\"Name\":\"mypicture.png\",\"RealName\":\"mypicture_17ca7108-5997-403f-8d0e-d677e80916dc.png\",\"IsSuccess\":true,\"Message\":null,\"ClientScript\":null,\"Serialized\":null,\"ErrorCode\":0,\"UIResult\":null}]",
"systemUserTypeId": "f0481274-2b9f-4b14-b83b-c6cca4cb7c92",
"isGuest": null,
"externalId": 1,
"systemuserid": "4afdc8a9-eb91-4359-81d6-c3a462fae866",
"userName": "jdoe",
"confirmPassword": null,
"phoneNumber": null,
"isAuthorized": true,
"isAdministrator": true,
"portalId": null,
"externalSystemUserId": null,
"businessUnitId": "a3d2909b-df67-49d6-b7e0-2dc912c12484",
"email": "jdoe@fintechos.com",
"password": null,
"displayName": "Administrator",
"primaryattributedisplayname": "jdoe",
"aLookup1_name": "Back Office",
"systemUserTypeId_displayname": "Back Office",
"aLookup2_name": null,
"portalId_displayname": null,
"aLookup3_name": null,
"externalSystemUserId_displayname": null,
"aLookup4_name": "IT",
"businessUnitId_displayname": "IT"
}
],
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0,
"UIResult": null
}
In this example:
- We request detailed account information for a user authenticated with the ad50bb98-8d05-4624-9ddb-6e8d2f4adaff access token on the https://FintechOSStudio server.
- The user has a profile picture called Drawing1.png (internal unique name Drawing1_2443d9b9-b62e-4ce1-9052-6dfeadb9ecbb.png).
- The user name is p_001 (internal unique ID 061ddd8a-3d8d-4288-8d37-f6d98c689b76).
- The account is currently active ("isAuthorized": true).
- The user belongs to the p_users business unit (internal unique ID b107a646-b8d5-4e91-88cc-547c82ac7faa).
- The user's email address is p001@fintechos.com.
- The type of user account is Portal.
- The name of the portal is Stargate (internal unique ID 2d24acb9-3806-42f0-ac86-b8dbcc83cb0e).
Request
Copy
POST https://FintechOSStudio/api/openApi/WhoAmI
Content-Type: application/json
token="e3e92c13-c15c-4e29-a6f2-1c44abc130f7"
Response
Copy
{
"NumberOfResults": 0,
"TotalNumber": 0,
"RequestedSkip": 0,
"RequestedTake": 0,
"Records": [
{
"picture": "[{\"Name\":\"Drawing1.png\",\"RealName\":\"Drawing1_2443d9b9-b62e-4ce1-9052-6dfeadb9ecbb.png\",\"IsSuccess\":true,\"Message\":null,\"ClientScript\":null,\"Serialized\":null,\"ErrorCode\":0,\"UIResult\":null}]",
"systemUserTypeId": "1e795890-c652-4db2-8962-f4604232ca12",
"isGuest": false,
"externalId": null,
"systemuserid": "061ddd8a-3d8d-4288-8d37-f6d98c689b76",
"userName": "p_001",
"confirmPassword": null,
"phoneNumber": "+40123456789",
"isAuthorized": true,
"isAdministrator": false,
"portalId": "2d24acb9-3806-42f0-ac86-b8dbcc83cb0e",
"externalSystemUserId": null,
"businessUnitId": "b107a646-b8d5-4e91-88cc-547c82ac7faa",
"email": "p001@fintechos.com",
"password": null,
"displayName": "Portal 001",
"primaryattributedisplayname": "p_001",
"aLookup1_name": "Portal",
"systemUserTypeId_displayname": "Portal",
"aLookup2_name": "Stargate",
"portalId_displayname": "Stargate",
"aLookup3_name": null,
"externalSystemUserId_displayname": null,
"aLookup4_name": "p_users",
"businessUnitId_displayname": "p_users"
}
],
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0,
"UIResult": null
}
In this example, we request server https://FintechOSStudio for information about an invalid access token (bd50bb98-8d05-4624-9ddb-6e8d2f4adaff). This causes the server to return the details of the Guest account, as shown below:
Request
Copy
POST https://FintechOSStudio/api/openApi/WhoAmI
Content-Type: application/json
token="bd50bb98-8d05-4624-9ddb-6e8d2f4adaff"
Response
Copy
{
"NumberOfResults": 0,
"TotalNumber": 0,
"RequestedSkip": 0,
"RequestedTake": 0,
"Records": [
{
"picture": null,
"systemUserTypeId": "f0481274-2b9f-4b14-b83b-c6cca4cb7c92",
"isGuest": true,
"externalId": 0,
"systemuserid": "c175bfe5-eafd-422f-a57f-7d85e806c38b",
"userName": "Guest",
"confirmPassword": null,
"phoneNumber": null,
"isAuthorized": true,
"isAdministrator": false,
"portalId": null,
"externalSystemUserId": null,
"businessUnitId": "a3d2909b-df67-49d6-b7e0-2dc912c12484",
"email": "guest@guest.com",
"password": null,
"displayName": "Guest__",
"primaryattributedisplayname": "Guest",
"aLookup1_name": "Back Office",
"systemUserTypeId_displayname": "Back Office",
"aLookup2_name": null,
"portalId_displayname": null,
"aLookup3_name": null,
"externalSystemUserId_displayname": null,
"aLookup4_name": "root",
"businessUnitId_displayname": "root"
}
],
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0,
"UIResult": null
}