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
}
]
}