httptest.update

Description

object httptest.update(object/array **webScenarios**)

This method allows to update existing web scenarios.

Parameters

(object/array) Web scenario properties to be updated.

The httptestid property must be defined for each web scenario, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.

Additionally to the standard web scenario properties, the method accepts the following parameters.

ParameterTypeDescription
stepsarrayScenario steps to replace existing steps.

Return values

(object) Returns an object containing the IDs of the updated web scenarios under the httptestid property.

Examples

Enabling a web scenario

Enable a web scenario, that is, set its status to “0”.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "httptest.update",
  4. "params": {
  5. "httptestid": "5",
  6. "status": 0
  7. },
  8. "auth": "700ca65537074ec963db7efabda78259",
  9. "id": 1
  10. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "httptestids": [
  5. "5"
  6. ]
  7. },
  8. "id": 1
  9. }

See also

Source

CHttpTest::update() in ui/include/classes/api/services/CHttpTest.php.