Add parameters to methods

You can configure header, cookie, query, and body parameters for every method that you associate with a resource. This tells edge servers to look for a parameter in an incoming API request to that resource. Defining body parameters differs from other parameter definitions. Parameters can be useful for resource identification and filtering operations.

How to

  1. On the Register new API page, select the resource that you want to change.
  2. Expand the node of the method that you want to add parameters to.
  3. In the method panel, click Add parameter.
  4. Enter a meaningful Parameter name and, if you want, parameter Notes.
  5. Select the Parameter location in incoming requests.
    You can locate a parameter in a request header, cookie, URL query string, or POST request body. The request body option is only applicable to JSON or XML objects.
  6. Select the Parameter type.
  7. If the parameter type is String, Number, or Integer, specify the minimum and maximum parameter values in the Range, Length, or Range/Length fields.
  8. For header, cookie, and query parameters,, in the Required parameter area:
    • To specify the parameter as mandatory, select Yes.
    • To specify the parameter as optional, select No.
  9. For JSON/XML body parameters, follow these steps:
    1. Set the Would you like to define the JSON/XML body format for <parameter_name>? switch to Yes.
    2. In the controls that appear, repeat the parameter name you specified in step 4.
    3. Select the appropriate parameter type.
    4. If the body parameter is an array, select the Array check box.
    5. If the body parameter is a String, Number, or Integer, specify the minimum and maximum parameter values in the Range, Length, or Range/Length fields.
    6. If you want, enter descriptive parameter Notes.
    7. To specify the parameter as mandatory, select the Required check box.
      Important: If you want KSD to enforce the body parameter constraints on this resource, select the Required check box. For body parameters, this check box works independently of the Required parameter toggle applicable for other types of parameters.