Inventory
The Inventory API provide install base information for all the devices that are a part of a customer’s inventory.
Features
The Inventory API provides the following features:
- Supports RESTful interface, using a RAML definition file.
- Supports JSON data format
- Includes web services that return:
- List of network-elements with specific details
- Hardware inventory details for a specific device
- Inventories associated with specific customer
- Software installed on a device
Hardware
Hardware API retrieves hardware inventory details for a specific device. This API can be used to return hardware details for a specific customer. All request parameters are optional other than “customerId”.
If "neInstanceId" is not provided as part of the request, the response contains hardware information for all devices in the inventory of the specified customer.
This API supports filtering, pagination, sorting and chunked transfer encoding. For more information, see the General API Feature section for examples and features that allow you to optimize and manipulate the response.
URL
GET : https://apix.cisco.com/cs/api/v1/inventory/hardware
Request Parameters
Parameter | Type | Max Length | Required | Description |
---|---|---|---|---|
customerId | NUMBER | 12 | Required | Unique identifier of a Cisco customer. |
inventoryName | STRING | 25 | Optional | Name of the inventory. |
managedNeInstanceId | NUMBER | 19 | Optional | Identifier for the managed NetworkElement. In the case of a composite, multiple NetworkElements make up the whole. Each members of the composite is identified by its own neInstanceId. For example, a stack with 3 members has a total of 4 NetworkElements that consists of one managed NetworkElement (identified by managedNeInstanceId) and 3 additional NetworkElements (identified by neInstanceId). For information on Composite, refer Glossary. |
neInstanceId | NUMBER | 19 | Optional | Unique id used to identify an instance of a network element. Network element is a manageable logical entity uniting one or more physical devices. This allows distributed devices to be managed in a unified way using one management system. |
hwInstanceId | NUMBER | 22 | Optional | Unique identifier of the physical hardware. |
hwType | STRING | 512 | Optional | The physical type of the hardware. Valid values include Chassis, Module, Fan, Power Supply, Other. |
productSubtype | STRING | 512 | Optional | Further classification for hardware within a Product Type. It primarily exists for Data Center (UCS), Wireless (LWAP), and Collaboration (IP Phone) use-cases. |
productType | STRING | 512 | Optional | Broad classification of Cisco product that categorizes its function. |
productFamily | STRING | 512 | Optional | Grouping of similar Cisco products. |
productId | STRING | 512 | Optional | The alphanumeric unique identifier of a Cisco Product. The id is used by customers to order Cisco products. For example: CISCO2921/K9, WS-C3750X-24S-S, WS-X6748-GE-TX. |
serialNumber | STRING | 512 | Optional | A serial number is a unique number used for identification. For example: FTX1512AHK2, FDO1541Z067, SAD07370169. |
dimensionsFormat | STRING | Optional | Product dimensions (dimension format). "Dimensions (HxWxD) | |
dimensions | STRING | Optional | Product dimensions (dimension value). "31.25 x 17.2 x 22.75 in. (79.4 x 43.7 x 57.8 cm) | |
weight | STRING | Optional | "235 lb. (106.6 kg) fully-configured chassis. | |
formFactor | STRING | Optional | "18 rack units (RU) Mounting: 19 in. rack mountable\n(front or rear); 2 units per 7 ft. rack. \nNote: Mounting in 23 in. racks is possible with optional third-party hardware", "product_support_page": "", | |
supportPage | STRING | Optional | URL of the Cisco.com support product model (or series) page. | |
visioStencilUrl | STRING | Optional | URL from which the .zip file of the Visio stencils for a given product can be downloaded if it exists. | |
smallImageUrl | STRING | Optional | List of small image URLs for a given product if they exist. If multiple URLs exist, the URLs in the list will be separated by commas. | |
largeImageUrl | STRING | Optional | List of large image URLs for a given product if they exist. If multiple URLs exist, the URLs in the list will be separated by commas. | |
baseProductId | STRING | Optional | Manufacturing (or base) product ID for a given serial number. (UBR10012) | |
productReleaseDate | DATE | Optional | Product release date in the following format: YYYY-MM-DD. | |
page | NUMBER | Optional | Page number of the response. | |
rows | NUMBER | Optional | Number of rows of data per page. | |
snapshot | STRING | Optional | Option is "LATEST" and the value is case insensitive. Report includes inventory from latest upload only. | |
sort | STRING | Optional | Supported sort criteria are either ‘asc’ for ascending or ‘desc’ for descending. | |
fields | STRING | Optional | Requested fields in the response. |
Response Parameters
Parameter | Type | Max Length | Description |
---|---|---|---|
customerId | NUMBER | 12 | Unique identifier of a Cisco customer. |
neInstanceId | NUMBER | 19 | Unique id used to identify an instance of a network element. Network element is a manageable logical entity uniting one or more physical devices. This allows distributed devices to be managed in a unified way using one management system. |
managedNeInstanceId | NUMBER | 19 | Identifier for the managed NetworkElement. In the case of a composite, multiple NetworkElements make up the whole. Each members of the composite is identified by its own neInstanceId. For example, a stack with 3 members has a total of 4 NetworkElements that consists of one managed NetworkElement (identified by managedNeInstanceId) and 3 additional NetworkElements (identified by neInstanceId). For information on Composite, refer Glossary. |
inventoryName | STRING | 25 | Name of the inventory. |
hwInstanceId | NUMBER | 22 | Unique identifier of the physical hardware. |
hwName | STRING | 512 | Name assigned to a piece of hardware. Specially used for IP Phone and LWAP. |
hwType | STRING | 512 | Physical type of the hardware. Valid values include Chassis, Module, Fan, Power Supply, Other. |
productSubtype | STRING | 255 | Further classification for hardware within a Product Type. It primarily exists for Data Center (UCS), Wireless (LWAP), and Collaboration (IP Phone) use-cases. |
slot | STRING | The location of a hardware component in a chassis. | |
productFamily | STRING | 512 | Grouping of similar Cisco products. |
productId | STRING | 512 | The alphanumeric unique identifier of a Cisco Product. The id is used by customers to order Cisco products. For example: CISCO2921/K9, WS-C3750X-24S-S, WS-X6748-GE-TX. |
productType | STRING | 512 | Broad classification of Cisco product that categorizes its function. |
swVersion | STRING | 512 | A version of operating system installed on the Network Element. Example: 15.1(4)M4. |
serialNumber | STRING | 512 | A serial number is a unique number used for identification. For example: FTX1512AHK2, FDO1541Z067, SAD07370169. |
serialNumberStatus | STRING | 512 | Indicates whether the serial number was recognized in Cisco databases. For example, Recognized, Not Recognized, Missing. |
hwRevision | STRING | 128 | Revision number of hardware. For example, 1.3. |
tan | STRING | 512 | Top level manufacturing part number of the hardware. For example, 800-25952-06. |
tanRevision | STRING | 32 | Revision No. of Top Assembly Number (TAN). |
pcbNumber | STRING | 512 | Printed circuit board (PCB) number of the hardware. For example, 72-13456-01. |
installedMemory | NUMBER | 22 | The amount of installed memory in the chassis (in megabytes). |
installedFlash | NUMBER | 22 | The amount of installed flash in the chassis (in megabytes). |
collectedSerialNumber | STRING | 512 | The Serial Number that was collected by the Cisco Collector. |
collectedProductId | STRING | 512 | The Product ID value that was collected by the Cisco Collector. |
productName | STRING | 4000 | The name of a Cisco product. |
dimensionsFormat | STRING | Product dimensions (dimension format). Dimensions (HxWxD). | |
dimensions | STRING | Product dimensions. 31.25 x 17.2 x 22.75 in. (79.4 x 43.7 x 57.8 cm). | |
weight | STRING | Product weight with unit of measurement. 235 lb. (106.6 kg) fully-configured chassis. | |
formFactor | STRING | Form factor of the product if it exists. Example: 18 rack units (RU) Mounting: 19 in. rack mountable\n(front or rear); 2 units per 7 ft. rack. \nNote: Mounting in 23 in. racks is possible with optional third-party hardware. | |
supportPage | STRING | URL of the Cisco.com support product model (or series) page. | |
visioStencilUrl | STRING | URL from which the .zip file of the Visio stencils for a given product can be downloaded if it exists. | |
smallImageUrl | STRING | List of small image URLs for a given product if they exist. If multiple URLs exist, the URLs in the list will be separated by commas. | |
largeImageUrl | STRING | List of large image URLs for a given product if they exist. If multiple URLs exist, the URLs in the list will be separated by commas. | |
baseProductId | STRING | Manufacturing (or base) product ID for a given serial number. | |
productReleaseDate | DATE | Product release date in GMT date format YYYY-MM-DD . | |
productDescription | STRING | The description of a product. |
Sample Request
https://apix.cisco.com/cs/api/v1/inventory/hardware?customerId=1234
Sample JSON Response
{
"data": [
{
"customerId": 1234,
"neInstanceId": 55324697,
"managedNeInstanceId": 52955578,
"inventoryName": "Netformx_Default",
"hwInstanceId": 55371628,
"hwName": "GigabitEthernet2/0/19",
"hwType": "Module",
"productSubtype": null,
"slot": null,
"productFamily": "Transceiver Modules",
"productId": "GLC-SX-MM",
"productType": "Modules",
"swVersion": "12.2(40)EX3",
"serialNumber": "AGM121412R7",
"serialNumberStatus": "Recognized",
"hwRevision": null,
"tan": null,
"tanRevision": null,
"pcbNumber": null,
"installedMemory": 0,
"installedFlash": 0,
"collectedSerialNumber": "AGM121412R7",
"collectedProductId": null,
"productName": "GLC-SX-MM",
"dimensionsFormat": null,
"dimensions": null,
"weight": null,
"formFactor": null,
"supportPage": null,
"visioStencilUrl": null,
"smallImageUrl": null,
"largeImageUrl": null,
"baseProductId": null,
"productReleaseDate": null,
"productDescription": "Nexus 9500 linecard"
}
]
}
Network Elements
The Network Element API retrieves a list of devices along with specific details about those devices. All request parameters are optional other than “customerId”.
This API supports filtering, pagination, sorting and chunked transfer encoding. For more information, see the General API Feature section for examples and features that allow you to optimize and manipulate the response.
URL
GET: https://apix.cisco.com/cs/api/v1/inventory/network-elements
Request Parameters
Parameter | Type | Max Length | Required | Description |
---|---|---|---|---|
customerId | NUMBER | 12 | Required | Unique identifier of a Cisco customer. |
inventoryName | STRING | 25 | Optional | Name of the inventory. |
neInstanceId | NUMBER | 19 | Optional | Unique id used to identify an instance of a network element. Network element is a manageable logical entity uniting one or more physical devices. This allows distributed devices to be managed in a unified way using one management system. |
managedNeInstanceId | NUMBER | 19 | Optional | Identifier for the managed NetworkElement. In the case of a composite, multiple NetworkElements make up the whole. Each members of the composite is identified by its own neInstanceId. For example, a stack with 3 members has a total of 4 NetworkElements that consists of one managed NetworkElement (identified by managedNeInstanceId) and 3 additional NetworkElements (identified by neInstanceId). For information on Composite, refer Glossary. |
productFamily | STRING | 512 | Optional | Grouping of similar Cisco Products. Example: Cisco 2900 Series Integrated Services Routers. |
isManagedNe | STRING | 1 | Optional | Indicates whether the device is directly managed by the collector. |
ipAddress | STRING | 1024 | Optional | A numerical label assigned to each device (for example, computer, printer) participating in a computer network that uses the Internet Protocol for communication. |
hostname | STRING | 512 | Optional | Human-readable nicknames that correspond to the address of a device connected to a network. |
sysName | STRING | 255 | Optional | SNMP sysName of the network element. It will be a fully-qualified name, if domain name is set on the device. |
swVersion | STRING | 128 | Optional | A version of operating system installed on the Network Element. Example: 15.1(4)M4. |
swType | STRING | 512 | Optional | Type of software that is installed on this host/system. |
neType | STRING | 128 | Optional | Type of the network element. Values include COMPOSITE, COMPOSED, VIRTURAL, APPLICATION, STANDALONE. |
page | NUMBER | Optional | Page number of the response. | |
rows | NUMBER | Optional | Number of rows of data per page. | |
snapshot | STRING | Optional | Option is "LATEST" and the value is case insensitive. Report includes inventory from latest upload only. | |
sort | STRING | Optional | Supported sort criteria are either ‘asc’ for ascending or ‘desc’ for descending. | |
fields | STRING | Optional | Requested fields in the response. | |
timeRangeStart | DATE | Optional | Date from which data for NE collection is sent. GMT date format YYYY-MM-DD. | |
timeRangeEnd | DATE | Optional | End data to this date. GMT date format: YYYY-MM-DD. |
Response Parameters
Parameter | Type | Max Length | Description |
---|---|---|---|
customerId | NUMBER | 12 | Unique identifier of a Cisco customer. |
collectorId | STRING | 1024 | Unique identifier for a Cisco Collector (CSPC) appliance. |
neInstanceId | NUMBER | 19 | Unique id used to identify an instance of a network element. Network element is a manageable logical entity uniting one or more physical devices. This allows distributed devices to be managed in a unified way using one management system. |
managedNeInstanceId | NUMBER | 19 | Identifier for the managed NetworkElement. In the case of a composite, multiple NetworkElements make up the whole. Each members of the composite is identified by its own neInstanceId. For example, a stack with 3 members has a total of 4 NetworkElements that consists of one managed NetworkElement (identified by managedNeInstanceId) and 3 additional NetworkElements (identified by neInstanceId). For information on Composite, refer Glossary. |
inventoryName | STRING | 25 | Name of the inventory. |
managementAddress | STRING | 1024 | Name that the collector uses to communicate to the device. Example: routerA.cisco.com |
neSubtype | STRING | 128 | The subtype of the network element. Example: CLUSTER, STACK, VSS. |
inventoryAvailability | STRING | 255 | The availability of Network Element Inventory data for analytics. Values include: Available, Not Available, Not Supported. |
lastConfigRegister | STRING | 255 | The Configuration register of the device from the last reload. Example:0x2102. |
ipAddress | STRING | 1024 | A numerical label assigned to each device (for example, computer, printer) participating in a computer network that uses the Internet Protocol for communication. |
hostname | STRING | 512 | Human-readable nicknames that correspond to the address of a device connected to a network. |
sysName | STRING | 255 | SNMP sysName of the network element. It will be a fully-qualified name, if domain name is set on the device. |
reachabilityStatus | STRING | 128 | Status of the device as reported by the collector. For example, Reachable or Not Reachable. |
neType | STRING | 128 | Type of the network element. Values include COMPOSITE, COMPOSED, VIRTURAL, APPLICATION, STANDALONE. |
featureSet | STRING | 512 | Name of the software feature set running on the device. This data is primarily available for IOS. |
imageName | STRING | 512 | Image name of the operating system installed on the network element. |
createDate | DATE | Date when the network element was first added to inventory. GMT date format YYYY-MM-DD"T"HH24:MI:SS (Time is displayed in 24 hour format). | |
inventoryCollectionDate | DATE | Time when the collector last successfully collected inventory from the device. GMT date format YYYY-MM-DD"T"HH24:MI:SS. Time is displayed in 24 hour format. | |
lastReset | DATE | Timestamp date of the last reset of the device as reported by the show version command. GMT date format YYYY-MM-DD"T"HH24:MI:SS. Time is displayed in 24 hour format. | |
productFamily | STRING | 512 | Product family the device belongs to. |
productId | STRING | 512 | The alphanumeric unique identifier of a Cisco Product. The id is used by customers to order Cisco products. For example: CISCO2921/K9, WS-C3750X-24S-S, WS-X6748-GE-TX. |
productType | STRING | 512 | Broad classification of Cisco product that categorizes its function |
resetReason | STRING | 512 | Reason for the last system reset as reported in the show version output. |
swType | STRING | 512 | Type of software that is installed on this host/system. |
swVersion | STRING | 128 | A version of operating system installed on the Network Element. Example: 15.1(4)M4. |
sysContact | STRING | 255 | SNMP sysContact of the network element, which is populated in most devices using a configuration command. |
sysDescr | STRING | 255 | SNMP system description from the network element. |
sysLocation | STRING | 4000 | SNMP sysLocation of the network element, which is populated in most devices using a configuration command. |
sysObjectId | STRING | 255 | SNMP sysObjectID of the network element. |
userField1 | STRING | 128 | User field1 value populated in the collector seedfile. |
userField2 | STRING | 128 | User field2 value populated in the collector seedfile. |
userField3 | STRING | 128 | User field3 value populated in the collector seedfile. |
userField4 | STRING | 128 | User field4 value populated in the collector seedfile. |
configRegister | STRING | 512 | Configuration register of the device at the next reload. |
configAvailability | STRING | Availability of network element configuration data for analytics. For example, Available, Not Available, Not Supported . | |
configCollectionDate | DATE | Date and time when the collector last successfully collected the configuration from the device. GMT date format YYYY-MM-DD"T"HH24:MI:SS. Time is displayed in 24 hour format. | |
bootstrapVersion | STRING | 512 | The version of the boot code installed on the device. |
isManagedNe | NUMBER | 1 | Indicates whether the device is directly managed by the collector. |
macAddress | STRING | 512 | A media access control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. |
Sample Request
https://apix.cisco.com/cs/api/v1/inventory/network-elements?customerId=1234
Sample JSON Response
{
"data": [
{
"customerId": 1234,
"collectorId": "CSP0009024971",
"neInstanceId": 52824499,
"managedNeInstanceId": 23493608,
"inventoryName": "24OCT2017",
"managementAddress": "172.21.34.65",
"neSubtype": null,
"inventoryAvailability": "Not Available",
"lastConfigRegister": null
"ipAddress": "10.59.226.19",
"hostname": "SEML-HF317-AP001",
"sysName": "SEML-KC044-WLC003",
"featureSet": null,
"inventoryCollectionDate": "2017-12-04",
"productFamily": null,
"productId": null,
"productType": null,
"createDate": "2017-12-13",
"swType": "IOS",
"swVersion": "15.2(4)JB6",
"reachabilityStatus": "Reachable",
"neType": null,
"lastReset": null,
"resetReason": null,
"sysContact": null,
"sysDescr": "AIR-CAP3602I-E-K9",
"sysLocation": null,
"sysObjectId": "1.3.6.1.4.1.9.1.1069",
"configRegister": null,
"configAvailability": "Not Supported",
"configCollectionDate": null,
"imageName": null,
"bootstrapVersion": "NA",
"isManagedNe": 0,
"userField1": null,
"userField2": null,
"userField3": null,
"userField4": null,
"macAddress": "00:06:28:d9:00:20"
}
]
}
Software
The Software API returns details about the software installed on a device. All request parameters are optional other than “customerId”.
This API supports filtering, pagination, sorting and chunked transfer encoding. For more information, see the General API Feature section for examples and features that allow you to optimize and manipulate the response.
URL
GET : https://apix.cisco.com/cs/api/v1/inventory/software
Request Parameters
Parameter | Type | Max Length | Required | Description |
---|---|---|---|---|
customerId | NUMBER | 12 | Required | Unique identifier of a Cisco customer. |
inventoryName | STRING | 25 | Optional | Name of the inventory. |
managedNeInstanceId | NUMBER | 19 | Optional | Identifier for the managed NetworkElement. In the case of a composite, multiple NetworkElements make up the whole. Each members of the composite is identified by its own neInstanceId. For example, a stack with 3 members has a total of 4 NetworkElements that consists of one managed NetworkElement (identified by managedNeInstanceId) and 3 additional NetworkElements (identified by neInstanceId). For information on Composite, refer Glossary. |
swType | STRING | 255 | Optional | Type of software that is installed on this host/system. |
swVersion | STRING | 512 | Optional | A version of operating system installed on the Network Element. Example: 15.1(4)M4. |
swCategory | STRING | 128 | Optional | Broader category of the software record. The role of the software running on a network element. For example, System Software, Application Software Patch, Package . |
swStatus | STRING | 128 | Optional | Status of the software running on the network element. Default value is ACTIVE. For PIE and SMU it can be COMMITTED. |
swName | STRING | 512 | Optional | Name of the software running on the network element. For System SW, the value is image name. For PIE, the value is package name and SMU, the value is SMU name. For example, asr9k-p-4.2.3.CSCtz41749-1.0.0 . |
page | NUMBER | Optional | Page number of the response. | |
rows | NUMBER | Optional | Number of rows of data per page. | |
snapshot | STRING | Optional | Option is "LATEST" and the value is case insensitive. Report includes inventory from latest upload only. | |
sort | STRING | Optional | Supported sort criteria are either ‘asc’ for ascending or ‘desc’ for descending. | |
fields | STRING | Optional | Requested fields in the response. |
Response Parameters
Parameter | Type | Max Length | Description |
---|---|---|---|
customerId | NUMBER | 12 | Unique identifier of a Cisco customer. |
managedNeInstanceId | NUMBER | 19 | Identifier for the managed NetworkElement. In the case of a composite, multiple NetworkElements make up the whole. Each members of the composite is identified by its own neInstanceId. For example, a stack with 3 members has a total of 4 NetworkElements that consists of one managed NetworkElement (identified by managedNeInstanceId) and 3 additional NetworkElements (identified by neInstanceId). For information on Composite, refer Glossary. |
inventoryName | STRING | 25 | Name of the inventory. |
swType | STRING | 255 | Type of software that is installed on this host/system. |
swVersion | STRING | 512 | A version of operating system installed on the Network Element. Example: 15.1(4)M4. |
swMajorVersion | STRING | 512 | Major version of the software version. For example, 15.1. |
swCategory | STRING | 128 | Broader category of the software record. The role of the software running on a network element. For example, System Software, Application Software Patch, Package. |
swStatus | STRING | 128 | Status of the software running on the network element. Default value is ACTIVE. For PIE and SMU it can be COMMITTED. |
swName | STRING | 512 | Name of the software running on the network element. For System SW, the value is image name. For PIE, the value is package name and SMU, the value is SMU name. For example, asr9k-p-4.2.3.CSCtz41749-1.0.0 . |
Sample Request
https://apix.cisco.com/cs/api/v1/inventory/software?customerId=1234
Sample JSON Response
{
"data": [
{
"customerId": 1234,
"managedNeInstanceId": 48325511,
"inventoryName": "24OCT2017",
"swType": null,
"swVersion": "5.2",
"swMajorVersion": "5.2",
"swCategory": "SYSTEM",
"swStatus": null,
"swName": "UCOS"
}
]
}