Skip to content

Configuring Endpoints

FlowDrop Editor

What you’ll learn: How to configure the API endpoint so FlowDrop knows where to send requests for loading nodes, saving workflows, and executing pipelines.

The canvas above looks the same as Step 1 — but behind the scenes, it now has an endpoint configuration. This tells FlowDrop where your backend API lives, even before you’ve built one.

FlowDrop is a frontend editor that talks to a backend API for things like:

  • Loading available node types and categories
  • Saving and loading workflows
  • Executing workflows and pipelines
  • Managing playground sessions

Without an endpoint configuration, the editor can render a canvas, but it can’t load nodes into the sidebar or persist any data. This is why Step 1 showed an empty canvas — there was no API to fetch nodes from.

FlowDrop provides a helper that generates a full endpoint configuration from a single base URL:

import { mountFlowDropApp, createEndpointConfig } from '@flowdrop/flowdrop/editor';
import '@flowdrop/flowdrop/styles';
const app = await mountFlowDropApp(document.getElementById('editor'), {
endpointConfig: createEndpointConfig('/api/flowdrop'),
height: '600px'
});

The createEndpointConfig('/api/flowdrop') call sets up paths for all API operations under that base URL:

OperationEndpoint
List nodesGET /api/flowdrop/nodes
List categoriesGET /api/flowdrop/categories
Port configGET /api/flowdrop/port-config
Save workflowPUT /api/flowdrop/workflows/{id}
Create workflowPOST /api/flowdrop/workflows
Execute workflowPOST /api/flowdrop/workflows/{id}/execute
Health checkGET /api/flowdrop/health

It also configures sensible defaults: a 30-second timeout and automatic retries with exponential backoff.

You can override individual settings by passing a second argument:

const endpointConfig = createEndpointConfig('/api/v2/flowdrop', {
timeout: 60000,
retry: {
enabled: true,
maxAttempts: 5,
delay: 2000,
backoff: 'exponential'
}
});

Now that the editor knows where the API lives, it’s time to define your first node and see it appear in the sidebar.


Tutorial progress: Step 2 of 5

← Embedding the Editor | Next: Your First Node →