Check out our upcoming events and meetups! View events →
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.getBucketUsage('');
console.log(response.data);{
"data": [
{
"size": 123456,
"size_kb": 123456,
"num_objects": 123456,
"timestamp": "2020-01-01T00:00:00Z"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Returns the amount of storage space and number of files a bucket takes up.
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.getBucketUsage('');
console.log(response.data);{
"data": [
{
"size": 123456,
"size_kb": 123456,
"num_objects": 123456,
"timestamp": "2020-01-01T00:00:00Z"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Was this page helpful?