Inventory Service (2.2.0)

Download OpenAPI specification:Download

This is the spec that defines the API provided by the Inventory/Asset Service, which is used by multiple services to access network configuration/state data

Switch

getSwitch Deprecated

Get only specified Switch details. The Switch can be identified by IP Address

query Parameters
ip_address
required
string

IP Address of the Device

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/switch
http://goinventory-service:80/v1/inventory/switch

deleteSwitch Deprecated

Delete the specified device from the inventory.

query Parameters
ip_address
required
string

IP Addresses of the device to be deleted.

Responses

200

OK

401

Authorization information is missing or invalid.

404

A switch with the specified IP Address was not found.

422

Not able to delete the switch with specified IP Address.

500

Unexpected error.

default

Unexpected error

delete/switch
http://goinventory-service:80/v1/inventory/switch

updateSwitch Deprecated

Update the specified device details in the inventory.

path Parameters
ip_address
required
string

IP Address of the device to be updated.

Request Body schema: application/json

Update switch if credentials changes provide new username and password

ip_address
required
string
username
required
string
password
required
string
maintmode
boolean

Responses

200

OK

401

Authorization information is missing or invalid.

404

Couldnt connect to the device. Check device credentials.

422

Update switch failed because of invalid IP address in the request.

424

Switch update failed for the specified IP address.

500

Unexpected error.

default

Unexpected error

put/switch/{ip_address}
http://goinventory-service:80/v1/inventory/switch/{ip_address}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "password": "password",
  • "ip_address": "ip_address",
  • "username": "username",
  • "maintmode": true
}

Register

registerSwitch Deprecated

Register switch with the inventory service

Request Body schema: application/json

Register a new Switch.

ip_address
required
string
username
required
string
password
required
string
maintmode
boolean

Responses

200

OK

401

Authorization information is missing or invalid.

409

A switch with the specified IP already exists.

422

Invalid IP/Username/Password for registering the device.

424

Device connection or enabling interfaces failed while registering the device.

500

Unexpected error.

default

Unexpected error

post/switch
http://goinventory-service:80/v1/inventory/switch

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "password": "password",
  • "ip_address": "ip_address",
  • "username": "username",
  • "maintmode": true
}

registerSwitches

Register switches with the inventory service

Request Body schema: application/json

Register a new Switch.

device_ips
required
Array of strings
username
required
string
password
required
string
maintmode
boolean

Responses

200

OK

401

Authorization information is missing or invalid.

409

A switch with the specified IP already exists.

500

Unexpected error.

default

Unexpected error

post/switches
http://goinventory-service:80/v1/inventory/switches

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "password": "password",
  • "device_ips":
    [
    ],
  • "username": "username",
  • "maintmode": true
}

Replace

replaceSwitch

Replace the switch as part of an RMA. This will replace the asset information of the new switch in the Inventory.

query Parameters
ip_address
required
string

IP Addresses of the device to be replaced.

config_backup_id
string

UUID of config backup

Responses

202

Accepted switch replace request

401

Authorization information is missing or invalid.

409

A switch with the specified IP doesnt exists.

500

Unexpected error

default

Unexpected error

post/switch/replace
http://goinventory-service:80/v1/inventory/switch/replace

Switch replace

rma

delet RMA ID.

query Parameters
key
string

IP Addresses of the device or RMA uuid to deleted.

Responses

200

drift and reconcile delete request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

delete/switch/replace
http://goinventory-service:80/v1/inventory/switch/replace

Switch replace History list

getRMAHistorys

Get Switch replace History list

query Parameters
device_ip
string

Ip of the entry for which RMA history is fetched

Responses

200

OK

404

No RMA History found in the system

500

Unexpected error

default

Unexpected error

get/rma-history
http://goinventory-service:80/v1/inventory/rma-history

Switch Replace Details

getRMADetail

Get RMA Detail

query Parameters
rma_id
required
string

RMA Id of the entry for which detail is fetched

Responses

200

OK

404

Status of the device was not found.

500

Unexpected error.

default

Unexpected error

get/rma-detail
http://goinventory-service:80/v1/inventory/rma-detail

Compare

compareSwitch

Compare the Specified Switch configuration with whats in the Asset DB

query Parameters
ip_address
required
string

IP Addresses of the device which we want to compare configuration that is saved on the device vs actual configuration on the device.

Responses

200

OK

404

A switch with the specified IP doesnt exists.

500

Unexpected error

default

Unexpected error

post/switch/compare
http://goinventory-service:80/v1/inventory/switch/compare

Switch Setting

getSwitchSetting

query Parameters
ip_address
required
string

IP Addresses of the device to be retrieved.

Responses

200

OK

207

Partial success

400

Incorrect values specified for Switch setting

401

Authorization information is missing or invalid.

404

A Switch with the specified IP was not found.

409

A Switch settings already exist and cannot be updated.

500

Unexpected error.

default

Unexpected error

get/switchconfig/setting
http://goinventory-service:80/v1/inventory/switchconfig/setting

updateSwitchSetting

Request Body schema: application/json

Update Switch Settings.

ip_address
required
string
keyval
required
Array of objects (DeviceParameter)

Responses

200

OK

400

Incorrect values specified for Switch setting

401

Authorization information is missing or invalid.

404

A Switch with the specified IP was not found.

409

A switch settings already exist and cannot be updated.

422

Specified switch setting doesnt exist.

500

Unexpected error.

default

Unexpected error

put/switchconfig/setting
http://goinventory-service:80/v1/inventory/switchconfig/setting

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ip_address": "10.20.30.40",
  • "keyval":
    [
    ]
}

Drift and reconcile

driftAndReconcile

Trigger drift and reconcile for fabric and tenant.

query Parameters
ip_address
required
string

IP Addresses of the device to be retrieved.

reconcile
required
boolean
Default: false

Value true implies efa drift with devices will be reconciled

Responses

202

Accepted drift and reconcile execution request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

post/switchconfig/drift-reconcile
http://goinventory-service:80/v1/inventory/switchconfig/drift-reconcile

driftAndReconcile

delet drift and reconcile ID.

query Parameters
key
string

IP Addresses of the device or drift and reconcile uuid to deleted.

Responses

200

drift and reconcile delete request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

delete/switchconfig/drift-reconcile
http://goinventory-service:80/v1/inventory/switchconfig/drift-reconcile

switch health status

switchHealthStatus

current health status for the switch.

query Parameters
ip_address
required
string

IP Addresses of the device to be retrieved.

Responses

200

Accepted drift and reconcile execution request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

get/switchhealth/status
http://goinventory-service:80/v1/inventory/switchhealth/status

Config Replay

StartConfigReplay

Config Replay to device.

query Parameters
ip_address
required
string

IP Addresses of the device to be replayed.

cb_id
string

ConfigBackup Id of the config to be applied

ss_id
string

Snapshot Id of the config to be applied

Responses

202

Accepted config replay execution request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

post/switchconfig/config-replay
http://goinventory-service:80/v1/inventory/switchconfig/config-replay

ConfigReplay

Delete Config Replay ID.

query Parameters
key
string

IP Addresses of the device or config Replay uuid to deleted.

Responses

200

Config Replay delete request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

delete/switchconfig/config-replay
http://goinventory-service:80/v1/inventory/switchconfig/config-replay

Config Backup

StartConfigBackup

Config Backup from device.

query Parameters
ip_address
required
string

IP Addresses of the device to be retrieved.

Responses

202

Accepted config backup request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

post/switchconfig/config-backup
http://goinventory-service:80/v1/inventory/switchconfig/config-backup

ConfigBackup

Delete Config Backup ID.

query Parameters
key
string

IP Addresses of the device or config backup uuid to deleted.

Responses

200

Config Backup delete request

409

Invalid IP address.

500

Unexpected error.

default

Unexpected error

delete/switchconfig/config-backup
http://goinventory-service:80/v1/inventory/switchconfig/config-backup

Switches

getSwitches

Get All switches in the specified fabric.

query Parameters
fabric_name
string

Only devices which are associated to the fabric name specified as returned.

device_ids
Array of integers non-empty

Database Ids of switches to be fetched

device_ips
Array of strings non-empty

IPs of the devices to be fetched

orphan
boolean

This is a standalone parameter, which is used to return devices not associated to any fabric. fabric_name/device_ids/device_ips/role cannot be specified with this parameter

role
string
Enum: "Leaf" "Spine" "SuperSpine" "BorderLeaf" "SuperSuperSpine"

Only devices with the specified role are returned. This parameter works in conjunction with fabric_name parameter and is not expected by itself

Responses

200

OK

404

No switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

get/switches
http://goinventory-service:80/v1/inventory/switches

updateSwitches

Update All switches in the specified fabric.

query Parameters
device_ips
Array of strings non-empty

IP Addresses of the device(s) to be updated.

fabric_name
string

Update devices which are associated to the fabric name.

username
string

Update username and password for the devices.

password
string

Update username and password for the devices.

Responses

200

OK

404

No switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

put/switches
http://goinventory-service:80/v1/inventory/switches

deleteSwitches

Delete the specified devices from the inventory.

query Parameters
device_ips
Array of strings non-empty

IP Addresses of the device to be deleted.

fabric_name
string

Fabric name. Devices in this fabric will be deleted.

Responses

200

OK

401

Authorization information is missing or invalid.

404

A switch with the specified IP Address was not found.

500

Unexpected error.

default

Unexpected error

delete/switches
http://goinventory-service:80/v1/inventory/switches

manageSwitchesConfig

Manage the running-config on the specified devices.

Request Body schema: application/json

Managed the running-config for devices in the fabric or specified devices.

device_ips
Array of strings

IP Addresses of the devices for managing the running-config.

fabric_name
string

Name of the fabric

persist_local
boolean
Default: true

Save the running-config to the startup-config on the specified devices.

Responses

200

OK

401

Authorization information is missing or invalid.

404

No switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

post/switches/running-config
http://goinventory-service:80/v1/inventory/switches/running-config

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "fabric_name": "fabric_name",
  • "device_ips":
    [
    ],
  • "persist_local": true
}

executeSwitchesCli

Execute CLI commands on the specified devices.

Request Body schema: application/json

Execute CLI commands on the devices in the fabric or specified devices.

device_ips
Array of strings

IP Addresses of the devices to execute the CLI command.

fabric_name
string

Name of the fabric

role
string
Enum: "Spine" "Leaf" "Super Spine" "Border Leaf" "Standalone"

role of the device

commands
string

CLI commands to be executed on the device.

config
boolean
Default: false

Specifies if the command is to be executed on config-term or exec-mode of the device.

Responses

200

OK

401

Authorization information is missing or invalid.

404

No switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

post/switches/execute-cli
http://goinventory-service:80/v1/inventory/switches/execute-cli

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "fabric_name": "default",
  • "role": "Spine",
  • "device_ips":
    [
    ],
  • "config": false,
  • "commands": "show version"
}

FirmwareDownload

getFirmwareDownloadStatus

Get the status of the firmware download execution.

query Parameters
fabric_name
string

Fabric name. Get the firmware download execution status for devices in the given fabric.

execution_id
string

Execution ID. Get the firmware download execution status for devices in the fabric by execution ID.

Responses

200

OK

404

No firmware download execution switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

get/switches/firmware-download
http://goinventory-service:80/v1/inventory/switches/firmware-download

executeFirmwareDownload

Execute firmware download on the prepared switches.

query Parameters
fabric_name
required
string

Fabric name. Execute the firmware download for prepared devices in the given fabric.

Responses

202

Accepted firmware download execution request

404

No prepared switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

post/switches/firmware-download/execute
http://goinventory-service:80/v1/inventory/switches/firmware-download/execute

getPreparedSwitches

Get the prepared devices ready for a firmware download operation.

query Parameters
device_ips
Array of strings non-empty

IPs of the devices to be fetched

fabric_name
string

Fabric name. Prepared devices in this fabric to be fetched.

Responses

200

OK

404

No switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

get/switches/firmware-download/prepare
http://goinventory-service:80/v1/inventory/switches/firmware-download/prepare

addPreparedSwitches

Prepare the devices for a firmware download operation.

Request Body schema: application/json

IPs of the devices to be prepared for a firmware download.

device_ips
Array of strings
fabric
string
firmware_host
required
string
firmware_directory
required
string

Responses

200

OK

401

Authorization information is missing or invalid.

404

No switches found for the specified fabric.

422

Specified Fabric not found.

500

Unexpected error.

default

Unexpected error

post/switches/firmware-download/prepare
http://goinventory-service:80/v1/inventory/switches/firmware-download/prepare

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "fabric": "fabric",
  • "device_ips":
    [
    ],
  • "firmware_host": "firmware_host",
  • "firmware_directory": "firmware_directory"
}

removePreparedSwitches

Un-prepare the devices from a firmware download operation.

query Parameters
device_ips
Array of strings non-empty

IP Addresses of the devices to be unprepared from a firmware download operation.

fabric_name
string

Fabric name. Devices in this fabric will be un-prepared.

Responses

200

OK

401

Authorization information is missing or invalid.

404

A switch with the specified IP Address was not found.

500

Unexpected error.

default

Unexpected error

delete/switches/firmware-download/prepare
http://goinventory-service:80/v1/inventory/switches/firmware-download/prepare

Interfaces

getInterfaces

Get only the interfaces with the specific parameters for the specified switch

query Parameters
device_ips
Array of strings non-empty

IP address of the device for which the interfaces are being fetched for

device_ids
Array of integers non-empty

IP address of the device for which the interfaces are being fetched for

type
required
string
Default: "All"
Enum: "All" "Physical" "Loopback" "VE" "PO"

Interface types. All, Ethernet interfaces, Loopback interfaces only, VE interfaces only or Port channels only

fabric_intf_role
string
Enum: "fabric" "edge"

Fabric interface role , it can be either fabric or edge, Fabric means it will returns interfaces connected to other fabric devices otherwise it is edge ports. This parameter must be given in conjunction with device_ips or device_ids

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/interfaces
http://goinventory-service:80/v1/inventory/interfaces

Down/Up Interfaces

Down/Up interfaces with the specific parameters for the specified switch

Request Body schema: application/json

Register a new Switch.

ip_address
required
string
intfNames
required
Array of strings
adminState
required
string
Enum: "up" "down"
intfType
string
Default: "Eth"
Enum: "Eth" "VE" "PO"

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

put/interfaces/admin-state
http://goinventory-service:80/v1/inventory/interfaces/admin-state

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "intfType": "Eth",
  • "adminState": "up",
  • "ip_address": "ip_address",
  • "intfNames":
    [
    ]
}

Create Brakout Interface Port

Create Brakout interfaces port with the specific parameters for the specified switch

Request Body schema: application/json

Breakout break Port into multiple interfaces.

ip_address
required
string

IP Address of device

intfNames
required
Array of strings

Interface Port Names

intfType
string
Default: "Eth"
Enum: "Eth" "VE" "PO"
mode
required
string
Enum: "1x10g" "1x25g" "1x40g" "1x100g" "2x40g" "2x50g" "4x10g" "4x25g"

Port breakout mode

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

post/interfaces/breakout
http://goinventory-service:80/v1/inventory/interfaces/breakout

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "mode": "1x10g",
  • "intfType": "Eth",
  • "ip_address": "ip_address",
  • "intfNames":
    [
    ]
}

Remove Breakout of Interface Port

Remove Breakout of interfaces port with the specific parameters for the specified switch

Request Body schema: application/json

Removes Breakout of interfaces of the Switch.

ip_address
required
string

IP Address of device

intfNames
required
Array of strings

Interface Port Names

intfType
string
Default: "Eth"
Enum: "Eth" "VE" "PO"

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

delete/interfaces/breakout
http://goinventory-service:80/v1/inventory/interfaces/breakout

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ip_address": "string",
  • "intfNames":
    [
    ],
  • "intfType": "Eth"
}

Change Interface Port Speed

Change interfaces port speed with the specific parameters for the specified switch

Request Body schema: application/json

Change Port speed of interfaces of the Switch.

ip_address
required
string

IP Address of device

intfNames
required
Array of strings

Interface Port Names

speed
required
string
Enum: "100Mbps" "1Gbps" "10Gbps" "25Gbps" "40Gbps" "100Gbps" "1GbpsAN" "AUTO"

Port Speed

intfType
string
Default: "Eth"
Enum: "Eth" "VE" "PO"

Interface Type

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

put/interfaces/port-speed
http://goinventory-service:80/v1/inventory/interfaces/port-speed

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "intfType": "Eth",
  • "ip_address": "ip_address",
  • "intfNames":
    [
    ],
  • "speed": "100Mbps"
}

Set Mtu to Interface

Set L2Mtu, IPv4Mtu and IPv6Mtu to interfaces with the specific parameters for the specified switch

Request Body schema: application/json

Set L2Mtu, IPv4Mtu and IPv6Mtu to device interfaces.

ip_address
required
string

IP Address of device

intfNames
required
Array of strings

Interface Port Names

intfType
string
Default: "Eth"
Enum: "Eth" "VE" "PO"

Interface Type

mtu
integer

L2 Mtu of interface

ip_mtu
integer

IPv4 Mtu of interface

ipv6_mtu
integer

IPv6 Mtu of interface

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

put/interfaces/set-mtu
http://goinventory-service:80/v1/inventory/interfaces/set-mtu

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ip_address": "string",
  • "intfNames":
    [
    ],
  • "intfType": "Eth",
  • "mtu": 0,
  • "ip_mtu": 0,
  • "ipv6_mtu": 0
}

Port Channels

getPortChannels

Get only the POs with the specific parameters for the specified switches

query Parameters
device_ips
Array of strings non-empty

IP address of the device for which the port channels are being fetched for

device_ids
Array of integers non-empty

IP address of the device for which the port channels are being fetched for

po_numbers
Array of integers non-empty

Numbers of the Port Channels to be fetched

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/portchannels
http://goinventory-service:80/v1/inventory/portchannels

LLDP data

getLldpData

Get LLDP data for a given input param

query Parameters
remote_macs
Array of strings non-empty

fetch the lldp data for remote interface MACs in hhhh.hhhh.hhhh format

device_ips
Array of strings non-empty

fetch the lldp data for device ips in hhh.hhh.hhh.hhh format

Responses

200

OK

400

Get links request has invalid input params.

401

Authorization information is missing or invalid.

404

Links with specified device IP/ID or fabric name/ID or link ID was not found.

500

Unexpected error.

default

Unexpected error

get/lldp_data
http://goinventory-service:80/v1/inventory/lldp_data

VLANS

getVLANs

Get VLANS for the specified switches

query Parameters
device_ip
string

IP address of the device for which the VLANs are being fetched for

device_id
integer

Device IDs for which the VLANs are being fetched for

vlan_ids
Array of integers non-empty

VLAN IDs to be fetched

Responses

200

OK

400

Vlan request has invalid input params.

401

Authorization information is missing or invalid.

404

Vlans with specified device IP/ID or Vlan ID was not found.

500

Unexpected error.

default

Unexpected error

get/vlans
http://goinventory-service:80/v1/inventory/vlans

Drift Reconcile History list

getDriftReconcileHistorys

Get Drift Reconcile History list

query Parameters
device_ip
string

Ip of the entry for which Drift-Reconcile history is fetched

Responses

200

OK

404

No Drift Reconcile History found in the system

500

Unexpected error

default

Unexpected error

get/drift-reconciles
http://goinventory-service:80/v1/inventory/drift-reconciles

Drift Reconcile Details

getDriftReconcileDetail

Get Drift Reconcile Detail

query Parameters
dr_id
required
string

DriftReconcile Id of the entry for which detail is fetched

Responses

200

OK

404

Status of the device was not found.

500

Unexpected error.

default

Unexpected error

get/drift-reconcile-detail
http://goinventory-service:80/v1/inventory/drift-reconcile-detail

Config Backup History list

getConfigBackupHistorys

Get Config Backup History list

query Parameters
device_ip
string

Ip of the entry for which Config-Backup history is fetched

Responses

200

OK

404

No Drift Reconcile History found in the system

500

Unexpected error

default

Unexpected error

get/config-backups
http://goinventory-service:80/v1/inventory/config-backups

Config Backup Details

getConfigBackupDetail

Get Config Backup Detail

query Parameters
cb_id
required
string

ConfigBackup Id of the entry for which detail is fetched

show_config
boolean

Show complete configuration text

Responses

200

OK

404

Status of the device was not found.

500

Unexpected error.

default

Unexpected error

get/config-backup-detail
http://goinventory-service:80/v1/inventory/config-backup-detail

Config Replay History list

getConfigReplayHistorys

Get Config Replay History list

query Parameters
device_ip
string

Ip of the entry for which Config-Replay history is fetched

Responses

200

OK

404

No Config Replay History found in the system

500

Unexpected error

default

Unexpected error

get/config-replays
http://goinventory-service:80/v1/inventory/config-replays

Config Replay Details

getConfigReplayDetail

Get Config Replay Detail

query Parameters
cr_id
required
string

ConfigReplay Id of the entry for which detail is fetched

Responses

200

OK

404

Status of the device was not found.

500

Unexpected error.

default

Unexpected error

get/config-replay-detail
http://goinventory-service:80/v1/inventory/config-replay-detail

VE Interface

getVEs

Get only the VEs with the specific parameters for the specified switches

query Parameters
device_ips
Array of strings non-empty

IP address of the device for which the VEs are being fetched for

device_ids
Array of integers non-empty

IP address of the device for which the VEs are being fetched for

ve_ids
Array of integers non-empty

IDs of the VEs to be fetched

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/veinterfaces
http://goinventory-service:80/v1/inventory/veinterfaces

Router BGP

getRouterBgp

Get only the Router BGP with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the Router BGP are being fetched for

device_id
integer

IP address of the device for which the Router BGP are being fetched for

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/bgp
http://goinventory-service:80/v1/inventory/bgp

MCT

getMCTManagementCluster

Get only the MCT cluster node details with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the cluster members are being fetched for

device_id
integer

ID of the device for which the cluster member are being fetched for

node_ids
Array of integers non-empty

IDs of the cluster nodes to be fetched. This is optional parameter along with device_id or device_ip

ids
Array of integers non-empty

IDs of the nodes to be fetched

Responses

200

OK

400

Management cluster request has invalid input params.

401

Authorization information is missing or invalid.

404

Management Cluster with the specified device IP/ID or Node ID or instance ID was not found.

500

Unexpected error.

default

Unexpected error

get/mct/management
http://goinventory-service:80/v1/inventory/mct/management

getMCTClusterConfiguration

Get the MCT cluster configuration with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the cluster members are being fetched for

device_id
integer

Device ID of the device for which the cluster member are being fetched for

cluster_ids
Array of integers non-empty

cluster ID for which the configuration to be fetched. This is optional parameter along with device_ip or device_id

ids
Array of integers non-empty

IDs of the cluster client members to be fetched

Responses

200

OK

400

MCT cluster request has invalid input params.

401

Authorization information is missing or invalid.

404

MCT cluster with specified device IP/ID or Cluster ID or instance ID was not found.

500

Unexpected error.

default

Unexpected error

get/mct/cluster
http://goinventory-service:80/v1/inventory/mct/cluster

getMCTClusterClients

Get the MCT cluster client details with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the cluster members are being fetched for

device_id
integer

ID of the device for which the cluster member are being fetched for

client_ids
Array of integers non-empty

cluster client ID for which the members to be fetched

cluster_id
integer

ID of the cluster for which the clients to be fetched

ids
Array of integers non-empty

IDs of the cluster client members to be fetched

Responses

200

OK

400

MCT client request has invalid input params.

401

Authorization information is missing or invalid.

404

MCT clients with specificed device IP/ID or Client ID or Cluster ID or instance ID was not found.

500

Unexpected error.

default

Unexpected error

get/mct/client
http://goinventory-service:80/v1/inventory/mct/client

LIF

getLIF

Get only the LIFs details with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the lifs are being fetched for

device_id
integer

IP address of the device for which the lifs are being fetched for

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/lif
http://goinventory-service:80/v1/inventory/lif

EVPN

getEVPNInstance

Get only the EVPN Instance details along with Bridge Domain, VLAN mapping with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the evpn instance are being fetched for

device_id
integer

Device ID for which the evpn instance are being fetched for

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/evpn
http://goinventory-service:80/v1/inventory/evpn

Pseudowire Profile

getPseudowireProfile

Get the Pseudowire Profile details with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the Pseudowire Profile details are being fetched for

device_id
integer

IP address of the device for which the Pseudowire Profile details are being fetched for

pseudowire_profiles
Array of strings non-empty

Pseudowire Profiles that users want to specifically query. This will be in conjunction with the device_id or device_ip

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/pwprofile
http://goinventory-service:80/v1/inventory/pwprofile

Bridge Domain

getBridgeDomain

Get only the EVPN Instance details along with Bridge Domain mapping with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the BD details are being fetched for

device_id
integer

IP address of the device for which the BD details are being fetched for

bridge_domains
Array of integers non-empty

Bridge domains that users want to specifically query. This will be in conjunction with the device_id or device_ip

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/bridgedomain
http://goinventory-service:80/v1/inventory/bridgedomain

Overlay Gateway

getOverlayGateway

Get only the Overlay Gateway details along with Bridge Domain to VNI mappinps and VLAN to VNI mapping with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the overlay gateway details are being fetched for

device_id
integer

Device ID for which the overlay gateway details are being fetched for

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/overlaygateway
http://goinventory-service:80/v1/inventory/overlaygateway

Tunnels

getTunnel

Get only the Tunnel details with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the tunnel details are being fetched for

device_id
integer

IP address of the device for which the tunnel details are being fetched for

ids
Array of integers non-empty

IDs of the tunnel details to be fetched

tunnel_numbers
Array of integers non-empty

Tunnel Numbers of the tunnel details to be fetched

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/tunnel
http://goinventory-service:80/v1/inventory/tunnel

VRF

getVRF

Get only the VRF details with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the VRF details are being fetched for

device_id
integer

IP address of the device for which the VRF details are being fetched for

ids
Array of integers non-empty

IDs of the VRF details to be fetched

vrfs
Array of strings non-empty

VRF names of the VRF details to be fetched. This will be in conjunction with device_ip or device_id

Responses

200

OK

400

VRF request has invalid input params.

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/vrf
http://goinventory-service:80/v1/inventory/vrf

VRRP

getVRRP

Get only the VRRP details with the specific parameters for the specified switch

query Parameters
device_ip
string

IP address of the device for which the VRF details are being fetched for

device_id
integer

IP address of the device for which the VRF details are being fetched for

int_type
string
Enum: "ethernet" "ve"

Interface Type to fetch VRRP details for. This works in conjunction with device_id or device_ip and int_name

int_name
string

Interface Name to fetch VRRP details for. This works in conjunction with device_id or device_ip and int_type

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/vrrp
http://goinventory-service:80/v1/inventory/vrrp

SupportSave

getSupport

Capture the supportsave data and return the file name in the response

Responses

200

OK

401

Authorization information is missing or invalid.

500

Unexpected error.

default

Unexpected error

get/support
http://goinventory-service:80/v1/inventory/support

Trouble Shooting

getExecutionDetail

Get the detailed output of the given execution ID

query Parameters
id
required
string

Detailed output of the given execution ID

Responses

200

OK

401

Authorization information is missing or invalid.

500

Unexpected error.

default

Unexpected error

get/execution
http://goinventory-service:80/v1/inventory/execution

getExecutionList

Get the list of all the previous executions

query Parameters
limit
required
integer
Default: 10

Limit the number of executions that will be sent in the response. Default is 10

status
string
Default: "all"

Filter the executions based on the status(failed/succeeded/all)

Responses

200

OK

401

Authorization information is missing or invalid.

500

Unexpected error.

default

Unexpected error

get/executions
http://goinventory-service:80/v1/inventory/executions

GetRunningConfig

Get the list of all CLIs in Running Config

Responses

200

OK

401

Authorization information is missing or invalid.

500

Unexpected error.

default

Unexpected error

get/runningConfig
http://goinventory-service:80/v1/inventory/runningConfig

Key Value

getKeyValueList

Returns a list of all key value pairs.

query Parameters
prefix
string

Only return values which name starts with the provided prefix.

decrypt
boolean

Decrypt secrets and display plain text

limit
integer
Default: 100

Number of keys to get

Responses

200

List of key value pairs

default

Unexpected error

get/keys
http://goinventory-service:80/v1/inventory/keys

Response samples

Content type
No sample

getValueForKey

Get a specific key vale pair based on key_name.

path Parameters
name
required
string

Key Name

query Parameters
decrypt
boolean

Decrypt secrets and display plain text.

Responses

200

Key value pair requested.

default

Unexpected error

get/keys/{name}
http://goinventory-service:80/v1/inventory/keys/{name}

updateValueForKey

Create a new key value pair or update an existing one.

path Parameters
name
required
string

Key Name.

Request Body schema: application/json

Key Value pair content.

name
required
string

Key Name.

value
required
string

Key's value.

secret
boolean

Encrypt value before saving the value.

Responses

200

Key set/updated.

default

Unexpected error

put/keys/{name}
http://goinventory-service:80/v1/inventory/keys/{name}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "name",
  • "secret": true,
  • "value": "value"
}

deleteKey

Delete a Key.

path Parameters
name
required
string

Key Name.

Responses

204

Key deleted.

default

Unexpected error

delete/keys/{name}
http://goinventory-service:80/v1/inventory/keys/{name}

FirmwareHosts

getFirmwareHosts

Get all firmware hosts.

query Parameters
host_ips
Array of strings non-empty

IPs of the firmware hosts to be fetched

Responses

200

OK

404

No firmware hosts found.

500

Unexpected error.

default

Unexpected error

get/firmware-hosts
http://goinventory-service:80/v1/inventory/firmware-hosts

FirmwareHost

getFirmwareHost

Get only specified firmware host details. The firmware host can be identified by IP Address

query Parameters
ip_address
required
string

IP Address of the firmware host

Responses

200

OK

404

A firmware host with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/firmware-host
http://goinventory-service:80/v1/inventory/firmware-host

registerFirmwareHost

Register firmware host with the inventory service

Request Body schema: application/json

Register a new firmware host.

ip_address
required
string
protocol
required
string
Enum: "ftp" "tftp" "sftp" "scp" "http"
username
required
string
password
required
string

Responses

200

OK

401

Authorization information is missing.

409

A firmware host with the specified IP already exists.

422

Invalid IP/Protocol/Username/Password for registering the firmware host.

424

Firmware host connection failed while registering the host.

500

Unexpected error.

default

Unexpected error

post/firmware-host
http://goinventory-service:80/v1/inventory/firmware-host

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "protocol": "ftp",
  • "password": "password",
  • "ip_address": "ip_address",
  • "username": "username"
}

deleteFirmwareHost

Delete the specified firmware host from the inventory.

query Parameters
ip_address
required
string

IP Addresses of the firmware host to be deleted.

Responses

200

OK

404

A firmware host with the specified IP Address was not found.

422

Not able to delete the firmware host with specified IP Address.

500

Unexpected error.

default

Unexpected error

delete/firmware-host
http://goinventory-service:80/v1/inventory/firmware-host

updateFirmwareHost

Update the specified firmware host details in the inventory.

path Parameters
ip_address
required
string

IP Address of the firmware host to be updated.

Request Body schema: application/json

Update firmware host if credentials changes provide new username and password

ip_address
required
string
protocol
required
string
Enum: "ftp" "tftp" "sftp" "scp" "http"
username
required
string
password
required
string

Responses

200

OK

401

Authorization information is missing.

404

Couldnt connect to the firmware host.

422

Update firmware download host failed because of invalid IP address in the request.

424

Firmware host update failed for the specified IP address.

500

Unexpected error.

default

Unexpected error

put/firmware-host/{ip_address}
http://goinventory-service:80/v1/inventory/firmware-host/{ip_address}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "protocol": "ftp",
  • "password": "password",
  • "ip_address": "ip_address",
  • "username": "username"
}

MTU

Change Global MTU for the specified

Change global MTU with the specific parameters for the specified switch

Request Body schema: application/json

Change Port speed of interfaces of the Switch.

ip_address
required
string

IP Address of device

mtu
integer

Global L2 MTU

ip_mtu
integer

Global ipv4 MTU

ipv6_mtu
integer

Global ipv6 MTU

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

put/system/mtu
http://goinventory-service:80/v1/inventory/system/mtu

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ip_address": "string",
  • "mtu": 0,
  • "ip_mtu": 0,
  • "ipv6_mtu": 0
}

DeviceDetails

Change device discovery interval time

Change device discovery interval time for specific switch or switches in fabric

Request Body schema: application/json

Change Port speed of interfaces of the Switch.

ip_address
string

IP address of the device

fabric_name
string

Name of the fabric

min
integer

Device discovery time in minutes

hour
integer

Device discovery time in minutes

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

put/device/discovery
http://goinventory-service:80/v1/inventory/device/discovery

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ip_address": "10.25.225.165",
  • "fabric_name": "default",
  • "min": 30,
  • "hour": 2
}

Get device discovery interval time & device details

Get device discovery interval time for specific switch or switches in fabric

query Parameters
fabric_name
string

Only devices which are associated to the fabric name specified as returned.

device_ips
string

Device IP's of switches to be fetched

Responses

200

OK

401

Authorization information is missing or invalid.

404

A device with the specified IP was not found.

500

Unexpected error.

default

Unexpected error

get/device/discovery
http://goinventory-service:80/v1/inventory/device/discovery

Certificates

Install Certificates

Install certificates

Request Body schema: application/json

Install certificates on switches

device_ips
Array of strings
certificateType
string
Enum: "https" "token"

Type of certificate to be installed, either https or token

Responses

200

OK

401

Authorization information is missing or invalid.

500

Unexpected error.

default

Unexpected error

post/certificate
http://goinventory-service:80/v1/inventory/certificate

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "device_ips":
    [
    ],
  • "certificateType": "https"
}