Query Active Session
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.