Skip to main content
The Edge API is used by LogFleet edge agents running on your distributed devices. These endpoints use API Key authentication instead of JWT tokens.

Authentication

All Edge API requests must include the X-API-Key header:
curl -X POST https://api.logfleet.io/api/v1/edge/register \
  -H "X-API-Key: lf_prod_aBcDeFgHiJkLmNoPqRsTuVwXyZ123456" \
  -H "Content-Type: application/json" \
  -d '{"name": "edge-location-01"}'

Agent Lifecycle

1. Register    → Agent announces itself to LogFleet
2. Heartbeat   → Periodic health check (every 30s)
3. Metrics     → Push extracted metrics (every 60s)
4. Sync Config → Fetch latest metric configurations
5. Stream      → On-demand log streaming when requested

Endpoints

EndpointPurposeFrequency
POST /edge/registerOne-time agent registrationOnce at startup
POST /edge/agents/{id}/heartbeatHealth checkEvery 30 seconds
POST /edge/agents/{id}/metricsPush metricsEvery 60 seconds
GET /edge/agents/{id}/metric-configSync configurationsEvery 60 seconds
POST /edge/agents/{id}/streamStart log streamingOn-demand

Required Permissions

Create API keys with appropriate permissions for edge agents:
{
  "name": "Production Agents",
  "permissions": [
    "edge:register",
    "edge:heartbeat",
    "edge:metrics",
    "edge:stream"
  ]
}
PermissionRequired For
edge:registerInitial registration
edge:heartbeatHeartbeat signals
edge:metricsPushing metrics
edge:streamLog streaming
For security, grant only the permissions each agent needs. If an agent only sends heartbeats and metrics, omit edge:stream.