API Service
API Reference Complete list of all API endpoints
Overview
Section titled “Overview”The API service is the main entry point for Flow-Like on Kubernetes. It handles:
- User requests — Authentication, apps, workflows
- Job management — Submit and track workflow executions
- Health checks — Kubernetes probes for reliability
Architecture
Section titled “Architecture”┌─────────────────────────────────────────────────────────┐│ API Service ││ (Port 8080) │├─────────────────────────────────────────────────────────┤│ ││ /health/* → Kubernetes probes (live, ready, etc.) ││ /jobs/* → Job submission and management ││ /api/v1/* → Flow-Like API (auth, apps, etc.) ││ │└─────────────────────────────────────────────────────────┘ │ │ ▼ ▼ ┌──────────┐ ┌─────────────┐ │ Redis │ │ CockroachDB │ │ (Queue) │ │ (Database) │ └──────────┘ └─────────────┘Source Code
Section titled “Source Code”| Component | Location |
|---|---|
| Main entrypoint | apps/backend/kubernetes/api/src/main.rs |
| Configuration | apps/backend/kubernetes/api/src/config.rs |
| Health endpoints | apps/backend/kubernetes/api/src/health.rs |
| Job management | apps/backend/kubernetes/api/src/jobs/ |
| Storage setup | apps/backend/kubernetes/api/src/storage.rs |
Storage Providers
Section titled “Storage Providers”The API supports multiple storage backends:
| Provider | Configuration Key |
|---|---|
| AWS S3 | aws |
| Azure Blob | azure |
| Google Cloud Storage | gcp |
| Cloudflare R2 | r2 |
| S3-compatible (MinIO, etc.) | s3 |
See Storage Configuration for details.
Required Configuration
Section titled “Required Configuration”At minimum, the API needs:
| Variable | Purpose |
|---|---|
DATABASE_URL | CockroachDB/PostgreSQL connection |
REDIS_URL | Job queue and caching |
STORAGE_PROVIDER | Which storage backend to use |
| Storage credentials | Depends on provider |
See Configuration for the full list.
Port Configuration
Section titled “Port Configuration”The API always listens on port 8080 inside the container. This is:
- Set in the Helm chart (
values.yaml) - Used by the Kubernetes Service definition
- Exposed via port-forward, Ingress, or LoadBalancer
To access it locally:
# Forward local 8083 → service 8080kubectl port-forward svc/flow-like-api 8083:8080 -n flow-like
# Test itcurl http://localhost:8083/api/v1/healthScaling
Section titled “Scaling”The API is stateless and can be horizontally scaled. Default configuration:
- Minimum replicas: 3
- Maximum replicas: 10
- Scale trigger: 70% CPU utilization
# Manual scalingkubectl scale deployment/flow-like-api --replicas=5 -n flow-like
# Check autoscalerkubectl get hpa -n flow-like# View logskubectl logs deployment/flow-like-api -n flow-like
# Follow in real-timekubectl logs deployment/flow-like-api -n flow-like -f
# Last 100 lineskubectl logs deployment/flow-like-api -n flow-like --tail=100Related
Section titled “Related”- API Reference — All endpoints
- kubectl Basics — Essential commands
- Executor — How jobs run