Extreme Fabric Automation - Inventory Service APIs (2.1.0)

Download OpenAPI specification:Download

The Inventory/Asset Service APIs are used by multiple services to access network configuration/state data.

Topology

getTopology

Get All Devices and its assets registered with the inventory

Responses

200

OK

404

No fabrics found in the system.

500

Unexpected error.

default

Unexpected error

get /topology
http://goinventory-service:8082/v1/inventory/topology

Switch

getSwitch

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:8082/v1/inventory/switch

deleteSwitch

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:8082/v1/inventory/switch

updateSwitch

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

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:8082/v1/inventory/switch/{ip_address}

Request samples

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

Register

registerSwitch

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

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:8082/v1/inventory/switch

Request samples

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

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

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:8082/v1/inventory/switches

Request samples

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

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.

Responses

200

OK

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:8082/v1/inventory/switch/replace

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:8082/v1/inventory/switch/compare

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:8082/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:8082/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:8082/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:8082/v1/inventory/switches/running-config

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "device_ips":
    [
    ],
  • "fabric_name": "string",
  • "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:8082/v1/inventory/switches/execute-cli

Request samples

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

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:8082/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:8082/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:8082/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:8082/v1/inventory/switches/firmware-download/prepare

Request samples

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

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:8082/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:8082/v1/inventory/interfaces

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:8082/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

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:8082/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:8082/v1/inventory/vlans

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:8082/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:8082/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:8082/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:8082/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:8082/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:8082/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:8082/v1/inventory/evpn

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:8082/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:8082/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:8082/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:8082/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:8082/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:8082/v1/inventory/support

Execution list

getExecutionList

Get the execution list of all the previous executions

query Parameters
limit
required
integer
Default: 100

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

Responses

200

OK

401

Authorization information is missing or invalid.

500

Unexpected error.

default

Unexpected error

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

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:8082/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:8082/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:8082/v1/inventory/keys/{name}

Request samples

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

deleteKey

Delete a Key.

path Parameters
name
required
string

Key Name.

Responses

204

Key deleted.

default

Unexpected error

delete /keys/{name}
http://goinventory-service:8082/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:8082/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:8082/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:8082/v1/inventory/firmware-host

Request samples

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

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:8082/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:8082/v1/inventory/firmware-host/{ip_address}

Request samples

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