Home

You are here

Stats

Queries the successful results from the test devices.

Purpose

The stats resource is used to poll the server for the SMS results generated by the mobile devices. The results are sorted with the newest results first and can be filtered by MIN and date ranges.

Request

GET /sms/stats?min={}&from={}&to={}&start={}&count={}

Where:

Property Description
min The MIN or mobile number of the tester in order to filter responses.
from The date in which to include results from. The date must be in the format; “yyyy-MM-dd'T'HH:mm:ss.SSSZ”
to The date in which to include results from. The date must be in the format; “yyyy-MM-dd'T'HH:mm:ss.SSSZ”
start The index of the results to return. (For paging)
count The number of results to return (For paging)

Reponse Example

XML


                        
<?xml version="1.0" encoding="UTF-8"?>
<stats>
  <stat>
    <concatenated_flag>false</concatenated_flag>
    <data_coding_scheme>0</data_coding_scheme>
    <device>
      <brand_info>google</brand_info>
      <build_info>4.1.1</build_info>
      <country>ca</country>
      <device_info>maguro</device_info>
      <last_update>2012-07-21T17:04:21Z</last_update>
      <locale_info>English (United Kingdom)</locale_info>
      <mcc>302</mcc>
      <min>1403...</min>
      <mnc>610</mnc>
      <model_info>Galaxy Nexus</model_info>
    </device>
    <device_timestamp>1342908609734</device_timestamp>
    <originator_address>14039079889</originator_address>
    <originator_address_npi>1</originator_address_npi>
    <originator_address_ton>129</originator_address_ton>
    <pid>0</pid>
    <rawpdu>07914183722600F0040B914130099788F90000217012810180690AC6AA9609A
297E77405</rawpdu>
    <segment_encoding>0</segment_encoding>
    <segment_number>0</segment_number>
    <segment_reference>0</segment_reference>
    <segment_total_count>1</segment_total_count>
    <smsc_address>14382762000</smsc_address>
    <smsc_timestamp>1342908608733</smsc_timestamp>
    <user_data_header_flag>false</user_data_header_flag>
  </stat>
</stats>

                        

JSON


                        
{
  "stat": [
    {
      "device": {
        "country": "ca",
        "min": "14036145597",
        "last_update": "2012-07-21T17:04:21.000+0000",
        "brand_info": "google",
        "model_info": "Galaxy Nexus",
        "device_info": "maguro",
        "locale_info": "English (United Kingdom)",
        "mnc": 610,
        "mcc": 302,
        "build_info": "4.1.1"
      },
      "segmentEncoding": 0,
      "segmentReference": 0,
      "segmentTotalCount": 1,
      "segmentNumber": 0,
      "rawPdu": "07914183722600F0040B914130099788F90000217012810180690AC6AA9609A297E77405",
      "originatorAddress": "14039079889",
      "originatorAddressTON": 129,
      "originatorAddressNPI": 1,
      "smscTimestamp": 1342908608733,
      "smscAddress": "14382762000",
      "pid": 0,
      "userDataHeaderFlag": false,
      "dataCodingScheme": 0,
      "concatenated": false,
      "deviceTimestamp": 1342908609734
    }
  ]
}

                        

Where:

Property Description
concatenated_flag Boolean. Describes if the message is multipart. Each message has its own stat. For multipart messages the index of the message will be referenced under segment_number and segment_total indicates the number of segments in a message. Messages can be aggregated by matching the segment_reference parameter
device Complex. The network values and status of the handset at the time the SMS was received.
device_timestamp Long. The POSIX timestamp on the device at the time the message was received in ms. Individual handset time may vary
originator_address String. The address of the SMS originator
originator_address_npi Integer. The Number Plan Indicator.
Unknown = 0
ISDN/telephone numbering plan (E163/E164) = 1
Data numbering plan (X.121) = 3
Telex numbering plan (F.69) = 4
Land Mobile (E.212) =6
National numbering plan = 8
Private numbering plan = 9
ERMES numbering plan (ETSI DE/PS 3 01-3) = 10
Internet (IP) = 13
WAP Client Id (to be defined by WAP Forum) = 18
originator_address_ton Integer. The Type Of Number of the SMS originator
Unknown = 0
International = 1
National = 2
Network Specific = 3
Subscriber Number = 4
Alphanumeric = 5
Abbreviated = 6
pid
rawpdu String.
segment_encoding Integer.

7BIT = 0

8BIT = 4

UCS2 = 8

segment_message String. The decoded message segment
segment_number Integer. The segment index for a multipart message
segment_reference Integer. The SMSC assigned segment reference for mulipart messages
segment_total_count Integer. The total number of segments in the multipart message
smsc_address String. The address of the SMSC as reported on handset
smsc_timestamp Long. The POSIX timestamp placed on the message by the SMSC
user_data String. The values located in the user data header
user_data_header_flag Boolean Indicates if there is user data header information