Manage inventories

Prev Next

This topic explains how to maintain inventories after initial creation, including clearing and removing inventories.

Clear an inventory

Remove all nodes from an inventory without deleting the inventory itself.

This is useful when:

  • Decommissioning devices and need to empty an inventory temporarily
  • Testing inventory population workflows
  • Preparing to repopulate from a different inventory system

Using workflows

Use the clearInventory task in Automation Studio.

Using API

DELETE /inventory_manager/v1/nodes/clear/:identifier

Example request:

DELETE /inventory_manager/v1/nodes/clear/prod-routers

Example response:

{
  "status": "Success",
  "result": {
    "nodesDeleted": 150
  }
}

Delete an inventory

Delete an inventory after removing all its nodes:

  1. Clear the inventory (remove all nodes)
  2. Delete the inventory

Using workflows

Use the deleteInventory task in Automation Studio.

Using API

DELETE /inventory_manager/v1/inventories/:identifier

Example request:

DELETE /inventory_manager/v1/inventories/prod-routers

Example response:

{
  "status": "Success",
  "result": {
    "deletedCount": 1
  }
}