Swiftybase
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:

  1. JSON - RAW: Return arbitrary key-value pairs as a JSON object. You can define multiple fields.
  2. JSON - List: Return the response as a JSON list. This requires adding one field to the response fields.
  3. JSON - Struct: Return the response as a struct. This also requires adding one field to the response fields.
  4. Text: Return a simple text value. One field must be added to the response fields.
  5. Raw Bytes: Return a raw byte value. One field must be added to the response fields.
  6. Stream Bytes: Return a stream of bytes (e.g., an S3 object). This requires adding one field to the response fields.
  7. File: Return a file object as the response. One field must be added to the response fields.
  8. File Downloadable: Return a file that can be downloaded. One field must be added to the response fields.

Call Function

On this page