Momen Docs
Go to Momen
  • Get Started
    • Introduction
    • Quick Start
    • Software Development Process
    • Editor Overview
  • Changelog
    • Latest Product Update
  • Build UI
    • Pages
    • Components
    • Canvas
    • Layout
    • Component - Display
    • Component - Input
    • Component - View
    • Component - List
    • Component - Tab View
    • Component - Select View
    • Component - Conditional View
    • Component - Others
    • Component - Map
    • Custom Component
  • Data
    • Overview
    • Data Model and Database
    • API
    • Variable
    • Parameter
    • Formula and Conditions
  • Actions
    • Overview
    • Request
    • Navigation
    • Actionflow
      • Custom Code
      • Database Trigger
    • AI
      • AI Data Model
      • AI Point
      • Vector Data Storage and Sorting
    • User Actions
    • Component Management
    • App and Page Management
    • Toast Notifications & Modal
    • Payment
    • SSO
    • Share
    • Location
    • File Management
    • QR Code
    • Clipboard
    • Conditional
    • Loop
  • Release and Growth
    • Publish Application
    • Upgrade Project
    • Multiple Clients
    • Permission
    • Log Service
    • SEO
    • Hosting Files
  • My Account and Community
    • My Wallet
    • Promoting Momen
    • Code Component
    • Collaboration
  • Debugging
    • How to Debug in Momen
    • Request Error Reference
  • Tutorial
    • How to Build an AI Needs Analysis Project?
    • How to Set Up Payment with Stripe Plugin?
    • How to Embed an Iframe Component into Your Momen Project?
    • How to Build Your Login Page?
    • How to Convert Momen App to Native Mobile App?
    • How to Build a CMS (MVP Version) in Hours?
    • How to Set a Countdown Timer When Sending a Verification Code
  • Template
    • AI Mental Health Assistant
    • Angry Dietitian
    • AI Help Center
    • AI Knowledge Base
    • SaaS Corporate Site
    • Blog
    • AI Feedback Tool
    • Feedback Tool, a Nod to Canny
    • Portfolio
    • Online Courses, a Nod to Udemy
    • Mobile Auto Repair AI Scheduler
Powered by GitBook
On this page
  • Add API
  • Edit API
  • 1. Select "Operation Type"
  • 2. Set the Request Format
  • Setting Default Values
  • Use API
  • Use as a Data Source
  • Use as an Action
  1. Data

API

Utilize Momen's API feature to effortlessly connect external data sources and applications.

PreviousData Model and DatabaseNextVariable

Last updated 1 day ago

An API is a bridge between different applications; when an application needs to connect with external data, it is often achieved through an API.

Before starting configuration in Momen, ensure you understand the basic components of an API: Method, Domain, Path, Headers, Query Parameters, and Body. For detailed information about APIs, please refer to online resources.

Next, we will use the example of "retrieving data from Airtable" to introduce the complete configuration process.

Add API

Open the "API" at the top left of the Editor and click "Add".

Edit API

1. Select "Operation Type"

This step determines whether the API is used as a data source or an action:

  • Query: Use the API as a data source for components (List, Page, etc.).

  • Mutation: Use the API as an action.

In this example, the API is directly used as a data source for a list, so "Query" is selected.

2. Set the Request Format

In this step, you need to determine the format of the API request and response. Momen provides two configuration methods:

  • Automatically parse the format by successfully sending a request (recommended).

  • Manually configure all content by yourself.

Automatically Parse the Format

First, open debug mode.

Then, complete the request method, domain, path, body, etc., and click "Send."

After a successful send, click "Advanced" to confirm whether the format is correct.

Confirm the "Request Parameters" and "Response Parameters" in sequence. If you are updating the API configuration, there will be both new and old configurations, requiring a merge operation.

Once everything is confirmed, you will have the request and response format of the API, and you can proceed to use it.

Setting Default Values

Once the structure of the request and response is determined, you can start setting default values for certain fields. After setting them, these fields no longer need to be assigned values when sending requests, making subsequent request configurations simpler.

At the same time, since the default values are stored on the backend, they are very secure and can also be used to store sensitive information, such as the Authorization in this example.

![](../.gitbook/assets/image (26).png)

Use API

Use as a Data Source

In the data source of List, Select View, and Page, you can select a data source type API.

During configuration, you need to specify which field in the API response is of list type and the required input parameters. Since the Authorization has already been set with a default value, it does not need to be filled in.

![](../.gitbook/assets/image (27).png)

Use as an Action

If you have configured a "Mutation" type API, you can find it under the "Request" category in the action list under "API."