Send Docs Feedback

Apigee Test is not being developed further and may not be available for all organizations. It functions “as is,” and is not supported. There are no service-level agreements (SLAs) for bug fixes. Get help in the Apigee Community.

Update a Test Case

Resource Summary


Content Type



Apigee Test,



Update a Test Case

Updates a Test Case by ID. (To get the IDs of your Test Cases, use List Test Cases.)


Consider backing up a Test Case before updating it. To back it up, Get a Test Case and save the response as a file.


When updating a Test Case, you must supply at least the Test Case info section with the name and at least one Step. Also, because at least one Step is required in a Test Case, the ID of one Step is always bound to the Test Case in the database. When you first create a Test Case, the first Step is usually the ID bound to the Test Case. You must include at least this Step ID in the update call.

  • Rename a Test Case: Simply change the name in the update call. If you want to leave the existing Steps as they are, be sure to include all existing Step data in the payload, including Step IDs.
  • Change, reorder, or delete Steps: The payload you include in a Step update becomes the new Test Case with Steps in the order you specify. You're not required to include Step IDs in the payload (besides the Step ID bound to the Test Case). However, if you change Steps without providing their existing IDs, the original Steps are deleted from the database and replaced by the new Steps that have new IDs.

    To change an existing Step and retain its existing ID, be sure to include the Step id in the payload.


If you get a database error in the response, the likely cause is that you didn't include the ID of the original Step that's bound to the Test Case.


You cannot change the value of the Test Case webhook.

Resource URL /organizations/{org_name}/testcases/{testcase_id}

Header Parameters

Name Values Description


Request Body

In the payload, be sure to escape any quotation marks (\") that are to be used literally.

Property Description
statusCode Valid values: 2xx, 200, 201, 202, 3xx, 301, 302, 307, 4xx, 400, 401, 403, 404, 405, 415, 5xx, 500, 502, 503
extractVariables type

Valid values:res_header (Response Header) or jsonpath (Response Body (JSON))

If you want to extract a variable in a response payload for proxy chaining or asserting a response, you can get the variable from the response header or response body using JSONPath.

 "extractVariables": [
            "type": "res_header",
            "name": "Custom name for the variable",
            "value": "Actual name of the header variable (if using the response header) or a JSONPath (if using the response body)."
assertion variable types

ext_var (Extract Variable) or res_header (Response Header)

If you extracted a variable, you can use its value to assert the response (determine whether the call was a success or failure).

"variables": [
              "name": "Name of the custom variable you created",
              "value": "Expected value for the call to be determined a success.",
              "type": "ext_var"

HTTP Basic

OAuth 2.0



Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Response Error Details

  • HTTP Code
    Error Code
  • 400

    Bad Request

  • 401


  • 403


  • 500

    Internal Server Error


Help or comments?