AI-generated Key Takeaways
- 
          Order bys define how rows will be sorted in the response. 
- 
          Results can be sorted by either metric or dimension values. 
- 
          Sorting can be in descending or ascending order. 
- 
          Dimension values can be ordered alphanumerically, case-insensitively, or numerically. 
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 field one_order_by. Specify one type of order by forOrderBy.one_order_bycan 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 in ALPHANUMERICsort, "100" < "25". Non-numeric dimension values all have equal ordering value below all numeric values. |