API Documentation

    Complete reference for DataFlow backend routes

    Next.js API: These endpoints are served by the app backend and generally expect an active authenticated session for protected routes.

    Available Endpoints

    Process File Upload
    Uploads a file to configured storage, parses it, and returns preview data
    POST

    Endpoint URL

    /api/upload-file
    Authentication
    Required
    Rate Limit

    Application-level limits vary by deployment

    Request Body
    {
      "file": "(binary form field)",
      "fileType": "csv",
      "userId": "user123"
    }
    Response
    {
      "success": true,
      "data": {
        "headers": [
          "Category",
          "Sales",
          "Region"
        ],
        "rawData": [
          {
            "Category": "Electronics",
            "Sales": "5000",
            "Region": "North"
          },
          {
            "Category": "Furniture",
            "Sales": "3200",
            "Region": "South"
          }
        ],
        "storagePath": "uploads/user123/sales_data.csv",
        "rowCount": 2,
        "columnCount": 3
      }
    }
    CORS Configuration

    Allowed Origins: APP_PUBLIC_URL or NEXTAUTH_URL

    Allowed Methods: POST, OPTIONS

    Credentials: Allowed