JSON format overview

The REST API uses JSON format to return data representing model objects; you can request JSON output by specifying the feed=json parameter on a REST API call.

The following table describes the structure of the JSON format used to represent model objects.

JSON element Description
[ Begins an array of model objects.
{ Begins a model object, which might contain zero or more model objects.
"name":value,"name":value One or more name-value pairs, separated by commas.
"_class":"class_name"

A required name-value pair containing the name of the model object.

The model object class name can be in either of two forms:
  • Short name (for example, ComputerSystem)
  • Fully qualified name (for example, com.collation.platform.model.topology.sys.ComputerSystem
If you specify longClassName=true on a REST query, then all of the returned values for _class contain the full model name. Otherwise, the short name is returned unless it is not unique (in which case the full name is returned).
} Ends a model object.
] Ends an array of model objects.
The following example shows JSON output from a ComputerSystem query at a depth of 1:
[{
"displayName":"esx3-vm16-rhes4",
"devices":[{"_class":"DiskDrive","guid":"2A2827686EB03465A955DE54BD3F6AB5"},
{"_class":"DiskDrive","guid":"D7DAF9DCD1E7347684A0D02E36E212DC"}],
"lastModifiedBy":"system",
"l2Interfaces": [{"_class":"L2Interface","guid":"FA048919AA953BA5A09580496017A776"},
{"_class":"L2Interface","guid":"297B125690B33B778C347E12CFC62689"}],
"createdBy":"system",
"_class":"LinuxUnitaryComputerSystem",
"controllers":[{"_class":"Controller","guid":"7B72D3B5448D30388F9D9497EA8F970D"},
{"_class":"Controller","guid":"B619ABB8B8343C1FAB5BF87AD425559E"}],
"guid":"C2D379A936433258BABBF682A8E71A82",
"CPUSpeed":3191000000,
"fqdn":"esx3-vm16-rhes4",
"contextIp":"9.43.73.87",
"OSInstalled":[{"_class":"Linux","guid":"04BFCBCD2A1733258F5C95CD281D91AF"}],
"memorySize":3988783104,
"ipInterfaces":[{"_class":"IpInterface","guid":"9CAA8E0197333BAD924EA3CCB1860920"},
{"_class":"IpInterface","guid":"C2E6D21CF24435EABCB8AA8136BB9F1B"}],
"signature":"9.43.73.87(000C29A467A9)",
"systemId":"2b095749",
"bidiFlag":3,
"name":"esx3-vm16-rhes4",
"OSRunning":{"_class":"Linux","guid":"04BFCBCD2A1733258F5C95CD281D91AF"},
"CPUType":"Intel(R) Xeon(TM) MV",
"type":"ComputerSystem",
"numCPUs":1,
"architecture":"i686",
"fileSystems":[{"_class":"UnixFileSystem","guid":"CDA94FB8C84B300ABA2A42E1EFEE6234"},
{"_class":"NFSFileSystem","guid":"6300742848BA39478EAEE4FB4709DF7A"}],
"lastModifiedTime":1225806427541
}]