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:Infiniflow Ragflow DataSourceService

From Leeroopedia
Revision as of 11:20, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Infiniflow_Ragflow_DataSourceService.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Frontend, API, Data_Pipeline
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete frontend HTTP API client for managing external data source connections with OAuth flow endpoints for the RAGFlow frontend.

Description

The services/data-source-service.ts module defines API endpoints for: listing available data source types, initiating OAuth authentication flows, managing connected data sources, and fetching data from external sources like Google Drive, Dropbox, etc.

Usage

Import these service functions in data source management views and dataset configuration where external data sources are linked.

Code Reference

Source Location

Signature

export const listDataSources: () => Promise<Response>;
export const getOAuthUrl: (type: string) => Promise<Response>;
export const connectDataSource: (data) => Promise<Response>;
export const disconnectDataSource: (id: string) => Promise<Response>;

Import

import { listDataSources, getOAuthUrl } from '@/services/data-source-service';

I/O Contract

Inputs

Name Type Required Description
type string Yes Data source type for OAuth URL
id string Yes Data source ID for disconnect

Outputs

Name Type Description
returns Promise<Response> API response with data source info

Usage Examples

import { getOAuthUrl } from '@/services/data-source-service';

const { data } = await getOAuthUrl('google_drive');
window.location.href = data.oauth_url; // Redirect to OAuth

Related Pages

Page Connections

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