Example JSON output for chassis devices

Use this information to understand the format of the JSON file that the Topology API produces as output.

The following code snippet shows an example of a JSON file produced as output for a Topology API query for a single device with the entity identifier 1996. Refer to Extracting topology data for a limited set of chassis devices for the format of queries for specific devices.

Example of JSON output

For a description of this output, see the notes that follow the output.
Note: The actual output produced does not have the indentation in this example. The output is indented here in order to make the data easier to read.
{
	"devices":
	{
		"items":
		[
			{
				"memorysize":null,
				"classid":5,
				"classname":"NetworkDevice",
				"syslocation":"3rd Floor Lab",
				"entphysicalvendortype":"1.3.6.1.4.1.9.12.3.1.3.436",
				"manual":0,
				"entphysicalparentrelpos":-1,
				"accessipaddress":"172.30.233.101",
				"createtime":1376304329000,
				"entphysicalname":"2811 chassis",
				"cdmadminstate":0,
				"domainname":"PEMBERS",
				"alias":null,
				"entphysicalindex":1,
				"sysdescr":"Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(24)T7, RELEASE SOFTWARE (fc2)\r\nTechnical Support: http://www.cisco.com/techsupport\r\nCopyright (c) 1986-2012 by Cisco Systems, Inc.\r\nCompiled Tue 28-Feb-12 10:43 by prod_rel_team",
				"sysname":"uk-t1-cj31.na.test.lab",
				"entitytype":1,
				"ostype":"Cisco IOS",
				"orderablepartnumber":"CISCO2811      ",
				"ipforwarding":"forwarding",
				"ifnumber":38,
				"sysobjectid":"1.3.6.1.4.1.9.1.576",
				"sysservices":"datalink(2) network(3) transport(4) application(7)",
				"entityname":"172.30.233.101",
				"domainmgrid":1,
				"hardwareversion":"V04 ",
				"displaylabel":"172.30.233.101",
				"syscontact":"someone@example.com",
				"osversion":"12.4(24)T7",
				"modelname":"CISCO2811      ",
				"sysuptime":449642945,
				"osimage":"flash:c2800nm-advipservicesk9-mz.124-24.T7.bin",
				"accessprotocol":"IPv4",
				"description":"Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(24)T7, RELEASE SOFTWARE (fc2)\r\nTechnical Support: http://www.cisco.com/techsupport\r\nCopyright (c) 1986-2012 by Cisco Systems, Inc.\r\nCompiled Tue 28-Feb-12 10:43 by prod_rel_team",
				"discoverytime":1434637258000,
				"changetime":1376304329000,
				"serialnumber":"ZZ9PZA42",
				"entityid":1996,
				"entphysicaldescr":"Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(24)T7, RELEASE SOFTWARE (fc2)\r\nTechnical Support: http://www.cisco.com/techsupport\r\nCopyright (c) 1986-2012 by Cisco Systems, Inc.\r\nCompiled Tue 28-Feb-12 10:43 by prod_rel_team"
			}
		],
		"properties":
		[
			{"entityid":"LONG"},
			{"classid":"LONG"},
			{"classname":"STRING"},
			{"entityname":"STRING"},
			{"createtime":"DATETIME"},
			{"changetime":"DATETIME"},
			{"displaylabel":"STRING"},
			{"description":"STRING"},
			{"entitytype":"LONG"},
			{"manual":"LONG"},
			{"alias":"STRING"},
			{"cdmadminstate":"LONG"},
			{"sysname":"STRING"},
			{"sysdescr":"STRING"},
			{"sysobjectid":"STRING"},
			{"syslocation":"STRING"},
			{"syscontact":"STRING"},
			{"sysuptime":"LONG"},
			{"sysservices":"STRING"},
			{"ifnumber":"LONG"},
			{"ipforwarding":"STRING"},
			{"entphysicalvendortype":"STRING"},
			{"entphysicalparentrelpos":"LONG"},
			{"entphysicalindex":"LONG"},
			{"entphysicalname":"STRING"},
			{"entphysicaldescr":"STRING"},
			{"serialnumber":"STRING"},
			{"modelname":"STRING"},
			{"orderablepartnumber":"STRING"},
			{"hardwareversion":"STRING"},
			{"ostype":"STRING"},
			{"osversion":"STRING"},
			{"osimage":"STRING"},
			{"accessipaddress":"STRING"},
			{"accessprotocol":"STRING"},
			{"memorysize":"LONG"},
			{"discoverytime":"DATETIME"},
			{"domainmgrid":"LONG"},
			{"domainname":"STRING"}
		],
		"instrumentation":
		{
			"totalExecTime":142,
			"queryTime":105,
			"processTime":37,
			"count":1
		}
	}
}

Source of data in JSON output

The columns in the JSON output come from the following tables and views in the NCIM topology database:
  1. chassis view: all of the columns come from this view, except for the columns in the rest of this list.
  2. domainMgr table: the following columns come from this table:
    • domainname
    • domainmgrid
  3. entityClass table: the following columns come from this table:
    • classId
    • className
  4. entityData table: the following columns come from this table:
    • alias
    • cdmadminstate
    • changetime
    • createtime
    • entitytype
    • entityname
    • displaylabel
    • description

Structure of JSON output

The JSON output is structured as follows:
devices:items
An array containing one JSON object for each device that the query returns. The devices are not returned in any particular order.
devices:properties
An array that is returned once per query. This array contains JSON objects that specify the name and type of each property in the device instances contained in the devices:items arrray. Possible types are as follows:
DATETIME
Integer representing the number of milliseconds since midnight on 1st January 1970. No timezone conversion is performed on the value that is stored in the NCIM database.
LONG
64-bit signed integer. In order to minimize differences in the code between the Oracle and Db2®, all integers returned by the Topology API are represented as 64-bit.
STRING
Quoted character string, UTF-8 encoded.
Note: A property whose value is NULL in the database is represented in the JSON output as the string null. If the property is a STRING type, the null does not have quotes around it. This distinguishes it from a string whose value is the four characters n, u, l, l.
devices:instrumentation
JSON object, returned once per query, and containing the following information:
count
Number of devices that the query returned.
queryTime
Number of milliseconds that the server took to execute the query on the NCIM database.
processTime
Number of milliseconds that the server took to process the result from the database and return it to the client.
totalExecTime
Number of milliseconds that passed between when the server received the query from the client and when it finished returning the result.