Skip to main content

Cloud API Reference

Complete REST API reference for the EdgeFlow SaaS cloud server. 50+ endpoints covering authentication, devices, flows, deployments, billing, alerts, metrics, and edge node management.

Overview

The EdgeFlow Cloud API provides a comprehensive REST interface for managing devices, flows, deployments, billing, and more. All endpoints use JSON request/response bodies and require JWT Bearer token authentication unless otherwise noted.

Base URL

https://saas.edgx.cloud/api/v1

Authentication

# JWT Bearer Token (primary)
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

# API Key (programmatic access)
X-API-Key: edgeflow_abcdef...

Middleware

Middleware Description
Rate Limiting IP-based rate limiting on all routes. Per-user and per-org limits available.
Authentication JWT validation via Authorization: Bearer header
Tenant Isolation Ensures all queries are scoped to the user's organization

Authentication

MethodEndpointAuthDescription
POST/auth/registerNoneRegister new user and organization
POST/auth/loginNoneLogin with email/password, returns JWT
POST/auth/refreshNoneRefresh expired access token
POST/auth/logoutJWTInvalidate session
GET/auth/profileJWTGet current user profile
PUT/auth/profileJWTUpdate user profile
POST/auth/change-passwordJWTChange user password

Devices

MethodEndpointDescription
GET/devicesList all devices (supports limit, offset, status filters)
POST/devicesCreate/register a new device
GET/devices/:idGet device details
PUT/devices/:idUpdate device metadata and tags
DELETE/devices/:idDelete device
GET/devices/:id/statusGet real-time device status
GET/devices/:id/shadowGet device shadow state
PUT/devices/:id/shadowUpdate desired shadow state

Edge Node Remote Management

Proxy commands to edge devices through the WebSocket tunnel:

MethodEndpointDescription
GET/edge-nodes/:deviceId/healthCheck edge node health
GET/edge-nodes/:deviceId/node-typesGet available node types
GET/edge-nodes/:deviceId/editor-urlGet remote editor proxy URL
GET/edge-nodes/:deviceId/flowsList flows on edge device
GET/edge-nodes/:deviceId/flows/:flowIdGet flow from edge device
POST/edge-nodes/:deviceId/flowsCreate flow on edge device
PUT/edge-nodes/:deviceId/flows/:flowIdUpdate flow on edge device
DELETE/edge-nodes/:deviceId/flows/:flowIdDelete flow from edge device
POST/edge-nodes/:deviceId/flows/:flowId/startStart flow on edge device
POST/edge-nodes/:deviceId/flows/:flowId/stopStop flow on edge device
PUT/edge-nodes/:deviceId/configureUpdate edge device connection settings

Organizations

MethodEndpointDescription
GET/organizationsList user's organizations
GET/organizations/:idGet organization details
PUT/organizations/:idUpdate organization settings

Flows

MethodEndpointDescription
GET/flowsList all cloud flows
POST/flowsCreate a new flow
GET/flows/:idGet flow details
PUT/flows/:idUpdate flow definition
DELETE/flows/:idDelete flow
POST/flows/:id/publishPublish flow for deployment

Deployments

MethodEndpointDescription
GET/deploymentsList all deployments
POST/deploymentsCreate deployment
GET/deployments/:idGet deployment status
POST/deployments/:id/startStart deployment
POST/deployments/:id/pausePause deployment
POST/deployments/:id/rollbackRollback deployment

Billing

MethodEndpointDescription
GET/billing/plansList available subscription plans
GET/billing/subscriptionGet current subscription
POST/billing/subscriptionCreate subscription
PUT/billing/subscriptionChange subscription plan
DELETE/billing/subscriptionCancel subscription
POST/billing/subscription/resumeResume canceled subscription
GET/billing/usageGet usage summary
GET/billing/quotasGet current quota limits
GET/billing/invoicesList invoices
GET/billing/invoices/:idGet invoice details
GET/billing/invoices/:id/downloadDownload invoice PDF
POST/billing/payment-methodsAdd payment method
GET/billing/payment-methodsList payment methods
DELETE/billing/payment-methods/:idRemove payment method
POST/billing/webhooks/stripeStripe webhook handler

Metrics & Logs

MethodEndpointDescription
GET/metricsQuery organization-wide metrics
GET/metrics/devices/:idGet device-specific metrics
GET/logsQuery organization logs
GET/logs/devices/:idGet device-specific logs

Alerts

MethodEndpointDescription
GET/alertsList alert rules
POST/alertsCreate alert rule
GET/alerts/:idGet alert details
PUT/alerts/:idUpdate alert rule
DELETE/alerts/:idDelete alert rule
POST/alerts/:id/acknowledgeAcknowledge firing alert

Tunnel

MethodEndpointAuthDescription
GET/tunnelWebSocketDevice WebSocket tunnel (handshake auth)
GET/tunnel/statusJWTGet tunnel connection status

Error Responses

All endpoints return consistent error responses:

{
  "error": "flow not found",
  "code": "NOT_FOUND",
  "status": 404
}
Status CodeDescription
400Bad Request — Invalid parameters or body
401Unauthorized — Missing or invalid token
403Forbidden — Insufficient permissions or wrong organization
404Not Found — Resource does not exist
429Too Many Requests — Rate limit exceeded
500Internal Server Error

Rate Limiting

ScopeDescription
IP-based Default for all routes, prevents abuse from single IPs
Per-User Applied to sensitive operations (auth, profile)
Per-Organization Higher limits (10x) for organization-scoped resources