Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

DataSession Resource

The SIM DataSession resource returns data session information for a SIM over a period of 30 days or less in an aggregated list.

A data session represents an individual data connectivity session between the SIM-connected device and a service that interfaces between the cellular network and the Internet. This will either be a PDP Context via a GGSN or a PDN Connection via a Packet Gateway.

You can think of a data session as a representation of your device's Internet connection, whenever such a connection exists.

Data sessions can be used to troubleshoot device issues and understand the network setup and teardown behavior of a device in the wild.

DataSession properties

Names in PHP format
sid
sid_like<WN> Not PII

The unique string that we created to identify the DataSession resource.

simSid
sid_like<DE> Not PII

The SID of the Sim resource that the Data Session is for.

accountSid
sid<AC> Not PII

The SID of the Account that created the DataSession resource.

radioLink
string Not PII

The generation of wireless technology that the device was using.

operatorMcc
string Not PII

The 'mobile country code' is the unique ID of the home country where the Data Session took place. See: MCC/MNC lookup.

operatorMnc
string Not PII

The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place.

operatorCountry
string Not PII

The three letter country code representing where the device's Data Session took place. This is determined by looking up the operator_mcc.

operatorName
string Not PII

The friendly name of the mobile operator network that the SIM-connected device is attached to. This is determined by looking up the operator_mnc.

cellId
string Not PII

The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated.

cellLocationEstimate
object Not PII

An object that describes the estimated location in latitude and longitude where the device's Data Session took place. The location is derived from the cell_id when the Data Session was last updated. See Cell Location Estimate Object.

packetsUploaded
integer Not PII

The number of packets uploaded by the device between the start time and when the Data Session was last updated.

packetsDownloaded
integer Not PII

The number of packets downloaded by the device between the start time and when the Data Session was last updated.

lastUpdated
date_time<iso8601> Not PII

The date that the resource was last updated, given as GMT in ISO 8601 format.

start
date_time<iso8601> Not PII

The date that the Data Session started, given as GMT in ISO 8601 format.

end
date_time<iso8601> Not PII

The date that the record ended, given as GMT in ISO 8601 format.

imei
string Not PII

The 'international mobile equipment identity' is the unique ID of the device using the SIM to connect. An IMEI is a 15-digit string: 14 digits for the device identifier plus a check digit calculated using the Luhn formula.

Cell Location Estimate Object

The Cell location estimate object reports the approximate location of the cellular tower that the device was connected to when the Data Session was last updated. This is based on a lookup of public cellular tower data, and is not necessarily an accurate description of the cellular tower. It is not intended to describe the location of the SIM-connected device itself.

Property Description Empty Value
lat
Integer
Latitude. The spherical coordinate value of the estimated cellular tower location parallel to the Equator. 0

lon
Integer

Longitude. The spherical coordinate value of the estimated cellular tower location from the geographical North Pole to the geographical South Pole. 0

Read multiple DataSession resources

get
https://wireless.twilio.com/v1/Sims/{SimSid}/DataSessions
Parameters
Names in None format
sim_sid
Required
get sid_like<DE> Not PII

The SID of the Sim resource with the Data Sessions to read.

end
Optional
get date_time<iso8601> Not PII

The date that the record ended, given as GMT in ISO 8601 format.

start
Optional
get date_time<iso8601> Not PII

The date that the Data Session started, given as GMT in ISO 8601 format.

Example 1
        
        
        
        
        Rate this page:

        Need some help?

        We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.