Lowcoder Documentation
  • Lowcoder overview
    • The "Hello World" walk
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Google Cloud Platform
      • Easypanel
      • Heroku
      • Raspberry Pi
      • Access local database or API
      • Update MongoDB Versions
      • Lowcoder Version Update
      • Traefik loadbalancer
      • SMTP Server
      • Migration from Openblocks
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
      • SAAS Mode
      • Enterprise Mode
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • Lowcoder Marketplace
  • ✨Build Applications
    • Create a new App
      • App(s) Navigation
      • Modules
      • Version and Release Management
    • App Editor
      • Query & Editing Roundtrips
      • Bulk Editing
      • Keyboard shortcuts
      • Data selection & Javascript
      • Layers
      • Visual Components
        • Common Component Settings
        • Messages / Toast
        • Dashboard & Reporting
          • Table
          • Charts and graphs
            • Bar Chart
            • Line Chart
            • Pie Chart
            • Scatter Chart
            • CandleStick Chart
            • Funnel Chart
            • Gauge Chart
            • Graph Chart
            • Heatmap Chart
            • Radar Chart
            • Sankey Chart
            • Suburst Chart
            • Theme River Chart
            • Tree Chart
            • Treemap Chart
            • Mermaid Chart
          • Google Maps
        • Layout & Navigation
          • List View
          • Drawer
          • Modal
          • Navigation
          • Cascader
          • Tree / Tree Select
          • Link
          • Floating Button
          • Text
          • Step Control
          • Page Layout
          • Content Card
          • Tabbed Container
        • Data Collection & Forms
          • Form
          • Input Field Types
          • JSON Schema Form
        • Meeting & Collaboration
        • Project Management
        • Calendar & Scheduling
          • Calendar
          • Date & Date Range
          • Time & Time Range
        • Document & File Management
          • File upload
        • Item & Signature Handling
        • Multimedia & Animation
          • Image
        • Integration & Extension
        • Legacy & Deprecated
      • Option lists
      • Date handling
      • Use Markdown
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
    • Video Calls in Lowcoder
  • 🚀Connect your Data
    • Data source basics
      • Configure IP allowlists
    • Data sources in Lowcoder
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • Supabase
          • Supabase PostgreSQL
          • Supabase Assets API
          • Supabase RealTime
          • Supabase OAuth
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embed an App
      • Embed App in HTML Pages
      • Embed App in WordPress Pages
      • Embed Apps in React
      • Embed Apps in NEXT.JS
      • Native embed SDK
        • Build the SDK from Source
  • 🔥Lowcoder Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • Lowcoder Open REST API
  • Lowcoder for Enterprise
    • Custom branding
Powered by GitBook
LogoLogo

More to try...

  • Lowcoder Website
  • Free Cloud Platform
  • Github
  • Discord

© Lowcoder Software LTD

On this page
  • Authentication
  • Session Cookie
  • API Key
  • OpenAPI Specification & Postman Collection
  • Single Docker Deployment
  • Multi-Docker Deployment
  • app.lowcoder.cloud
  • Using Lowcoder API - inside Lowcoder Apps

Was this helpful?

  1. Lowcoder Extension

Lowcoder Open REST API

PreviousCustom componentNextCustom branding

Last updated 8 months ago

Was this helpful?

Lowcoder comes with a feature-rich REST API, so you can use it in Lowcoder Apps or extend Lowcoder with new functionality.

On you can access this API as well, just some endpoints are not available.

Authentication

Session Cookie

In application properties of the API-Service - or as ENV Variable in Docker setups, you can set a name for the Cookie. In our ExamplesLOWCODER_CE_SELFHOST_TOKEN

With this value, you can then authenticate API Calls.

If no user is logged In, API Calls will get executed in the name of "Anonymous User" and for most of the API Calls, this user has no desired rights.

If you are logged in, the Cookie of the currently logged-in user will be used to make API Calls in the name of the current user. This means, that Access Rights to different Functions are automatically applied by the Role of the User. (Admin, Member, Visitor)

If you want to use the API from outside of Lowcoder, you need to authenticate first and use the Cookie as the LOWCODER_CE_SELFHOST_TOKEN API key in every API Call.

// Login a User on Lowcoder by eMail

curl --location '//api/auth/form/login' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "loginId": "<your_user>",
  "password": "<your_password>",
  "register": "false",
  "source": "EMAIL",
  "authId": "EMAIL"
}'

When successfully logged in, you will get the following Response:

// Login Method Response

{
    "code": 1,
    "message": "",
    "data": true,
    "success": true
}

In particular, you will get back the Cookie to authorize the next API Calls.

// Cookie in Response
LOWCODER_CE_SELFHOST_TOKEN=<generatedCookieValue>; Path=/; Max-Age=2592000; Expires=Tue, 25 Jul 2023 13:51:31 GMT; HttpOnly; SameSite=Lax

For all the next API Calls you need to set the Cookie

// API Requests authorized
curl --location 'http://localhost:3000//api/users/currentUser' \
--header 'Accept: */*' \
--header 'Cookie: LOWCODER_CE_SELFHOST_TOKEN=<generatedCookieValue>'

API Key

Since Lowcoder v2.1.3 you can create and use alternatively also a JWT-based API Key.

As a logged-in user, you can use the API based on the Cookie to generate an API Key.

// use the Lowcoder API to generate the JWT based API Key
curl --location '<your lowcoder location>/api/auth/api-key' \
--header 'cookie: LOWCODER_CE_SELFHOST_TOKEN=<generatedCookieValue>;' \
--header 'Content-Type: application/json' \
--data '{
    "name":"<your api key name>",
    "description": "A wonderful API Key"
}'

In return, you will get a JSON response containing the API key

{
    "code": 1,
    "message": "",
    "data": {
        "id": "<the generated API Key Id",
        "token": "ey...<the JSON Web Token>"
    },
    "success": true
}

For all further API Calls, you can then use the API Key, which impersonates the logged-in user, that created the API Key.

As the API Key impersonates the user, who created the API Key (based on the Cookie), all rights of that impersonated User are also active via API Key.

OpenAPI Specification & Postman Collection

The Base URL of the Lowcoder API depends on your installation.

Single Docker Deployment

The Base URL of the API is the same as for the Frontend. In local installations for example:

http://localhost:3000/
https://<yourdomain>:3000/
https://<yourdomain>/

Multi-Docker Deployment

In a Multi-Docker Deployment, you will have an individual IP address or Domain for the API-Service Container. This is then the Base URL for the Lowcoder API.

https://<your-api-service-domain>:8080/
https://<your-api-service-domain>/

app.lowcoder.cloud

To use the API of the Cloud Version, the API is to reach via the separate API Service.

https://api-service.lowcoder.cloud/

Since Lowcoder v2.1.6 we publish the OpenAPI Specification and the Swagger Documentation automatically.

Swagger Documentation: <Lowcoder-Location>/api/docs/webjars/swagger-ui/index.html
OpenAPI Specification: <Lowcoder-Location>/api/docs/openapi.json

Using Lowcoder API - inside Lowcoder Apps

Since Lowcoder v2.0.0, it is possible to use the Lowcoder REST API inside of Apps in Lowcoder itself. To do so, create an OpenAPI specification-based Data Source.

Use your defined LOWCODER_CE_SELFHOST_TOKEN as API Key Auth. It will be automatically replaced by the adapted Cookie if a User is logged in.

Also, you can use the API Key to interact with the Lowcoder API as an impersonated user.

http://localhost:3000/api/docs/api-docs
https://<yourdomain>/api/docs/api-docs

As soon as connected and the OpenAPI specification is found and processed, the API Controllers are accessible in the Datasource.

For each Controller, you can see then the possible Operations.

Now you can execute the API Call based on its settings.

You can find more information of the specification & documentation here:

When you run Multi-Docker Deployment on Localhost, you will need to look for the that apply to your setup.

You can find the current API Documentation for example here:

The OpenAPI specification Document is automatically generated. The Server URL is your API-Service URL.

🔥
api-service.lowcoder.cloud
https://docs.lowcoder.cloud/lowcoder-api-specification/api-reference-lowcoder
Bridge-Network Settings
https://api-service.lowcoder.cloud/api/docs/webjars/swagger-ui/index.html#/
Please read more about it here
Connect the Lowcoder API as OpenAPI Datasource
Select a Controller to see it's Operations
Find the list of possible Operations for the selected Controller