Skip to main content

Workflow Overview

The Workflow provides a comprehensive API for managing flows and user permissions. It enables administrators to create flows, manage user access, and handle bulk permission operations.

System Architecture

The Workflow operates with two primary user types:

  • Administrators: Can create flows and manage user permissions
  • Regular Users: Can access flows they've been granted permission to use

Available Endpoints

Admin Endpoints

All admin endpoints require admin role verification.

Flow Management

  • Create Flow - POST /api/v1/langflow/admin/flows
    • Create new flows in the Langflow system

Permission Management

  • Grant Flow Access - POST /api/v1/langflow/admin/permissions/grant

    • Grant individual user access to a specific flow
  • Revoke Flow Access - POST /api/v1/langflow/admin/permissions/revoke

    • Revoke individual user access from a specific flow

Bulk Operations

  • Grant Flow Access to Group - POST /api/v1/langflow/admin/permissions/grant-group

    • Grant multiple users access to one or more flows
  • Revoke Flow Access from Group - POST /api/v1/langflow/admin/permissions/revoke-group

    • Revoke multiple users' access from one or more flows

User Endpoints

Flow Access

  • List User Flows - GET /api/v1/langflow/flows
    • Retrieve flows the authenticated user has access to

Key Features

🔐 Permission System

  • API key-based access control
  • Individual and bulk permission management
  • Admin tracking for audit purposes

🔄 Dual Format Support

Bulk operations support two request formats:

  • Direct User List: {userIds[], flowId}
  • Group-Based: {groupId, flowIds[]}

Error Handling

The system provides consistent error responses:

  • 400 - Bad Request (missing/invalid parameters)
  • 401 - Unauthorized (invalid/missing JWT)
  • 403 - Forbidden (insufficient privileges)
  • 404 - Not Found (flow/user doesn't exist)
  • 500 - Internal Server Error
  • 503 - Service Unavailable (permissions store not initialized)

Notes

  • All admin actions are tracked for audit purposes
  • API keys are managed automatically by the system
  • Bulk operations continue processing even if some individual operations fail
  • Group resolution uses placeholder implementation (customizable)
  • Flow data includes complete node and edge definitions