API
Plans with API access can read their data and make a few changes with a JSON API, for scripts, dashboards and other tools.
Keys
Create keys on the API access page. A key is lgapi_…, shown once, and either read (look only) or write (also resolve threats and errors, block and unblock). Revoke a key at any time.
Send it with every request:
curl -H "Authorization: Bearer lgapi_YOUR_KEY" https://logligent.com/api/v1/devices
Endpoints
| Method and path | What |
|---|---|
GET /api/v1/account | Your account and plan |
GET /api/v1/devices | Your devices and their status |
GET /api/v1/threats | Threats, newest first |
GET /api/v1/threat | One threat |
POST /api/v1/threats/resolve | Resolve a threat (write key) |
GET /api/v1/blocks | Blocked addresses |
POST /api/v1/blocks | Block an address (write key) |
POST /api/v1/blocks/remove | Unblock an address (write key) |
GET /api/v1/logs | Log lines |
Every answer is JSON: the data, or {"error": "…"} with the HTTP status. Lists take a limit. The full reference, with each endpoint's parameters and examples, is on the API access page once you're signed in.
Limits
Each key may make 120 requests a minute; over that, the answer is 429 with Retry-After.