Get current user
Get current user data
- Parameters
- Advanced call ?
Function GetCurrentUser(Val URL, Val Token) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | ReportPortal server URL |
| Token | --token | String | ✔ | Access token |
Returns
Map Of KeyAndValue - serialized JSON response from ReportPortal
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
URL = "tests.openintegrations.dev";
Token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX25hbWUiOiJzdXBlcmFkbWluIiwic2NvcGVzIjpbInVpIl0sImV4cCI6MTc2MjAwMDI3NiwiaWF0IjoxNzYxOTEzODc2LCJqdGkiOiI0NTI3YTc5OS0wN2...";
Result = OPI_ReportPortal.GetCurrentUser(URL, Token);
- Bash
- CMD/Bat
oint rportal GetCurrentUser \
--url "tests.openintegrations.dev" \
--token "***"
oint rportal GetCurrentUser ^
--url "tests.openintegrations.dev" ^
--token "***"
Result
{
"uuid": "e5f6d2db-e63a-48d5-915a-e8ac666d0b2a",
"active": true,
"loaded": true,
"id": 1,
"userId": "superadmin",
"email": "superadminemail@domain.com",
"photoId": "dXNlcnMvc3VwZXJhZG1pbg",
"fullName": "tester",
"accountType": "INTERNAL",
"userRole": "ADMINISTRATOR",
"photoLoaded": true,
"metadata": {
"last_login": 1779806267801,
"attachmentContentType": "image/jpeg"
},
"assignedProjects": {
"superadmin_personal": {
"projectId": 1,
"projectRole": "PROJECT_MANAGER",
"entryType": "PERSONAL"
},
"test": {
"projectId": 4,
"projectRole": "PROJECT_MANAGER",
"entryType": "INTERNAL"
}
}
}