Skip to main content
GET
/
storage
/
buckets
/
{bucketName}
/
usage
/
storage
JavaScript
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,
    "total_pages": 3,
    "page_size": 25,
    "total_results": 55
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

bucketName
string
required

The name of the bucket

Response

Bucket Storage Usage

data
object[]
meta
object