Get Todos Workflow
This guide shows how to build a Get Todos API that retrieves all todo items from the database using DotPortion’s visual workflow builder. This workflow:- Uses no path params
- Uses no query params
- Uses no request body
What We’re Building
Endpoint:Fetch all todo items stored in the database.
Before You Start
Make sure you have:- Created the Todo Project
- Defined the Todo Schema
- Inserted at least one todo
- Selected a database (Platform DB or MongoDB)
Step 1: Create a New Workflow
- Open your project
- Click New Workflow
- Name it:
get-todos
🖼️ Workflow Creation (UI Reference)
Step 2: Configure API Start Node
Select the API Start Node and configure:- Method:
GET - Path:
/todos
🖼️ API Start Node Configuration
Step 3: Add Database Node
Add a Database Node to retrieve all todos. Configure:- Database: Platform DB or MongoDB
- Collection:
todos - Operation:
find - Filter:
{}(empty)
todos collection.
🖼️ Database Find Configuration
Step 4: Add Response Node
Add a Response Node to return the list of todos. Configure:- Status Code:
200 - Response Body:
🖼️ Response Node Configuration
Step 5: Connect the Nodes
Connect the nodes in this order:🖼️ Final Workflow Graph
Step 6: Deploy the Workflow
Click Deploy to make the API live. Once deployed, the endpoint is immediately accessible.Testing the Workflow
Call the API using:- Trigger the workflow
- Watch the database query execute
- Inspect the returned list of todos
🖼️ Realtime Executor View