Update user
Changes the data of the selected user
- Parameters
- Advanced call ?
Function UpdateUser(Val URL, Val Token, Val Login, Val UserStructure) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | ReportPortal server URL |
| Token | --token | String | ✔ | Access token |
| Login | --login | String | ✔ | Users login |
| UserStructure | --params | Structure Of KeyAndValue | ✔ | New user data. See. GetUserFieldsStructure |
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...";
Login = "test";
UserStructure = New Structure;
UserStructure.Insert("fullName", "Updated Test User");
UserStructure.Insert("email" , "updated@example.com");
Result = OPI_ReportPortal.UpdateUser(URL, Token, Login, UserStructure);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint rportal UpdateUser \
--url "tests.openintegrations.dev" \
--token "***" \
--login "test" \
--params "{'fullName':'Updated Test User','email':'updated@example.com'}"
:: JSON data can also be passed as a path to a .json file
oint rportal UpdateUser ^
--url "tests.openintegrations.dev" ^
--token "***" ^
--login "test" ^
--params "{'fullName':'Updated Test User','email':'updated@example.com'}"
Result
{
"message": "User with login = 'test' successfully updated"
}