Parameter settings

更新时间:
复制 MD 格式

Parameter settings apply to HTTP API services. APIs created by automatic import do not require parameter configuration.

  • Request Parameters: Configure dynamic path parameters and URL query parameters. Parameter names must be unique.

    • Parameter Name: Required. The parameter name.

      Note

      For a Path parameter, the name must match the one in the request path. For example, if the request path is /pets/${id}, the parameter name must be id.

    • Parameter Location: Required. Specifies whether the parameter is in the path or query string.

    • Type: Required. Valid values: String, Int, Long, Float, Double, and Boolean.

    • Default Value: Optional. The default parameter value.

    • Description: Optional. A description of the parameter.

  • Request Body: Configure the data model and Content-Type of the request body.

    Note

    The request body configuration is available only for APIs called with the POST method.

    • Request Body Type: Valid values: String, Int, Long, Float, Double, Boolean, List, Map, and Object.

    • Message Type: Valid values: application/json, application/x-www-form-urlencoded, and application/protobuf.

  • Response Result: Configure the response result type.

    • Response Result Type: A basic data type or a custom data model.