- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- Aggregation
- Count
- Sum
- Histogram
- Frequency
- AggregationResult
- Count
- Sum
- Histogram
- Bucket
- Frequency
Aggregates the requested fields based on provided function.
HTTP request
POST https://migrationcenter.googleapis.com/v1alpha1/{parent=projects/*/locations/*}/assets:aggregateValues
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. Parent value for |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"aggregations": [
{
object ( |
Fields | |
---|---|
aggregations[] |
Array of aggregations to perform. Up to 25 aggregations can be defined. |
filter |
The aggregation will be performed on assets that match the provided filter. |
Response body
A response to a request to aggregated assets values.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"results": [
{
object ( |
Fields | |
---|---|
results[] |
The aggregation results. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
Aggregation
Message describing an aggregation. The message includes the aggregation type, parameters, and the field on which to perform the aggregation.
JSON representation |
---|
{ "field": string, // Union field |
Fields | |
---|---|
field |
The name of the field on which to aggregate. |
Union field
|
|
count |
Count the number of matching objects. |
sum |
Sum over a numeric field. |
histogram |
Creates a bucketed histogram of field values. |
frequency |
Creates a frequency distribution of all field values. |
Count
This type has no fields.
Object count.
Sum
This type has no fields.
Sum of field values.
Histogram
Histogram of bucketed assets counts by field value.
JSON representation |
---|
{ "lowerBounds": [ number ] } |
Fields | |
---|---|
lowerBounds[] |
Lower bounds of buckets. The response will contain |
Frequency
This type has no fields.
Frequency distribution of all field values.
AggregationResult
Message describing a result of an aggregation.
JSON representation |
---|
{ "field": string, // Union field |
Fields | |
---|---|
field |
|
Union field
|
|
count |
|
sum |
|
histogram |
|
frequency |
|
Count
The result of a count aggregation.
JSON representation |
---|
{ "value": string } |
Fields | |
---|---|
value |
|
Sum
The result of a sum aggregation.
JSON representation |
---|
{ "value": number } |
Fields | |
---|---|
value |
|
Histogram
The result of a bucketed histogram aggregation.
JSON representation |
---|
{
"buckets": [
{
object ( |
Fields | |
---|---|
buckets[] |
Buckets in the histogram. There will be |
Bucket
A histogram bucket with a lower and upper bound, and a count of items with a field value between those bounds. The lower bound is inclusive and the upper bound is exclusive. Lower bound may be -infinity and upper bound may be infinity.
JSON representation |
---|
{ "lowerBound": number, "upperBound": number, "count": string } |
Fields | |
---|---|
lowerBound |
Lower bound - inclusive. |
upperBound |
Upper bound - exclusive. |
count |
Count of items in the bucket. |
Frequency
The result of a frequency distribution aggregation.
JSON representation |
---|
{ "values": { string: string, ... } } |
Fields | |
---|---|
values |
An object containing a list of |