Contact Us 1-800-596-4880

Validating Query Parameters and Headers

Restrict query parameters and headers on APIkit for REST to the names your RAML or OpenAPI Specification defines. Turn on strict validation in the APIkit Router configuration in Studio, or set the matching attributes on apikit:config in XML when you need repeatable deployments.

  1. In Studio, select APIkit Router.

    APIkit router highlighted
  2. Click Edit for your router configuration.

    Edit button highlighted in the APIkit router tab
  3. Select Query Parameters Strict Validations to restrict the usage of query parameters to the ones defined in your API specification.

  4. Select Headers Strict Validations to limit the headers to the ones specified in your API specification.

    *Query parameters Strict Validations* and *Headers Strict Validations* highlighted in the router configuration tab

You can also configure APIkit Router to validate headers and query parameters by updating the APIkit configuration in XML:

<apikit:config  name="api-config"
                api="api.raml"
                outboundHeadersMapName="outboundHeaders"
                httpStatusVarName="httpStatus"
                queryParamsStrictValidation="true"
                headersStrictValidation="true" />

Disable Validation of Query Parameters and Headers

Disable the validation of query parameters and headers to minimize latency.

  1. In Studio, select APIkit Router.

    APIkit router highlighted
  2. Click Edit for your router configuration.

    Edit button highlighted in the APIkit router tab
  3. Select Disable Validations.

    *Disable validations* option highlighted in the router configuration tab

You can also disable the validation of query parameters and headers to minimize latency by updating the APIkit configuration in XML:

<apikit:config  name="api-config"
                api="api.raml"
                outboundHeadersMapName="outboundHeaders"
                httpStatusVarName="httpStatus"
                disableValidations="true" />