HTTP Response

更新时间:
复制 MD 格式

The HTTP Response node acts as the endpoint of a business service. An API that starts with an HTTP Request node must end with an HTTP Response node to define the API response.

Prerequisites

The business service has been created. For more information, see Create a business service.

Node configuration

On the business logic editor page, select function nodes from the Nodes panel to configure the business flow. The following table describes the parameters for the HTTP Response node.

Parameter Description
Node name The name must be 30 characters or less and can contain Chinese characters, letters, digits, and underscores (_).
Output Defines the API response. You can set the output to one of the following value types:
  • A static value of a specific data type.
  • A dynamic value from another node, such as:
    • A child property of the payload from the immediately preceding node.
    • The payload object, or a child property of the payload, from any preceding node.
    • A request parameter from the initial API call.
  • The value of an existing global or local variable. For more information about adding variables, see Add a variable.
Return code The platform provides a set of default return codes. You can also add custom return codes, but they must not conflict with the system return codes.

Node output

The following example shows the output for a successful call. For failed calls, check the log.

{
    "code": 200,
    "data": {The object specified in the Output parameter, which can also be an array enclosed in square brackets [].},
    "message": "success",
    "localizedMsg": "Success"
}