AccessOrderBy

  • 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 usingMetricOrderBy.

  • You can sort results by a dimension's values usingDimensionOrderBy.

  • Dimension value ordering can be controlled by theOrderType enum.

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 fieldone_order_by can be only one of the following:"metric":{object (MetricOrderBy)},"dimension":{object (DimensionOrderBy)}// End of list of possible types for union fieldone_order_by.}
Fields
desc

boolean

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

object (MetricOrderBy)

Sorts results by a metric's values.

dimension

object (DimensionOrderBy)

Sorts results by a dimension's values.

MetricOrderBy

Sorts by metric values.

JSON representation
{"metricName":string}
Fields
metricName

string

A metric name in the request to order by.

DimensionOrderBy

Sorts by dimension values.

JSON representation
{"dimensionName":string,"orderType":enum (OrderType)}
Fields
dimensionName

string

A dimension name in the request to order by.

orderType

enum (OrderType)

Controls the rule for dimension value ordering.

OrderType

Rule to order the string dimension values by.

Enums
ORDER_TYPE_UNSPECIFIEDUnspecified.
ALPHANUMERICAlphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < "b" < "z".
CASE_INSENSITIVE_ALPHANUMERICCase insensitive alphanumeric sort by lower case Unicode code point. For example, "2" < "A" < "b" < "X" < "z".
NUMERICDimension 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.