Check out our upcoming events and meetups! View events →
Returns the detail on API usage on a bucket of a particular time period, group by method category.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.storage.buckets.usage.getAPIUsage('', {
filter: { end_time: '2019-12-27T18:11:19.117Z', start_time: '2019-12-27T18:11:19.117Z' },
});
console.log(response.data);{
"data": [
{
"categories": [
{
"bytes_sent": 123456,
"bytes_received": 123456,
"ops": 123456,
"successful_ops": 123456,
"category": "put_obj"
}
],
"total": {
"bytes_sent": 123456,
"bytes_received": 123456,
"ops": 123456,
"successful_ops": 123456
},
"timestamp": "2020-01-01T00:00:00Z"
}
]
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The name of the bucket
Consolidated filter parameter (deepObject style). Originally: filter[start_time], filter[end_time]
Show child attributes
Bucket Usage
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.storage.buckets.usage.getAPIUsage('', {
filter: { end_time: '2019-12-27T18:11:19.117Z', start_time: '2019-12-27T18:11:19.117Z' },
});
console.log(response.data);{
"data": [
{
"categories": [
{
"bytes_sent": 123456,
"bytes_received": 123456,
"ops": 123456,
"successful_ops": 123456,
"category": "put_obj"
}
],
"total": {
"bytes_sent": 123456,
"bytes_received": 123456,
"ops": 123456,
"successful_ops": 123456
},
"timestamp": "2020-01-01T00:00:00Z"
}
]
}