Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:FlowiseAI Flowise GetAllChatflows

From Leeroopedia
Attribute Value
Source Repository FlowiseAI/Flowise
Source File packages/ui/src/api/chatflows.js
Domain Chatflow_Creation
Workflow Chatflow_Creation
Last Updated 2026-02-12

Overview

Concrete API client function for retrieving paginated chatflow listings from the Flowise server. This function wraps an HTTP GET request to the /chatflows endpoint with a type=CHATFLOW filter, forwarding optional pagination parameters. It is the primary entry point for populating chatflow listing views in the Flowise UI.

Code Reference

Source Location

  • File: packages/ui/src/api/chatflows.js
  • Line: L3

Signature

const getAllChatflows = (params) => client.get('/chatflows?type=CHATFLOW', { params })

Import

import chatflowsApi from '@/api/chatflows'

The client object is an Axios instance configured in packages/ui/src/api/client.js with a base URL of ${baseURL}/api/v1, JSON content type headers, and cookie-based authentication via withCredentials: true.

I/O Contract

Inputs

Parameter Type Required Description
params object No Optional query parameters for pagination
params.page number No Page number (zero-indexed or one-indexed depending on server)
params.limit number No Maximum number of records to return per page

Outputs

Field Type Description
data Chatflow[] Array of chatflow records for the requested page
total number Total count of matching CHATFLOW records across all pages

Each Chatflow object contains:

Field Type Description
id string Unique chatflow identifier
name string User-defined chatflow name
flowData string JSON-serialized flow graph (nodes, edges, viewport)
type string Always "CHATFLOW" for this endpoint
deployed boolean Whether the chatflow is currently deployed
createdDate string ISO timestamp of creation
updatedDate string ISO timestamp of last update

Usage Examples

Basic: Fetch all chatflows without pagination

import chatflowsApi from '@/api/chatflows'

// Fetch all chatflows (no pagination)
const response = await chatflowsApi.getAllChatflows()
const chatflows = response.data.data

With pagination parameters

import chatflowsApi from '@/api/chatflows'

// Fetch page 2 with 10 items per page
const response = await chatflowsApi.getAllChatflows({ page: 2, limit: 10 })
const chatflows = response.data.data
const totalCount = response.data.total

Using the useApi hook (as seen in Canvas component)

import chatflowsApi from '@/api/chatflows'
import useApi from '@/hooks/useApi'

const getAllChatflowsApi = useApi(chatflowsApi.getAllChatflows)

// Trigger the request
useEffect(() => {
    getAllChatflowsApi.request({ page: 0, limit: 20 })
}, [])

// Access results
useEffect(() => {
    if (getAllChatflowsApi.data) {
        const chatflows = getAllChatflowsApi.data
        // Render chatflow list
    }
}, [getAllChatflowsApi.data])

Related API Functions

The chatflows.js module also exports related functions:

  • getAllAgentflows(type, params) -- Fetches flows filtered by a dynamic type parameter (L5)
  • getSpecificChatflow(id) -- Fetches a single chatflow by ID (L7)
  • deleteChatflow(id) -- Deletes a chatflow by ID (L15)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment