Skip to main content

Update user

Changes the data of the selected user

Function UpdateUser(Val URL, Val Token, Val Login, Val UserStructure) Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringReportPortal server URL
Token--tokenStringAccess token
Login--loginStringUsers login
UserStructure--paramsStructure Of KeyAndValueNew user data. See. GetUserFieldsStructure
Returns

Map Of KeyAndValue - serialized JSON response from ReportPortal

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);
# 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"
}