Function StackCustom function
Return Response
Set and return an API response.
Configuration:
Response Type: Specify the type of data you are returning.
Status Code: Set the status code for the response.
Supported response types include:
- JSON - RAW: Return arbitrary key-value pairs as a JSON object. You can define multiple fields.
- JSON - List: Return the response as a JSON list. This requires adding one field to the response fields.
- JSON - Struct: Return the response as a struct. This also requires adding one field to the response fields.
- Text: Return a simple text value. One field must be added to the response fields.
- Raw Bytes: Return a raw byte value. One field must be added to the response fields.
- Stream Bytes: Return a stream of bytes (e.g., an S3 object). This requires adding one field to the response fields.
- File: Return a file object as the response. One field must be added to the response fields.
- File Downloadable: Return a file that can be downloaded. One field must be added to the response fields.