Enumerating Device Statistics in JSON-RPC API

You can get the statistics of devices of your own company and your customers using the EnumerateAccountStatistics method.

A common use of this method is to output a list of storage space used on the cloud per device. You can get this information by using the Columns parameter and using the column I14.

Please be aware that there are no methods which can perform complex calculations, however the Totals parameter can do basic calculations using column codes. If you need to do complex calculations, you will have to take the given sizes (in Bytes) and do these manually.

Required parameters

Parameter Description Supported values
query A group of parameters related to the device statistics AccountStatisticsQuery (has child parameters of its own, see the AccountStatisticsQuery child parameters table below)

Sample request

{
    "jsonrpc":"2.0",
    "id":"jsonrpc",
    "visa": "{{visa}}",
    "method" : "EnumerateAccountStatistics",
    "params" : {
	"query" : {
		"PartnerId" : 123456,
		"Filter": "ANY =~ 'Device*'",
		"SelectionMode": "Merged",
		"StartRecordNumber": 0,
		"RecordsCount": 3,
		"Columns": ["I1", "I14", "I18", "Do9F00", "D01F07"]
	}
    }			
}

Sample response

{
    "id": "jsonrpc",
    "jsonrpc": "2.0",
    "result": {
	"result": [
	    {
		"AccountId": 654321,
		"Flags": [
		    "AutoDeployed"
		],
		"PartnerId": 123456,
		"Settings": [
		    {
			"I1": "computerName"
		    },
		    {
			"I14": "0"
		    },
		    {
			"I78": "D01D02"
		    }
		]
	    },
	    {
		"AccountId": 765432,
		"Flags": null,
		"PartnerId": 456789,
		"Settings": [
		    {
			"D01F07": "28349567768726"
		    },
		    {
			"D09F00": "1"
		    },
		    {
			"I1": "computerName2"
		    },
		    {
			"I14": "586755749630"
		    },
		    {
			"I78": "D01D02"
		    }
		]
	    },
	    {
		"AccountId": 876543,
		"Flags": null,
		"PartnerId": 456789,
		"Settings": [
		    {
			"D09F00": "5"
		    },
		    {
			"I1": "computerName3"
		    },
		    {
			"I14": "23630480"
		    },
		    {
			"I78": "D19D20D05"
		    }
		]
	    }
	],
	"totalStatistics": null
    },
    "visa": "{{visa}}"
}