Example JSON output for domains

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 the following Topology API query.
https://myHost:16311/ibm/console/nm_rest/topology/devices/meta/domains

Example of JSON output

This query produced the following 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":
  {
    "instrumentation":
    {
      "count":1,
      "queryTime":4,
      "totalExecTime":8,
      "processTime":4
    },
    "items":
    [
      {
        "lastUpdated":1552404469000,
        "webtopDataSource":"NCO_AGG_P",
        "creationTime":1546622278000,
        "domainName":"NCOMS",
        "description":null,
        "domainHost":"10.10.10.232",
        "domainMgrId":1,
        "managerName":"PrecisionIP",
        "domainPort":7968,
        "batchUpdatePercent":0
      }
    ],
    "properties":
    [
      {"domainmgrid":"LONG"},
      {"domainname":"STRING"},
      {"creationtime":"DATETIME"},
      {"lastupdated":"DATETIME"},
      {"managername":"LONG"},
      {"description":"STRING"},
      {"webtopdatasource":"STRING"},
      {"domainhost":"STRING"},
      {"domainport":"LONG"},
      {"batchupdatepercent":"LONG"}
    ]
  }
}

Source of data in JSON output

The columns in the JSON output come from the domainMgr table in the NCIM topology database.

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.