Art-of-WiFi / UniFi-API-client

A PHP API client class to interact with Ubiquiti's UniFi Controller API
MIT License
1.09k stars 217 forks source link

Add `stat/device-basic` endpoint #188

Closed sgrodzicki closed 1 year ago

sgrodzicki commented 1 year ago

Adding missing (lightweight) endpoint for basic device information. Useful for filtering on type or other basic fields. Example output:

{
    "meta": {
        "rc": "ok"
    },
    "data": [
        {
            "mac": "d0:21:f9:fa:5f:38",
            "state": 1,
            "adopted": true,
            "disabled": false,
            "type": "uap",
            "model": "U6M",
            "in_gateway_mode": false,
            "name": "AP Lab"
        },
        {
            "mac": "b4:fb:e4:d2:17:8c",
            "state": 2,
            "adopted": false,
            "disabled": false,
            "type": "usw",
            "model": "US8P60",
            "in_gateway_mode": false
        }
    ]
}
malle-pietje commented 1 year ago

Thanks, looks like a nice and useful endpoint for specific use-cases! Will merge asap.