Using Our APIs
Information Requests
Query Active Session
6 min
purpose returns the start time of a currently active data session for the sim specified in the \<iccid> element if the device is actively connected, the timestamp of the session start will be returned if no active session exists, the \<timestamp> element will be empty endpoint post https //api m2miportal com content type application/xml accept application/xml request (xml) \<query active session version="1" api id="123456"> \<authentication> \<username>username\</username> \<password>password\</password> \</authentication> \<iccid>1234567890123456789\</iccid> \</query active session> response (success) \<query active session response api id="123456"> \<api outcome>success\</api outcome> \<timestamp>22/03/2020 13 55 30\</timestamp> \</query active session response> response elements element description \<timestamp> the start time of the current data session format dd/mm/yyyy hh\ mm\ ss all times are utc if the device is not currently in an active session, the \<timestamp> element will be returned empty usage guidance this query performs a live request to operator platforms it is not intended for constant or high frequency polling it should be used on an ad hoc basis for individual sims where confirmation of an active session is required for higher scale monitoring requirements, please contact support to discuss appropriate approaches response (failure) if a request cannot be processed, the response will include api outcome indicating failure an error description explaining the reason failure responses may occur due to invalid authentication credentials invalid or unknown identifiers (for example iccid or msisdn) invalid or missing parameters values not permitted for the specified sim type or account configuration insufficient permissions integrating systems should validate input data before submission and implement appropriate error handling and logging