list_recognition_groups
List enrolled face or vehicle recognition groups from a UniFi Protect console, including names, detection counts, and timestamps for sync or change detection.
Instructions
List recognition groups (enrolled faces / vehicles) on a Protect console.
Uses the private /proxy/protect/api/recognition/{type}/groups REST path (not the Protect Integration API, which has no recognition surface). Each group is a recognised subject with a stable, monotonic id (face_1, face_90, …), a name / matchedName label, a detectionsCount, and createdAt/firstDetectedAt/lastDetectedAt timestamps usable as sync and change-detection keys. This is a faithful pass-through: the name label is returned as-is and nothing is redacted.
Response shape: {"groups": [...], "count": N} (plus "nextPage" / "incomplete" when paging manually). The array key is "groups", NOT "data" — unlike the offset-proxy tools that return {"data": [...], "totalCount": N}; read the list from result["groups"].
host: console name, ID, or composite ID (MAC:numericId format). type: recognition type. Use 'face' or 'vehicle' (singular). Plural forms ('faces', 'vehicles') are NOT valid and return HTTP 400 from upstream — two separate agents have guessed plural and hit this error. The value is forwarded as-is, so any other type the console accepts also works, and any it rejects is answered by the API's own error. has_name: when true, return only named groups (unnamed groups are filtered out). page_size: API page size; also the drain page size. Defaults to 200. order_by / order_direction: server-side sort. order_direction is 'asc' or 'desc', case-insensitive ('ASC'/'DESC' behave identically); an unrecognised value is rejected upstream with HTTP 400. It only takes effect together with order_by (e.g. order_by='name') — with order_by set but order_direction omitted the API defaults to descending. order_by accepts name, createdAt, lastDetectedAt, or detectionsCount. page: fetch a single page (1-based) instead of draining. The response pages via a links.next envelope; by default every page is drained and the complete group set is returned. Pass page to fetch one page manually — nextPage is then surfaced.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| page | No | ||
| type | Yes | ||
| has_name | No | ||
| order_by | No | ||
| page_size | No | ||
| order_direction | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||