AccessOrderBy Stay organized with collections Save and categorize content based on your preferences.
Page Summary
Order bys define how rows will be sorted in the response.
Sorting can be done in descending or ascending order.
You can sort results by a metric's values using
MetricOrderBy.You can sort results by a dimension's values using
DimensionOrderBy.Dimension value ordering can be controlled by the
OrderTypeenum.
Order bys define how rows will be sorted in the response. For example, ordering rows by descending access count is one ordering, and ordering rows by the country string is a different ordering.
| JSON representation |
|---|
{"desc":boolean,// Union field |
| Fields | |
|---|---|
desc |
If true, sorts by descending order. If false or unspecified, sorts in ascending order. |
Union fieldone_order_by. Specify one type of order by forOrderBy.one_order_by can be only one of the following: | |
metric |
Sorts results by a metric's values. |
dimension |
Sorts results by a dimension's values. |
MetricOrderBy
Sorts by metric values.
| JSON representation |
|---|
{"metricName":string} |
| Fields | |
|---|---|
metricName |
A metric name in the request to order by. |
DimensionOrderBy
Sorts by dimension values.
| JSON representation |
|---|
{"dimensionName":string,"orderType":enum ( |
| Fields | |
|---|---|
dimensionName |
A dimension name in the request to order by. |
orderType |
Controls the rule for dimension value ordering. |
OrderType
Rule to order the string dimension values by.
| Enums | |
|---|---|
ORDER_TYPE_UNSPECIFIED | Unspecified. |
ALPHANUMERIC | Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < "b" < "z". |
CASE_INSENSITIVE_ALPHANUMERIC | Case insensitive alphanumeric sort by lower case Unicode code point. For example, "2" < "A" < "b" < "X" < "z". |
NUMERIC | Dimension values are converted to numbers before sorting. For example in NUMERIC sort, "25" < "100", and inALPHANUMERIC sort, "100" < "25". Non-numeric dimension values all have equal ordering value below all numeric values. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-02 UTC.