OrgsInventory

searchOrgInventory

GET
/api/v1/orgs/{org_id}/inventory/search

Search organization inventory records with filters for type, MAC address, Virtual Chassis MAC address, Virtual Chassis master MAC address, model, name, site, serial number, Virtual Chassis master state, SKU, version, status, and text.

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

org_id*string
Formatuuid

Query Parameters

type?string

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

Default"ap"

Value in

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

Filter by MAC address. Partial matches may use * wildcards (e.g. *5b35* matches 5c5b350e0001 and 5c5b35000301). Accepts multiple comma-separated values.

vc_mac?string

Virtual Chassis MAC address. Accepts multiple comma-separated values.

master_mac?string

MAC address of the Virtual Chassis master device. Accepts multiple comma-separated values.

model?string

Partial / full Device model. Use prefix* for prefix search or *substring* for contains search (e.g. AP4* and *P4* match AP43). Suffix-only wildcards (e.g. *43) are not supported. Accepts multiple comma-separated values.

name?string

Device name. Always a partial match (e.g. london will match london-1, london-2, my-london-device...). Accepts multiple comma-separated values.

site_id?string

Filter inventory results by site identifier. Accepts multiple comma-separated values.

Formatuuid
serial?string

Device serial number. Partial match allowed with wildcard * (e.g. *123* will match AB123CD, 12345, XY123). Accepts multiple comma-separated values.

magic?string

Device claim code (magic). Accepts multiple comma-separated values.

master?string

Filter inventory results by whether the device is the Virtual Chassis master

sku?string

Device SKU. Partial match allowed with wildcard * (e.g. *2300* will match EX2300-F-12P). Accepts multiple comma-separated values.

version?string

Device version. Partial match allowed with wildcard * (e.g. 2R3 will match 21.2R3-S3.5). Accepts multiple comma-separated values.

status?string

Device status. enum: connected, disconnected. Accepts multiple comma-separated values.

text?string

Wildcards for name, mac, serial

modified_after?integer

Filter on inventory last modified time, in epoch

disconnected_before?integer

Filter results to devices that were last disconnected before this time, in epoch seconds

limit?integer

Maximum number of results to return per page

Range0 <= value
Default100
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/orgs/000000ab-00ab-00ab-00ab-0000000000ab/inventory/search?status=connected%2Cdisconnected"
{  "limit": 1000,  "results": [    {      "last_disconnected": 1616109044,      "last_name_change": 1784007045.409,      "mac": "f01c2df166e0",      "magic": "WVTFBLTNPXD23H2",      "master": true,      "members": [        {          "mac": "f01c2df166e0",          "model": "EX4300-48P",          "serial": "PD3714460200"        }      ],      "model": "EX4300-48P",      "name": "mist-wa-ex4300-VC",      "org_id": "9b853544-51e4-45fb-81ac-a442e4a111d0",      "serial": "PD3714460200",      "site_id": "01dc141d-b6af-4baa-b00f-0e31ef954c4f",      "sku": "EX4300-48P",      "status": "disconnected",      "timestamp": 1616108044,      "type": "switch",      "vc_mac": "f01c2df166e0",      "version": "21.4R3.5"    }  ],  "total": 1}