Skip to main content

Update item

Updates data of a test item by ID

Function UpdateItem(Val URL, Val Token, Val Project, Val ElementID, Val ElementStructure) Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringReportPortal server URL
Token--tokenStringAccess token
Project--projStringProject ID
ElementID--idNumberTest item ID
ElementStructure--paramsStructure Of KeyAndValueItem parameters. See GetItemStructure
Returns

Map Of KeyAndValue - serialized JSON response from ReportPortal

tip

Numeric item ID can be obtained by UUID using the GetItem function


1C:Enterprise/OneScript code example
URL = "tests.openintegrations.dev";
Token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX25hbWUiOiJzdXBlcmFkbWluIiwic2NvcGVzIjpbInVpIl0sImV4cCI6MTc2MjAwMDI3NiwiaWF0IjoxNzYxOTEzODc2LCJqdGkiOiI0NTI3YTc5OS0wN2...";
ElementID = "";
Project = "Test";

LaunchStructure = New Structure;
LaunchStructure.Insert("description", "New description");

Result = OPI_ReportPortal.UpdateItem(URL, Token, Project, ElementID, LaunchStructure);
# JSON data can also be passed as a path to a .json file

oint rportal UpdateItem \
--url "tests.openintegrations.dev" \
--token "***" \
--proj "Test" \
--id 172409 \
--params "{'description':'New description'}"
Result
{
"message": "TestItem with ID = '172409' successfully updated."
}