Get Bucket Aggregate Stats
const url = 'https://example.com/storage/v1/workspaces/example/engines/example/buckets:aggregateStats';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/storage/v1/workspaces/example/engines/example/buckets:aggregateStatsReturns the aggregate bucket statistics for a workspace in a single point read. With a
concrete cloud provider the aggregate covers that provider; with - it federates across
every provider and covered_engines names the providers that contributed measured
values, so a cross-provider card never silently under-counts.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The workspace to aggregate stats for
The cloud provider to aggregate over: qibdo, aws, gcp, azure, or ’-’ for all providers
Responses
Section titled “ Responses ”OK
Bucket Aggregate Stats
The aggregate storage statistics for one workspace, either for one cloud provider or federated across all of them. Every stat is tri-state (value / no data yet / not available); freshness is per source because each stat family is refreshed on its own cadence.
object
Number of buckets in the scope.
object
The measured value. Only meaningful when availability is AVAILABLE.
Total bytes stored across the buckets in the scope.
object
The measured value. Only meaningful when availability is AVAILABLE.
Total object count across the buckets in the scope.
object
The measured value. Only meaningful when availability is AVAILABLE.
Bytes served out of the scope in the current UTC billing month.
object
The measured value. Only meaningful when availability is AVAILABLE.
Rated cost of the scope in the current UTC billing month.
object
The measured amount. Written ONLY when availability is AVAILABLE, so an unmeasured stat is never read as a real, measured zero.
object
The exact amount in major units, as a decimal string, for example 12.34, 100 or -0.05.
Up to 19 digits before the decimal point and up to 8 after it. Trailing zeros are removed, so
12.3400 is sent as 12.34. Some amounts are stored with fewer decimals than 8 and are
rounded when they are saved, so a value read back may be shorter than the one sent in.
The ISO-4217 currency code in uppercase, for example USD.
Projected end-of-month cost of the scope at the current run rate.
object
The measured amount. Written ONLY when availability is AVAILABLE, so an unmeasured stat is never read as a real, measured zero.
object
The exact amount in major units, as a decimal string, for example 12.34, 100 or -0.05.
Up to 19 digits before the decimal point and up to 8 after it. Trailing zeros are removed, so
12.3400 is sent as 12.34. Some amounts are stored with fewer decimals than 8 and are
rounded when they are saved, so a value read back may be shorter than the one sent in.
The ISO-4217 currency code in uppercase, for example USD.
The cloud providers that contributed measured values to this aggregate. When the selection spans providers, only the providers listed here are covered, so the totals never silently under-count an unmeasured provider.
When the inventory stats (bucket_count, total_size_bytes, object_count) were last refreshed. Absent when no inventory record exists for the scope and period yet.
When the egress meter was last refreshed. Absent when no egress record exists for the scope and period yet.
When the cost figures were last refreshed. Absent when no cost record exists for the scope and period yet.
Projected end-of-month egress of the scope at the current run rate.
object
The measured value. Only meaningful when availability is AVAILABLE.
Total operation (request) count across the buckets in the scope for the current UTC billing month.
object
The measured value. Only meaningful when availability is AVAILABLE.
Projected end-of-month operation count of the scope at the current run rate.
object
The measured value. Only meaningful when availability is AVAILABLE.
When the operation meter was last refreshed. Absent when no operation record exists for the scope and period yet.
Example
{ "bucket_count": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "total_size_bytes": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "object_count": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "egress_month_to_date_bytes": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "spend_month_to_date": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "spend_projection": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "covered_engines": [ "ENGINE_UNSPECIFIED" ], "egress_projection_bytes": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "operations_month_to_date": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }, "operations_projection": { "availability": "STAT_AVAILABILITY_UNSPECIFIED" }}default
Section titled “default ”Default error response
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}