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 GetDocumentLoaders

From Leeroopedia
Attribute Value
Sources packages/ui/src/api/documentstore.js:L4
Domains Document_Store_Ingestion
Last Updated 2026-02-12 14:00 GMT

Overview

GetDocumentLoaders is the API client function that retrieves all available document loader component definitions from the server. These definitions describe the loader types that can be used to ingest documents into a document store, including their configuration schemas, input parameters, and credential requirements.

Code Reference

Source Location

Signature

const getDocumentLoaders = () => client.get('/document-store/components/loaders')

This function sends a GET request to the /api/v1/document-store/components/loaders endpoint via the configured axios client instance.

Import

import documentStoreApi from '@/api/documentstore'

The function is accessed as documentStoreApi.getDocumentLoaders() after importing the default export from the documentstore API module.

I/O Contract

Inputs

Parameter Type Required Description
(none) -- -- This function takes no parameters

Outputs

Field Type Description
data LoaderComponent[] Array of loader component definitions
data[].name string Internal component identifier (e.g., pdfLoader)
data[].label string Human-readable display name (e.g., PDF Loader)
data[].icon string Icon identifier or URL for the component
data[].description string Description of what the loader does
data[].inputParams object[] Array of input parameter definitions for the configuration form
data[].inputAnchors object[] Array of input anchor definitions (connections to other components like text splitters)

The function returns a Promise<{data: LoaderComponent[]}> from the axios response.

Usage Examples

Fetching and Displaying Available Loaders

import documentStoreApi from '@/api/documentstore'

const loadAvailableLoaders = async () => {
    const response = await documentStoreApi.getDocumentLoaders()
    const loaders = response.data

    // Display loader options to the user
    loaders.forEach(loader => {
        console.log(`${loader.label}: ${loader.description}`)
        console.log('  Parameters:', loader.inputParams.map(p => p.name).join(', '))
    })

    return loaders
}

Filtering Loaders by Type

import documentStoreApi from '@/api/documentstore'

const getFileBasedLoaders = async () => {
    const response = await documentStoreApi.getDocumentLoaders()
    const allLoaders = response.data

    // Filter for file-based loaders
    const fileLoaders = allLoaders.filter(loader =>
        loader.inputParams.some(param => param.type === 'file')
    )

    return fileLoaders
}

Using Loader Schema to Build Dynamic Forms

import documentStoreApi from '@/api/documentstore'

const buildLoaderForm = async (loaderName) => {
    const response = await documentStoreApi.getDocumentLoaders()
    const loader = response.data.find(l => l.name === loaderName)

    if (!loader) throw new Error(`Loader ${loaderName} not found`)

    // Use inputParams to dynamically render form fields
    const formFields = loader.inputParams.map(param => ({
        name: param.name,
        label: param.label,
        type: param.type,
        required: param.optional !== true,
        default: param.default
    }))

    return { loader, formFields }
}

Related Pages

Page Connections

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