Sim UsageRecord Resource
The Sim UsageRecords list resource returns usage information for a SIM over a specified period, presented as a list, and aggregated according to the user-provided granularity.
The SIM Usage Records resource returns usage for a single SIM. To retrieve aggregated usage for all SIMs on an Account, use the Usage Records resource.
Sim UsageRecords properties
Names in REST API format | |
---|---|
sim_sid
|
The SID of the Sim resource that this Usage Record is for. |
account_sid
|
The SID of the Account that created the UsageRecord resource. |
period
|
The time period for which the usage is reported. Contains |
commands
|
An object that describes the SIM's usage of Commands during the specified period. See Commands Usage Object. |
data
|
An object that describes the SIM's data usage during the specified period. See Data Usage Object. |
Commands Usageオブジェクト
The Commands usage object reports usage of Commands for the period.
The Commands Usage object is presented as a tree-like structure. For example, the total
value from the home
child object, the national_roaming
child object , and the international_roaming
object sum to the total
value of the top level commands
object. This is the same for the to_sim
and from_sim
parameters.
Property Data Type |
概要 | Empty Value |
---|---|---|
total integer |
期間中にSIMから送信(from_sim )または受信(to_sim )されたCommandの合計数です。 |
0 |
to_sim integer |
期間に渡ってSIMが受信した(to_sim )Commandの数です。 |
0 |
from_sim integer |
期間に渡ってSIMが送信した(from_sim )Commandの数です。 |
0 |
home オブジェクト |
total 、to_sim 、およびfrom_sim キーを伴う、期間内にホームネットワーク上でSIMが受信したCommand数を表す埋め込み済Command Usageオブジェクトです。 |
null |
national_roaming オブジェクト |
total 、to_sim 、およびfrom_sim キーを伴う、期間内にローミングパートナーのネットワーク上でSIMが受信したCommand数を表す埋め込み済Command Usageオブジェクトです。 |
null |
international_roaming 配列 |
An array of Commands Usage Objects, one for each country with usage, that describes the number of Commands received by or sent from the SIM on international roaming partner networks throughout the period, with keys total , to_sim and from_sim . |
[] |
Data Usageオブジェクト
The Data usage object reports usage of Data for the period.
The Data Usage object is presented as a tree-like structure. For example, the total
value from the home
child object, the national_roaming
child object, and the international_roaming
child object sum to the total
value of the top level data
object. This is the same for the download
and upload
parameters.
Property Data Type |
概要 | 空の値 |
---|---|---|
total integer |
期間内における、SIMに接続されたデバイスによるData消費(ダウンロードおよびアップロード)の総量です。 | 0 |
download integer |
期間内における、SIMに接続されたデバイスによるDataダウンロードの総量です。 | 0 |
upload integer |
期間内における、SIMに接続されたデバイスによるDataアップロードの総量です。 | 0 |
units 文字列 |
現在のオブジェクトに対して報告されるデータ使用状況の単位です。 もっとも一般的なのは「bytes(バイト)」です。 | 該当なし |
home オブジェクト |
total 、download 、upload 、およびunits キーを伴う、期間内にホームネットワーク上でSIMに接続されたデバイスが消費したDataを表す埋め込み済Data Usageオブジェクトです。 |
null |
national_roaming オブジェクト |
total 、download 、upload 、およびunits キーを伴う、期間内にローミングパートナーネットワーク上でSIMに接続されたデバイスが消費したDataを表す埋め込み済Data Usageオブジェクトです。 |
null |
international_roaming 配列 |
An array of Data Usage Objects, one for each country with usage, that describes the amount of Data consumed by the SIM-connected device on international roaming partner networks throughout the period, with keys total , download , upload and units . |
[] |
Read multiple UsageRecord resources
https://wireless.twilio.com/v1/Sims/{SimSid}/UsageRecords
The {SimSid}
parameter can be the SID or the UniqueName
of the Sim resource to collect usage data about.
パラメーター
Names in REST API format | |
---|---|
sim_sid
Path
|
The SID of the Sim resource to read the usage from. |
end
オプション
|
Only include usage that occurred on or before this date, specified in ISO 8601. The default is the current time. |
start
オプション
|
Only include usage that has occurred on or after this date, specified in ISO 8601. The default is one month before the |
granularity
オプション
|
How to summarize the usage by time. Can be: |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。