import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
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: 'My API Key',
});
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
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The name of the bucket
Bucket Storage Usage
Show child attributes
The size of the bucket in bytes
[123456]The size of the bucket in kilobytes
[123456]The number of objects in the bucket
[123456]The time the snapshot was taken
["2020-01-01T00:00:00Z"]Was this page helpful?