searchOrgInventory
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.
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
uuidQuery Parameters
Filter results by type. enum: ap, gateway, switch
"ap"Value in
- "ap"
- "gateway"
- "switch"
Filter by MAC address. Partial matches may use * wildcards (e.g. *5b35* matches 5c5b350e0001 and 5c5b35000301). Accepts multiple comma-separated values.
Virtual Chassis MAC address. Accepts multiple comma-separated values.
MAC address of the Virtual Chassis master device. Accepts multiple comma-separated values.
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.
Device name. Always a partial match (e.g. london will match london-1, london-2, my-london-device...). Accepts multiple comma-separated values.
Filter inventory results by site identifier. Accepts multiple comma-separated values.
uuidDevice serial number. Partial match allowed with wildcard * (e.g. *123* will match AB123CD, 12345, XY123). Accepts multiple comma-separated values.
Device claim code (magic). Accepts multiple comma-separated values.
Filter inventory results by whether the device is the Virtual Chassis master
Device SKU. Partial match allowed with wildcard * (e.g. *2300* will match EX2300-F-12P). Accepts multiple comma-separated values.
Device version. Partial match allowed with wildcard * (e.g. 2R3 will match 21.2R3-S3.5). Accepts multiple comma-separated values.
Device status. enum: connected, disconnected. Accepts multiple comma-separated values.
Wildcards for name, mac, serial
Filter on inventory last modified time, in epoch
Filter results to devices that were last disconnected before this time, in epoch seconds
Maximum number of results to return per page
0 <= value100On which field the list should be sorted, -prefix represents DESC order
"timestamp"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}replaceOrgDevices POST
It’s a common request we get from the customers. When a AP HW has problem and need a replacement, they would want to copy the existing attributes (Device Config) of this old AP to the new one. It can be done by providing the MAC of a device that’s currently in the inventory but not assigned. The Device replaced will become unassigned. This API also supports replacement of Mist Edges. This API copies device agnostic attributes from old Mist edge to new one. Mist manufactured Mist Edges will be reset to factory settings but will still be in Inventory.Brownfield or VM’s will be deleted from Inventory **Note:** For Gateway devices only like-for-like replacements (can only replace a SRX320 with a SRX320 and not some other model) are allowed.
adoptOrgJsiDevice GET
Return the outbound SSH registration command used to onboard Junos devices to Juniper Support Insights (JSI).