SitesDevices

searchSiteDeviceLastConfigs

GET
/api/v1/sites/{site_id}/devices/last_config/search

Search last known device configuration records for a site with filters for device type, MAC address, name, software version, certificate expiry, and time range. Use Search Org Device Last Configs to search last known device configuration records across the organization.

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

site_id*string
Formatuuid

Query Parameters

cert_expiry_duration?string

Duration for expiring cert queries (format: 2d/3h/172800 seconds)

device_type?string

Filter results by device type. enum: ap, gateway, switch, mxedge

Default"ap"

Value in

  • "ap"
  • "gateway"
  • "switch"
  • "mxedge"
mac?string

Filter results by MAC address

version?string

Filter results by software version

name?string

Filter results by name

limit?integer

Maximum number of results to return per page

Range0 <= value
Default100
start?string

Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d or -1w

end?string

Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d, -2h, or now

duration?string

Time range duration for the query, using relative units such as 10m, 7d, or 2w

Default"1d"
sort?string

On which field the list should be sorted, -prefix represents DESC order

Default"timestamp"
search_after?string

Pagination cursor for retrieving subsequent pages of results. This value is automatically populated by Mist in the next URL from the previous response and should not be manually constructed.

Response Body

curl -X GET "https://example.com/api/v1/sites/000000ab-00ab-00ab-00ab-0000000000ab/devices/last_config/search"
{  "end": 1531862583,  "limit": 10,  "results": [    {      "channel_24": 11,      "channel_5": 100,      "radio_macs": [        "5c5b352e000a",        "5c5b352e000b",        "5c5b352e000c"      ],      "radios": [        {          "band": "24",          "channel": 11        },        {          "band": "5",          "channel": 100        }      ],      "secpolicy_violated": false,      "ssids": [        "test24",        "test5"      ],      "ssids_24": [        "test24"      ],      "ssids_5": [        "test5"      ],      "timestamp": 1531855856.643369,      "version": "apfw-0.2.14754-cersei-75c8",      "wlans": [        {          "auth": "psk",          "bands": [            "24"          ],          "id": "be22bba7-8e22-e1cf-5185-b880816fe2cf",          "ssid": "test24",          "vlan_ids": [            "1"          ]        },        {          "auth": "psk",          "bands": [            "5"          ],          "id": "f8c18724-4118-3487-811a-f98964988604",          "ssid": "test5",          "vlan_ids": [            "1"          ]        }      ]    }  ],  "start": 1531776183,  "total": 1}