API
Live Defense Agent API
See how the live Defense Agent uses its install key to connect to AgentProof, fetch signed rules, and report traffic, events and routes.
The live Defense Agent uses these routes to talk to AgentProof from your app. The package makes the calls for you. Owners and admins set up the connection in Settings > Live protection.
Connect your app
- Open Settings > Live protection.
- Press Add install key.
- Enter a Name.
- Press Add key.
- Press Copy to copy the key.
- Set
AGENTPROOF_LIVE_KEYin your app's environment.
An install key starts with apl_ and works only on the /api/live/ routes.
Routes the package calls
| Method | Path | What the package does there |
|---|---|---|
| POST | /api/live/hello | Checks in with AgentProof. |
| GET | /api/live/rules | Fetches the current signed ruleset. |
| POST | /api/live/events | Sends events in batches. |
| POST | /api/live/routes | Sends route information for the website project's map. |
| POST | /api/live/traffic | Sends traffic summaries in batches. |
Revoke an install key
In Settings > Live protection, find the key and press Revoke, then Confirm revoke. If your app still needs to connect, give it a new install key.
Related pages
Last updated