add-integration-api-tool
Installation
SKILL.md
Adding a Tool That Uses the UniFi Integration API
The UniFi controller exposes two API surfaces. They are not interchangeable. Skipping this distinction creates silent footguns where IDs from one API are accepted by tools backed by the other and silently fail — or worse, succeed against the wrong resource.
The two surfaces
| V2 controller API | Integration API | |
|---|---|---|
| Auth | session cookie | X-API-Key header |
| Path prefix | /proxy/network/api/..., /proxy/network/v2/api/... |
/proxy/network/integration/v1/... |
| IDs | Mongo ObjectIDs (674f0...) |
UUIDs (0998be5a-...) |
| Field naming | snake_case |
camelCase |
| Action shape | "action": "ALLOW" + flat fields |
nested {"action": {"type": "ALLOW", "allowReturnTraffic": true}} |
ip_version |
"BOTH" |
"ipProtocolScope": {"ipVersion": "IPV4_AND_IPV6"} |
| Coverage | everything the web UI uses | curated, expanding subset |
| Membership | full controller state | filtered (system policies often excluded) |