Cisco Prime Infrastructure API
Prime Infrastructure API Documentation

GET Devices

Represents the device view with information about the managed network elements. It provides device information such as device name, device type, ip address, software type, version, and also provides the reachability and management status.

Since Product Version: 1.2

Resource Information

Rate Limiting?

Yes

Sorting?

Yes

Paging?

Yes

Filtering?

Yes

Group Filtering?

Yes

Aggregation?

Yes

Response Formats

xml

json

User Group

NBI Read

HTTP Methods

GET

Resource URL

/webacs/api/v3/data/Devices

To filter entities based on device groups, use Group Based Filtering as documented on the Filtering page on the Home page. Example: ?.group=myrouters

Updated

Since v3 version:
  • API does not contain alarm counts to improve performance.
  • The attribute 'collectionStatus' was added.

Deprecated

This version has been deprecated in favor of the v4 version, which allows for easier filtering of manufacturer part numbers.

Response Parameters

Attribute Description

adminStatus String

Represents the current admin status of the device.

collectionDetail String

A detailed status of inventory collection

collectionStatus InventoryCollectionStatusEnum

Last inventory collection status

Allowed values:

  • COMPLETED
  • MAJORCOMPLETED
  • COLLECTIONFAILURE
  • PARTIALCOLLECTIONFAILURE
  • SNMPCONNECTIVITYFAILED
  • WRONGCLICREDENTIALS
  • WRONGHTTPCREDENTIALS
  • SYNCHRONIZING
  • MAJORSYNCHRONIZING
  • MINORSYNCHRONIZING
  • SNMPUSERAUTHENTICATIONFAILED
  • NOLICENSE
  • ADDINITIATED
  • DELETEINPROGRESS
  • PINGUNREACHABLE
  • SPT_ONLY
  • IN_SERVICE_MAINTENANCE
  • IN_SERVICE

collectionTime Date

Time of inventory collection

creationTime Date

The timestamp when the instance of the device was created.

deviceId Long

An internal id to recognize the device, which is the id of the associated management network element associated with this device.

deviceName String

The name of the device.

deviceType String

The type of the device.

ipAddress String

The ip address of the device. This is the preferred management access address for the device. This is typically an address at which SNMP, telnet, and ssh agents are available.

location String

The system location of the device.

managementStatus LifecycleStateEnum

Represents the current management state of the network element: managed, unmanaged, under maintenance, and so on. This state is modified by events in the network and network management system, and also by user request.

Allowed values:

  • UNKNOWN
  • ADDED_ININITIALSTATE
  • MANAGED_BUT_NEVERSYNCHRONIZED
  • MANAGED_AND_SYNCHRONIZED
  • MANAGED_BUT_OUTOFSYNC
  • MANAGED_BUT_LOSSOFCONNECTIVITY
  • PREPROVISIONED
  • UNMANAGED
  • INSERVICE_MAINTENANCE
  • MANAGED_BUT_INCOMPLETE
  • MANAGED_BUT_AGENTSHUTTINGDOWN
  • MANAGED_PREPARINGFORMAINTENANCE
  • MANAGED_BUT_DUPLICATE
  • MANAGED_BUT_CONFLICTINGCREDENTIALS
  • MANAGED_BUT_SYNCHRONIZING
  • UNMANAGED_UNLICENSED
  • IN_SERVICE
  • OUT_OF_SERVICE
  • OUT_OF_SERVICE_FOR_MAINTENANCE
  • SYNC_DISABLED
  • QUARANTINED

manufacturerPartNr String[]

The manufacturer part numbers that make up the device chassis.

productFamily String

The product family of this device.

reachability ReachabilityStateEnum

Indicates management availability or reachability of the managed network element. It can indicate the availability or reachability of the management agent serving as a proxy for the network element.

Allowed values:

  • UNKNOWN
  • REACHABLE
  • UNREACHABLE
  • AGENT_UNREACHABLE
  • AGENT_UNLOADED
  • PING_REACHABLE
  • PING_UNREACHABLE

softwareType String

A string that identifies the specific type of software that is installed. For example, Cisco IOS or Linux.

softwareVersion String

The specific version of the software (see attribute softwareType) that is installed. The value is formatted as a text field.

Sample Payloads

Sample payloads are for information only. They are automatically generated and the values included may not be representative of actual valid data values.

Sample XML Payload

https://localhost/webacs/api/v3/data/Devices/15

<?xml version="1.0" ?>
<queryResponse type="Devices" responseType="getEntity" requestUrl="https://localhost/webacs/api/v3/data/Devices/15" rootUrl="https://localhost/webacs/api/v3/data">
  <entity dtoType="devicesDTO" type="Devices" url="https://localhost/webacs/api/v3/data/Devices/15">
    <devicesDTO displayName="String value" id="15" uuid="String value">
      <collectionDetail>String value</collectionDetail>
      <collectionTime>2019-08-20T09:00:57.124Z</collectionTime>
      <creationTime>2019-08-20T09:00:57.124Z</creationTime>
      <deviceId>15</deviceId>
      <deviceName>String value</deviceName>
      <deviceType>String value</deviceType>
      <ipAddress>String value</ipAddress>
      <location>String value</location>
      <managementStatus>UNKNOWN</managementStatus>
      <productFamily>String value</productFamily>
      <reachability>UNKNOWN</reachability>
      <softwareType>String value</softwareType>
      <softwareVersion>String value</softwareVersion>
      <adminStatus>String value</adminStatus>
      <collectionStatus>COMPLETED</collectionStatus>
      <manufacturerPartNrs>
        <manufacturerPartNr>String value</manufacturerPartNr>
        <manufacturerPartNr>Another string value</manufacturerPartNr>
      </manufacturerPartNrs>
    </devicesDTO>
  </entity>
</queryResponse>

Sample JSON Payload

https://localhost/webacs/api/v3/data/Devices/15.json

{
  "queryResponse" : {
    "@type" : "Devices",
    "@requestUrl" : "https://localhost/webacs/api/v3/data/Devices/15",
    "@responseType" : "getEntity",
    "@rootUrl" : "https://localhost/webacs/api/v3/data",
    "entity" : [ {
      "@dtoType" : "devicesDTO",
      "@type" : "Devices",
      "@url" : "https://localhost/webacs/api/v3/data/Devices/15",
      "devicesDTO" : {
        "@displayName" : "String value",
        "@id" : 15,
        "@uuid" : "String value",
        "adminStatus" : "String value",
        "collectionDetail" : "String value",
        "collectionStatus" : "COMPLETED",
        "collectionTime" : "2019-08-20T09:00:57.124Z",
        "creationTime" : "2019-08-20T09:00:57.124Z",
        "deviceId" : 15,
        "deviceName" : "String value",
        "deviceType" : "String value",
        "ipAddress" : "String value",
        "location" : "String value",
        "managementStatus" : "UNKNOWN",
        "manufacturerPartNrs" : {
          "manufacturerPartNr" : [ "String value", "Another string value" ]
        },
        "productFamily" : "String value",
        "reachability" : "UNKNOWN",
        "softwareType" : "String value",
        "softwareVersion" : "String value"
      }
    } ]
  }
}