List UsageRecords

GET /v1/UsageRecords

Usage information for Sim resources

List UsageRecords

Query parameters

  • Sim string

    SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM.

  • Fleet string

    SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.

  • Network string

    SID of a Network resource. Only show UsageRecords representing usage on this network.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HW[0-9a-fA-F]{32}$.

  • IsoCountry string(iso-country-code)

    Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country.

  • Group string

    Dimension over which to aggregate usage records. Can be: sim, fleet, network, isoCountry. Default is to not aggregate across any of these dimensions, UsageRecords will be aggregated into the time buckets described by the Granularity parameter.

    Values are sim, fleet, network, or isoCountry.

  • Granularity string

    Time-based grouping that UsageRecords should be aggregated by. Can be: hour, day, or all. Default is all. all returns one UsageRecord that describes the usage for the entire period.

    Values are hour, day, or all.

  • StartTime string(date-time)

    Only include usage that occurred at or after this time, specified in ISO 8601 format. Default is one month before the end_time.

  • EndTime string(date-time)

    Only include usage that occurred before this time (exclusive), specified in ISO 8601 format. Default is the current time.

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • usage_records array[object]
      Hide usage_records attributes Show usage_records attributes object
      • account_sid string | null

        The SID of the Account that incurred the usage.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • sim_sid string | null

        SID of a Sim resource to which the UsageRecord belongs. Value will only be present when either a value for the Sim query parameter is provided or when UsageRecords are grouped by sim. Otherwise, the value will be null.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HS[0-9a-fA-F]{32}$.

      • network_sid string | null

        SID of the Network resource the usage occurred on. Value will only be present when either a value for the Network query parameter is provided or when UsageRecords are grouped by network. Otherwise, the value will be null.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HW[0-9a-fA-F]{32}$.

      • fleet_sid string | null

        SID of the Fleet resource the usage occurred on. Value will only be present when either a value for the Fleet query parameter is provided or when UsageRecords are grouped by fleet. Otherwise, the value will be null.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HF[0-9a-fA-F]{32}$.

      • iso_country string(iso-country-code) | null

        Alpha-2 ISO Country Code that the usage occurred in. Value will only be present when either a value for the IsoCountry query parameter is provided or when UsageRecords are grouped by isoCountry. Otherwise, the value will be null.

      • period

        The time period for which the usage is reported. The period is represented as a pair of start_time and end_time timestamps specified in ISO 8601 format.

      • data_upload integer(int64) | null

        Total data uploaded in bytes, aggregated by the query parameters.

      • data_download integer(int64) | null

        Total data downloaded in bytes, aggregated by the query parameters.

      • data_total integer(int64) | null

        Total of data_upload and data_download.

      • data_total_billed number | null

        Total amount in the billed_unit that was charged for the data uploaded or downloaded. Will return 0 for usage prior to February 1, 2022. Value may be 0 despite data_total being greater than 0 if the data usage is still being processed by Twilio's billing system. Refer to Data Usage Processing for more details.

      • billed_unit string(currency) | null

        The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g. USD, EUR, JPY). This can be null when data_toal_billed is 0 and we do not yet have billing information for the corresponding data usage. Refer to Data Usage Processing for more details.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/UsageRecords
curl \
 --request GET 'https://supersim.twilio.com/v1/UsageRecords' \
 --user "username:password"
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2015-06-01T20:00:00Z",
        "start_time": "2015-05-01T20:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Granularity=day&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Granularity=day&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-03T00:00:00Z",
        "start_time": "2019-05-02T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Granularity=hour&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Granularity=hour&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-01T02:00:00Z",
        "start_time": "2019-05-01T01:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-01T01:00:00Z",
        "start_time": "2019-05-01T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Granularity=day&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Granularity=day&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-03T00:00:00Z",
        "start_time": "2019-05-02T00:00:00Z"
      },
      "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Network=HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Granularity=day&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Network=HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Granularity=day&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-03T00:00:00Z",
        "start_time": "2019-05-02T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?IsoCountry=FR&Granularity=day&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?IsoCountry=FR&Granularity=day&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": "FR",
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-03T00:00:00Z",
        "start_time": "2019-05-02T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": "FR",
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Granularity=day&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Granularity=day&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-03T00:00:00Z",
        "start_time": "2019-05-02T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Group=sim&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Group=sim&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": "HSbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Group=fleet&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Group=fleet&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": "HFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Group=network&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Group=network&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": null,
      "network_sid": "HWbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?Group=isoCountry&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?Group=isoCountry&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": "FR",
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": "US",
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?IsoCountry=FR&Group=sim&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?IsoCountry=FR&Group=sim&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": "FR",
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    },
    {
      "period": {
        "end_time": "2019-05-04T00:00:00Z",
        "start_time": "2019-05-03T00:00:00Z"
      },
      "sim_sid": "HSbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "fleet_sid": null,
      "data_total": 300000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": "USD",
      "data_upload": 150000,
      "iso_country": "FR",
      "network_sid": null,
      "data_download": 150000,
      "data_total_billed": "0.03"
    }
  ]
}
{
  "meta": {
    "key": "usage_records",
    "url": "https://supersim.twilio.com/v1/UsageRecords?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/UsageRecords?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "usage_records": [
    {
      "period": {
        "end_time": "2015-06-01T20:00:00Z",
        "start_time": "2015-05-01T20:00:00Z"
      },
      "sim_sid": null,
      "fleet_sid": null,
      "data_total": 2000,
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "billed_unit": null,
      "data_upload": 1000,
      "iso_country": null,
      "network_sid": null,
      "data_download": 1000,
      "data_total_billed": "0"
    }
  ]
}