API Reference
FacilFlow REST API documentation.
Base URL
https://api.flow.facilis.ai/api
Development: http://localhost:3002/api
Authentication
All API requests require a Firebase JWT token:
Authorization: Bearer <firebase-jwt-token>
Pipelines
List Pipelines
GET /pipelines
Response:
{
"pipelines": [
{
"id": "pipeline-123",
"name": "Temperature Monitoring",
"status": "running",
"nodes": 3,
"createdAt": "2024-01-15T12:00:00Z"
}
],
"total": 1
}
Create Pipeline
POST /pipelines
Content-Type: application/json
{
"name": "My Pipeline",
"description": "Pipeline description",
"nodes": []
}
Start Pipeline
POST /pipelines/:id/start
Stop Pipeline
POST /pipelines/:id/stop
Query Pipeline Data
GET /pipelines/:id/data?start=-1h&aggregation=1m
Agents
List Agents
GET /agents
Get Agent Status
GET /agents/:id/status
Restart Agent
POST /agents/:id/restart
Catalog
List Data Sources
GET /catalog/sources
List Source Tags
GET /catalog/sources/:id/tags
Query Data
POST /catalog/query
Content-Type: application/json
{
"sourceId": "pi-server-1",
"tags": ["TI-101", "PI-102"],
"startTime": "-24h",
"endTime": "now",
"aggregation": "5m"
}
Object Storage
List Buckets
GET /buckets
Response:
{
"buckets": [
{
"name": "data-lake",
"creationDate": "2024-01-15T12:00:00Z"
}
]
}
Create Bucket
POST /buckets
Content-Type: application/json
{
"name": "my-bucket"
}
Delete Bucket
DELETE /buckets/:name
List Objects
GET /buckets/:name/objects?prefix=folder/
Response:
{
"bucket": "my-bucket",
"prefix": "folder/",
"objects": [
{
"name": "folder/file.csv",
"size": 1024,
"lastModified": "2024-01-15T12:00:00Z",
"etag": "abc123",
"isFolder": false
}
]
}
Upload Object
POST /buckets/:name/objects
Content-Type: multipart/form-data
file: <binary>
key: folder/file.csv (optional)
Delete Object
DELETE /buckets/:name/objects/:key
Get Download URL
GET /buckets/:name/objects/:key/url?expiry=3600
Response:
{
"url": "https://storage.example.com/bucket/file?signature=..."
}
Storage Providers
List Providers
GET /storage/providers
Response:
[
{
"id": "default-minio",
"name": "Local MinIO",
"type": "minio",
"endpoint": "localhost",
"port": 9000,
"isDefault": true,
"createdAt": "2024-01-15T12:00:00Z"
}
]
Get Supported Types
GET /storage/providers/types
Response:
["minio", "s3", "azure-blob", "gcs"]
Create Provider
POST /storage/providers
Content-Type: application/json
{
"name": "AWS Production",
"type": "s3",
"endpoint": "s3.amazonaws.com",
"region": "us-east-1",
"credentials": {
"accessKey": "AKIA...",
"secretKey": "..."
},
"isDefault": false
}
Update Provider
PUT /storage/providers/:id
Content-Type: application/json
{
"name": "Updated Name",
"isDefault": true
}
:::warning Provider type cannot be changed after creation. :::
Delete Provider
DELETE /storage/providers/:id
Test Connection
POST /storage/providers/:id/test
Response:
{
"success": true,
"message": "Connection successful"
}
Clusters
List Clusters
GET /clusters
Create Cluster
POST /clusters
Get Cluster Details
GET /clusters/:id
Provision Cluster Nodes
POST /clusters/:id/provision
Start Cluster
POST /clusters/:id/start
Stop Cluster
POST /clusters/:id/stop
Teardown Cluster
DELETE /clusters/:id
Stream Container Logs (SSE)
GET /clusters/:id/logs
Container Stats
GET /clusters/:id/stats
Execute SQL Query in Cluster
POST /clusters/:id/query
ML Models
List Experiments
GET /ml/experiments
Create Experiment
POST /ml/experiments
List Runs
GET /ml/experiments/:id/runs
List Registered Models
GET /ml/models
Register Model
POST /ml/models
Update Model Stage
PUT /ml/models/:name/stage
List Model Versions
GET /ml/models/:name/versions
ML Training
Submit Training Job
POST /ml-training/jobs
List Training Jobs
GET /ml-training/jobs
Get Job Status
GET /ml-training/jobs/:id
ML Inference
Create Inference Endpoint
POST /ml-inference/endpoints
List Endpoints
GET /ml-inference/endpoints
Run Prediction
POST /ml-inference/endpoints/:id/predict
Schemas
List Schemas
GET /schemas
Create Schema
POST /schemas
Get Schema with Versions
GET /schemas/:id
Add Version
POST /schemas/:id/versions
Compare Versions
GET /schemas/:id/versions/:v1/compare/:v2
Check Compatibility
POST /schemas/:id/compatibility
Dashboards
List Dashboards
GET /dashboards
Create Dashboard
POST /dashboards
Get Dashboard
GET /dashboards/:id
Update Dashboard
PUT /dashboards/:id
Delete Dashboard
DELETE /dashboards/:id
Share Dashboard
POST /dashboards/:id/share
Duplicate Dashboard
POST /dashboards/:id/duplicate
Data Quality
List Rules
GET /quality/rules
Create Rule
POST /quality/rules
Evaluate Rule
POST /quality/rules/:id/evaluate
Get Evaluation Results
GET /quality/results
Get Quality Scores
GET /quality/scores
Data Lineage
Get Lineage Graph
GET /lineage/graph
Get Upstream Lineage
GET /lineage/upstream/:id
Get Downstream Lineage
GET /lineage/downstream/:id
Alerts
List Alert Rules
GET /alerts/rules
Create Alert Rule
POST /alerts/rules
List Notification Channels
GET /alerts/channels
Create Channel
POST /alerts/channels
Alert History
GET /alerts/history
Acknowledge Alert
POST /alerts/history/:id/acknowledge
Resolve Alert
POST /alerts/history/:id/resolve
Scheduler
List Schedules
GET /scheduler/schedules
Create Schedule
POST /scheduler/schedules
Update Schedule
PUT /scheduler/schedules/:id
Delete Schedule
DELETE /scheduler/schedules/:id
Execution History
GET /scheduler/schedules/:id/history
Audit
List Audit Logs
GET /audit/logs
Supports filtering by user, action, resource type, and date range via query parameters.
User Activity
GET /audit/users/:id/activity
Connectors
List Connector Instances
GET /connectors
Create Connector
POST /connectors
Test Connection
POST /connectors/:id/test
Airbyte
List Available Airbyte Sources
GET /airbyte/sources
Returns 300+ available source connectors.
Get Source Specification
GET /airbyte/sources/:id/spec
Test Airbyte Connection
POST /airbyte/connections/test
Telegraf
List Telegraf Plugins
GET /telegraf/plugins
Generate TOML Config
POST /telegraf/config
Governance
List Classification Levels
GET /classification/levels
Tag Resource with Classification
POST /classification/resources
Users & API Keys
List Users
GET /users
Create API Key
POST /api-keys
Revoke API Key
DELETE /api-keys/:id
Health
Health Check
GET /health
Response:
{
"status": "healthy",
"version": "0.3.0",
"uptime": 3600
}