Contact Us 1-800-596-4880

Validating Query Parameters and Headers

Configure APIkit Router to validate headers and query parameters, restricting them to the attributes specified within your API specification.

  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 code as follows:

<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 code as follows:

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