Xeonr Developer Docs
UplApiBuckets

Get bucket statistics

POST
/uplim.api.v1.BucketsService/GetBucketStatistics

A time series over the bucket, one row per hour, day or month (UTC) between start_time and end_time, every period present: size_bytes is the bytes stored at the end of each period (a level), uploaded_bytes and upload_count are what that period's uploads brought (a flow). Downloads and bandwidth are not recorded yet and read 0. Needs the bucket admin role.

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

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

bucketRef?&
startTime?string

Start of the window. The series begins at the period (hour, day or month, UTC) this falls in. Unset: twelve months before end_time. timestamp.lt_now = true

Formatdate-time
endTime?string

End of the window, inclusive; must be after start_time. The series ends at the period this falls in. Unset: now. timestamp.lt_now = true

Formatdate-time
granularity?string

Width of one period. Unset: monthly. A window wider than 1000 periods at the chosen granularity is refused with InvalidArgument. enum.defined_only = true

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 "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "statistics": [
    {
      "sizeBytes": "string",
      "uploadCount": "string",
      "timestamp": "2023-01-15T01:30:15.01Z",
      "downloadCount": "string",
      "bandwidthBytes": "string",
      "uploadedBytes": "string"
    }
  ]
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}