Rest Api Endpoint

Rest Api Endpoint nodes create endpoints for receiving HTTP requests. They must be placed inside a Rest Api node.

When requests are received a message is output to a connected Function node. Only one Function node may be connected to the output port. The connected Function node returns a response to be sent back for the HTTP request.

Message Formats

Stackery enables integration between AWS API Gateway methods and AWS Lambda functions using Lambda Proxy Integration. This mechanism supports rich and dynamic HTTP request/response handling.


When an HTTP request is received, the Rest Api Endpoint node outputs a message containing all the details of the request. Here is an overview of commonly used request properties:

Field Type Description
httpMethod string Method of the request. Example: GET
resource string Resource endpoint matching the path of the request. Example: /users/{id}
pathParameters Object Map of resource parameter values. Example: {"id": "5"}
queryStringParameters Object Map of query string parameter values. Example: {"admin": "true"}
headers Object Map of request header values. Example: {"Host": "", "Accept": "application/json"}
body Buffer Request body.
requestContext.sourceIp string IP Address of requesting client. Example:
requestContext.requestId string Request ID as a GUID. Example: a0a5150b-a050-11e6-895a-159872556d76

See for further details on the input message format.

Expected Response

The response message from the connected Function node contains the HTTP response information. Here is an overview of commonly used response properties:

Field Type Default Description
statusCode number (required) Status code of the response. Example: 202
headers Object {} Map of response header values. Example: {"Content-Type": "text/html", "Access-Control-Allow-Origin": ""}
body Buffer or string null Body of response. Example: {"name": "bob"}

See for further details on the response message format.



A label for the node in the canvas.


A specification for the paths that will be handled by this request node. The value can define a single path, a path with resource parameters, and/or a wildcard (*).



When a request matches an endpoint with resource parameters, the value of the parameters will be provided in the resourceParams field of the request message. For example, a request made to /users/5/locations/US/OR/97205/9584-Oak-Leaf-Rd would have the following request message fields:

  "pathname": "/users/5/locations/US/OR/97205/9584-Oak-Leaf-Rd",
  "endpoint": "/users/{id}/locations/*",
  "resourceParams": {
    "id": "5",
    "*": "US/OR/97205/9584-Oak-Leaf-Rd"

Try Stackery For Free

Gain control and visibility of your serverless operations from architecture design to application deployment and infrastructure monitoring.