UsageRecords
Query Usage Records in Twilio.
Select
Twilio allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns can typically be used with only the equals or = comparison. The available columns for Triggers are Category, StartDate, EndDate, and Interval. StartDate and EndDate may be used with the >, >=, <, <=, or = conditions. Interval should be used as an escaped string, i.e [Interval].
SELECT * FROM UsageRecords WHERE [Interval] = 'Today'
Columns
Name | Type | References | Description |
AccountSid | String | The account Id of the usage record. | |
Category | String | The category of the usage record. For example, calls, sms, phonenumbers, recordings, transcriptions, and totalprice. | |
Description | String | The description of the usage record. | |
StartDate | Date | The start date of the usage record. You can also specify an offset, such as -30days. | |
EndDate | Date | The end date of the usage record. You can also specify an offset, such as -1year. | |
Count | Integer | The number of usage events. For example: the number of calls. | |
CountUnit | String | The type of the usage events counted. For example: calls and messages. | |
Usage | Double | The amount of usage. | |
UsageUnit | String | The usage unit. For example: minutes and messages. | |
Price | Decimal | The total price of the usage. | |
PriceUnit | String | The currency of the price. | |
ApiVersion | String | The API version of the usage record. | |
Uri | String | The URI of the usage record. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description | |
Interval | String | The interval of records. Should be used as an escaped string in Where clause, i.e [Interval]. The allowed values are Daily, Monthly, Yearly, AllTime, Today, Yesterday, LastMonth, and ThisMonth
The allowed values are Daily, Monthly, Yearly, AllTime, Today, Yesterday, LastMonth, ThisMonth. |