The example shows how to construct a condition request for the Response code is one of "201,403". To better understand the process, read descriptions of Concepts and Test catalog template in the Test Center concepts section.

To create a valid condition statement:

  1. Run the Get the test catalog template operation to get the template for creating conditions. It contains the conditionTypes array with 18 conditionType:
    • RESPONSE_CODE
    • RESPONSE_HEADER
    • CACHE_KEY_QUERY_PARAMETERS
    • CACHING
    • CONTENT_PROVIDER_CODE
    • IGNORE_CASE_IN_CACHE_KEY
    • LAST_MILE_ACCELERATION_(GZIP_COMPRESSION)
    • LOG_REQUEST_DETAILS
    • ORIGIN_SERVER
    • PREFETCH_OBJECTS
    • REDIRECT
    • SURE_ROUTE
    • TIERED_DISTRIBUTION
    • VARIABLE
    • ALERTED_RULES
    • DENIED_RULE
    • POLICY_NAME
    • API_ID.

To learn more about these condition types, check the list of available conditions. Each of these conditionType relates to the specific conditionExpressions array and placeHolders.

  1. Go to the conditionType of your choice. Here, it's the RESPONSE_CODE.
{
   "conditionTypes":[
      {
         "conditionType":"RESPONSE_CODE",
         "conditionExpressions":[
            {
               "conditionExpressionId":1,
               "conditionExpression":"Response code is one of \"responseCodes\"",
               "examples":[
                  "Response code is one of \"401, 403, 404, 500, 501, 502\"",
                  "Response code is one of \"200\""
               ]
            }
         ],
         "placeHolders":[
            {
               "placeHolder":"responseCodes",
               "valueInputType":"MULTIPLE_VALUE",
               "valueDataType":"INTEGER",
               "supportsCustomValue":true,
               "valueSeparator":",",
               "availableValues":[
                  200,
                  300,
                  400,
                  500
               ]
            }
         ]
      }
   ]
}
  1. In the conditionExpressions array, in conditionExpression, check the structure of supported condition statement. In this case, it's "Response code is one of \"responseCodes\". Some statements require your input, the required values are in "". Here, you need to provide responseCodes.
  2. Check the placeHolders array to learn about values supported for responseCodes. In this example, we see that this input supports multiple values and they need to be integers.
  3. Check examples to make sure you statement is correct.