Skip to main content

Parameters

See plugin common configurations for configuration options available to all plugins.

  • request

    object


    required


    Request body transformation configuration.

    • input_format

      string


      vaild vaule:

      xml, json, encoded, args, or plain


      Request body original media type. If unspecified, the value would be determined by the Content-Type header to apply the corresponding decoder.

      The xml option corresponds to text/xml media type. The json option corresponds to application/json media type. The encoded option corresponds to application/x-www-form-urlencoded media type. The args option corresponds to GET requests, and the plain option corresponds to text/plain media type.

      If the media type is neither type, the value would be left unset and the transformation template will be directly applied.

    • template

      string


      required


      Request body transformation template. The template uses lua-resty-template syntax. See the template syntax for more details.

      You can also use auxiliary functions _escape_json() and _escape_xml() to escape special characters such as double quotes, _body to access request body, and _ctx to access context variables. See examples to learn more.

    • template_is_base64

      boolean


      Set to true if the template is base64 encoded.

  • response

    object


    Response body transformation configuration.

    • input_format

      string


      vaild vaule:

      xml or json


      Response body original media type. If unspecified, the value would be determined by the Content-Type header to apply the corresponding decoder. If the media type is neither xml nor json, the value would be left unset and the transformation template will be directly applied.

    • template

      string


      required


      Response body transformation template.

    • template_is_base64

      boolean


      Set to true if the template is base64 encoded.


API7.ai Logo

API Management for Modern Architectures with Edge, API Gateway, Kubernetes, and Service Mesh.

Product

API7 Cloud

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN Ltd. 2019 – 2024. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the

Apache Software Foundation