Skyone
Skyone
English
English
  • Home
  • Data
    • Getting Started
      • Create an account
      • Recover Password
      • Quick Platform Guide
      • How to test the platform for free
      • Workspace
        • Creating a new Workspace
        • Find a Workspace
        • Sending an invitation to a Workspace
        • Editing a Workspace
      • Organizations
        • Creating an Organization
        • Organization Overview
        • Organization Management
        • Organization Monitoring
      • Settings and Preferences
        • Profile
        • Notifications
        • Usage and Billing
        • Users and Permissions
    • Modules
      • Module management
        • Creating a Module
        • Importing a Module
          • IAC Files - Integration as Code
        • Editing a module
        • Module Options
      • Settings and Operations
        • Module settings
          • Connectivity: Database
          • Connectivity: Email
          • Connectivity: REST
          • Connectivity: SOAP
          • Connectivity: File
          • Connectivity: RFC
          • Connected Account Management
        • Operations
          • Importing operations into REST Modules
          • Operation Management
        • Flows Using This Module
    • Monitoring
    • API Gateway
    • Terminals & Agent
      • Agent
        • Versions supported by Agent
        • How to Update the Agent Version
        • How to back up Agent files
      • Terminals
    • Data
      • Data Stack
        • Process Control
        • Data Stack Upload
        • File Actions
        • File Jobs
        • Data Job Parameters
        • Data Store
        • Data Share Features
        • ODBC
        • How to use the Data Engine Proxy
    • Integrations
      • Integration Management
        • Create integration
        • Import Integration
        • Edit Integration
        • Integration Options
        • Flows of this integration
      • Flows
        • Flow management
          • Creating a flow
          • Flow options
          • Flow Canva: configuring and editing the flow
            • Flow Canva: overview
            • Exception Handler
              • Exception Handler - Configuration
              • Exception Handler - Cases
            • Multicontext Flows
              • Example: Multicontext with an API Gateway
              • Example: Multicontext with a Time Trigger
            • Flow Settings
        • Triggers of a flow
          • API Gateway Triggers: Adding and Setting
          • AS2 Triggers: Adding and Setting
          • Queue Triggers: Adding and Setting
          • Flow Triggers: Adding and Setting
          • Time Triggers: Adding and Setting
          • Webhook Triggers: Adding and Setting
        • Tool Modules
          • AS2 Module
          • CSV Module
          • Data Transform Module
          • Data Balancer Module
          • EDI Module
          • Flow Call Module
          • IF Module
          • JavaScript Module
          • Log Module
          • Loop Do While Module
          • Loop For Module
          • Return Module
          • XML Module
          • Other Tool Modules
        • Module Header
        • Connecting components of a flow
        • Editing triggers and modules
        • Data Operations
          • Object Handling
            • Practical example: Handling variables
          • SMOP (Small Operations)
          • Parameterization rules
    • How to
      • Insert JSON into databases
      • Flattening: Data transformation using JSONata
      • How to use Form Data
      • Understanding recursion in JSONata
      • REST Module Output Consolidation
      • Isolated in execution: concept and application in variables
      • URL Parameters in API Gateway
      • Use case: API Gateway trigger parameters
      • Use case: Exception Handler in financial transactions
      • Use case: using Groups to manage access to flows
      • How to create a download endpoint and integrate with Power BI
      • Is it possible to use two triggers in a single flow?
      • How to set up WhatsApp in Skyone Studio
    • FAQ
    • GIGS: The complete guide
    • Glossary
  • Support
    • How do I request support?
    • Case Severity Levels
    • SLAs
    • Help & Resources
Powered by GitBook
On this page
  1. Data
  2. How to

How to use Form Data

PreviousFlattening: Data transformation using JSONataNextUnderstanding recursion in JSONata

Last updated 2 months ago

“Form Data” is a feature for sending complex data and files in REST applications. It is mainly used when there is a need to send multiple types of data (such as text, numbers and files) in a single request, facilitating integration with APIs that require data in specific formats.

To create a “Form Data”, follow these steps:

  1. Create a REST-type module.

  2. Then click on “New operation”. Fill in the “General information” and “Parameters”.

  3. The configuration step of the “Request” tab is crucial for Form Data. Click on the “Header” tab.

  4. Note that the platform automatically shows a value (application/json) for the “Context-Type” key. Change this value to multipart/form-data.

  1. Next, in the “Body” tab, the parameters must be sent as named fields with their respective values, which is different from the commonly adopted standard. This is essential so that the platform can read and interpret the data correctly.

The format to be used in the “Body” is:

key:value:type:filename

As such:

  • key: name of the Form Data key.

  • value: value in text or base64.

  • type (optional): value type (mime type). Read more in the suggested reading section at the end of the page.

  • filename (optional): file name, applicable when the value is in base64. APIs that receive this data use the filename to generate the corresponding file.

If you choose to use the filename, you must include the type.

You need to add a line break between each key.

Body example

In a scenario where we normally send a JSON in the body of platform requests, we would have something like the example below:

{
  "file": "base64",
  "action": "save",
  "user": "549875414515"
}

As I said before, the body in the data form works in a different way where following the steps of the assembly rule we would have something like this:

file: base64
action:save
user:549875414515

The platform does not work with JSON in form-data

The platform does not process files directly. Any file sent will be in base64. This string will then be processed by the platform, making it easier to send files such as images and documents.

  1. Finish the module creation steps.

  2. Done! You can now use this module in your integration flow.

Suggested reading:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Type
https://developer.mozilla.org/en-US/docs/Glossary/MIME_type
https://www.iana.org/assignments/media-types/media-types.xhtml
Example of inserting fields in the Body