Xeonr Developer Docs
API SpecificationBuckets

Get bucket statistics

POST
/uplim.api.v1.BucketsService/GetBucketStatistics

Retrieves usage statistics for a bucket over a specified time period, including upload counts and bandwidth.

Authorization

OAuth2 upl:bucket:analytics
AuthorizationBearer <token>

OAuth 2.0 authorization

In: header

Scope: upl:bucket:analytics

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

bucketRef?|
startTime?string

Start time for statistics period timestamp.lt_now = true

Formatdate-time
endTime?string

Start time for statistics period timestamp.lt_now = true

Formatdate-time
granularity?string

Granularity of statistics (hourly, daily, monthly)

Value in"STATISTICS_GRANULARITY_UNSPECIFIED" | "STATISTICS_GRANULARITY_HOURLY" | "STATISTICS_GRANULARITY_DAILY" | "STATISTICS_GRANULARITY_MONTHLY"
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketsService/GetBucketStatistics" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "statistics": [
    {
      "sizeBytes": 0,
      "uploadCount": 0,
      "timestamp": "2023-01-15T01:30:15.01Z",
      "downloadCount": 0,
      "bandwidthBytes": 0
    }
  ]
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}