List Usage: list_usage
Service name: list_usage |
|
URL |
https://SERVER/api/?apikey=yourAPItoken&service=list_usage &required_parameters=required_parameters [&optional_parameters=optional_parameters] |
Description |
Returns mobile devices data/sms/calls usage. Google Android only |
Parameters |
|||||
Post Variable |
Description |
Type |
Required |
Options |
Default |
Optional. Returns a description of the service. |
boolean |
no |
true |
0 |
|
clientid |
The id of the client for which information is to be returned. |
integer |
no |
clientid |
0 |
siteid |
The id of the site for which information is to be returned. |
integer |
no |
siteid |
0 |
year |
The year to query |
integer |
yes |
year |
0 |
month |
The month to query (month number) |
integer |
yes |
month_number |
0 |
Example Service Call =list_usage |
https://SERVER/api/?apikey=yourAPItoken&service=list_usage&clientid=CLIENTID&year=YEAR&month=MONTH |
Example Response |
<?xml version="1.0" ?> <result created="2014-05-22T10:03:16+01:00" host="SERVER" status="OK"> <items> <client> <id>1111</id> <name>TestClient</name> <site> <id>2222</id> <name>TestSite</name> <device> <id>3333</id> <name>TestDevice</name> <usage> <calls>22</calls> <messages>33</messages> <data>1024</data> </usage> <status>active</status> <dateactivated>03 Apr 2014</dateactivated> <dateadeleted></dateadeleted> </device> </site> </client> </items> </result> |
Field Description |
|||
Field |
Type |
Can Be Empty |
Description |
client / id |
integer |
no |
Unique identifier of client |
client / name |
string |
no |
Name of client |
site / id |
integer |
no |
Unique identifier of site |
site / name |
string |
no |
Name of site |
device / id |
integer |
no |
Unique identifier of device |
device / name |
string |
no |
Name of device |
device / usage / calls |
string |
yes |
Call usage (in seconds) |
device / usage / messages |
string |
yes |
Number of messages |
device / usage / data |
string |
yes |
Data usage (in bytes) |
device / status |
string |
no |
Device status (active or deleted) |
device / dateactivated |
date |
no |
Device activation date |
device / datedeleted |
date |
yes |
Device deletion date |
Example Associated Service Calls | ||
Parameter | Call | URL Format |
SiteID | list_sites | https://SERVER/api/?apikey=yourAPItoken&service=list_sites&clientid=CLIENTID |
ClientID | list_clients | https://SERVER/api/?apikey=yourAPItoken&service=list_clients |