OrgsInventory

replaceOrgDevices

POST
/api/v1/orgs/{org_id}/inventory/replace

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.

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

Request Body

application/json

Request Body

body?replace_device

Request payload for replacing an inventory device with a claimed, unassigned device

Response Body

curl -X POST "https://example.com/api/v1/orgs/000000ab-00ab-00ab-00ab-0000000000ab/inventory/replace" \  -H "Content-Type: application/json" \  -d '{    "discard": [],    "inventory_mac": "5c5b35000301",    "mac": "5c5b35000101",    "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b"  }'

{  "error": [],  "op": "assign",  "reason": [],  "success": [    "5c5b350e0001"  ]}