sim

SIM usage and cost statistics

<Info icon="fa-light fa-lock" className="permission-callout"> <div className="permission-callout__header"><span className="permission-callout__title"><span className="permission-callout__label">Required permissions</span> <span className="fern-docs-badge small blue subtle rounded-full permission-callout__beta">Beta</span></span> <span className="permission-callout__learn-more">[Learn more](/developers/api-guidelines/permissions#how-permissions-work)</span></div>

Sim.Stats + Get <span className="permission-callout__also">+1 endpoint</span>

<div className="permission-callout__roles"><span className="permission-callout__roles-label">Roles:</span> <Badge intent="info">Administrator</Badge> <Badge intent="info">User</Badge> <Badge intent="info">Observer</Badge></div> </Info> <Warning> You can only retrieve data traffic costs for organizations without multi-inclusive volumes. </Warning>

Retrieves SIM usage and cost statistics for a given ID. Usage statistics are sorted by data and sms.

Returns statistics from the following periods:

  • last_month: Previous billing month, from the first to last day (for example, February 1-29, 2024, when you send the request in March 2024).
  • current_month: Current month, with statistics calculated up to and including the date requested (for example, March 1-8, 2024, when you sent the request on March 8, 2024).
  • last_hour: Previous 60 minutes, accumulated per minute and organized by data or SMS received by the device (rx) and transmitted by the device (tx).
<Info> `last_month` and `current_month` are only included in the responses if traffic exists. Those responses include a generated `id` value that's comprised of the SIM ID, year, month, and traffic type ID (`5` for data and `6` for SMS).

For example, if you send a request in March 2024 for SIM ID 123456, the id for data in the current month is 1234562024035. </Info>

get/api/v1/sim/{sim_id}/stats

Request

  • Base URL: https://cdn.emnify.net
  • URL: https://cdn.emnify.net/api/v1/sim/{sim_id}/stats
  • Auth: HTTP bearer

Path parameters

sim_idinteger required

Numeric ID of a SIM

Response

Successfully returned the SIM statistics associated with the provided id.

Changes

No recorded changes to this operation across all 1 revision of this API.