{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/telnyx/main/json-schema/telnyx-bucket-apiusage-response-schema.json",
  "title": "BucketAPIUsageResponse",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telnyx-bucket-usage-api-openapi.yml#/components/schemas/BucketAPIUsageResponse",
  "properties": {
    "categories": {
      "items": {
        "$ref": "#/$defs/BucketOps"
      },
      "type": "array"
    },
    "timestamp": {
      "description": "The time the usage was recorded",
      "format": "date-time",
      "type": "string"
    },
    "total": {
      "$ref": "#/$defs/BucketOpsTotal"
    }
  },
  "type": "object",
  "$defs": {
    "BucketOps": {
      "properties": {
        "bytes_received": {
          "description": "The number of bytes received",
          "type": "integer"
        },
        "bytes_sent": {
          "description": "The number of bytes sent",
          "type": "integer"
        },
        "category": {
          "description": "The category of the bucket operation",
          "enum": [
            "list_bucket",
            "list_buckets",
            "get-bucket_location",
            "create_bucket",
            "stat_bucket",
            "get_bucket_versioning",
            "set_bucket_versioning",
            "get_obj",
            "put_obj",
            "delete_obj"
          ],
          "type": "string"
        },
        "ops": {
          "description": "The number of operations",
          "type": "integer"
        },
        "successful_ops": {
          "description": "The number of successful operations",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "BucketOpsTotal": {
      "properties": {
        "bytes_received": {
          "description": "The number of bytes received",
          "type": "integer"
        },
        "bytes_sent": {
          "description": "The number of bytes sent",
          "type": "integer"
        },
        "ops": {
          "description": "The number of operations",
          "type": "integer"
        },
        "successful_ops": {
          "description": "The number of successful operations",
          "type": "integer"
        }
      },
      "type": "object"
    }
  }
}