Los valores de order bys definen cómo se ordenarán las filas en la respuesta. Por ejemplo, ordenar las filas por recuento de acceso descendente es un orden diferente, y ordenar las filas por la cadena del país es un orden diferente.
Representación JSON
{"desc": boolean,// Union field one_order_by can be only one of the following:"metric": {object (MetricOrderBy)},"dimension": {object (DimensionOrderBy)}// End of list of possible types for union field one_order_by.}
Campos
desc
boolean
Si es verdadero, ordena de forma descendente. Si es falso o no se especifica, ordena en orden ascendente.
Campo de unión one_order_by. Especifica un tipo de orden para OrderBy. one_order_by puede ser solo uno de los siguientes:
Controla la regla para el orden de los valores de las dimensiones.
OrderType
Regla para ordenar los valores de dimensión de la cadena.
Enumeraciones
ORDER_TYPE_UNSPECIFIED
Sin especificar.
ALPHANUMERIC
Orden alfanumérico por punto de código Unicode. Por ejemplo, "2" < “A” < “X” < “b” < “z”
CASE_INSENSITIVE_ALPHANUMERIC
Orden alfanumérico sin distinción entre mayúsculas y minúsculas por punto de código Unicode en minúscula. Por ejemplo, "2" < “A” < “b” < “X” < “z”
NUMERIC
Los valores de las dimensiones se convierten en números antes de ordenarlos. Por ejemplo, en orden NUMERIC, "25". < "100" y en la ordenación ALPHANUMERIC, "100" < “25”. Todos los valores de dimensión no numéricos tienen el mismo valor de orden debajo de todos los valores numéricos.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-26 (UTC)"],[[["\u003cp\u003eOrderBys determine the sorting of rows in responses, based on metrics or dimensions.\u003c/p\u003e\n"],["\u003cp\u003eYou can sort by metrics (e.g., access count) or dimensions (e.g., country).\u003c/p\u003e\n"],["\u003cp\u003eSorting can be done in ascending or descending order, specified by the \u003ccode\u003edesc\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eDimension sorting offers different ordering options like alphanumeric, case-insensitive alphanumeric, and numeric, controlled by \u003ccode\u003eorderType\u003c/code\u003e.\u003c/p\u003e\n"]]],["The content describes how to define row sorting in a response using \"OrderBys.\" Sorting can be ascending or descending, specified by the `desc` field. Rows are sorted by either a `metric` or a `dimension`, selected using the `one_order_by` field. `MetricOrderBy` uses a `metricName`. `DimensionOrderBy` uses a `dimensionName` and an `orderType` like `ALPHANUMERIC` or `NUMERIC`. The order type defines the rule for string dimension ordering.\n"],null,["# AccessOrderBy\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [MetricOrderBy](#MetricOrderBy)\n - [JSON representation](#MetricOrderBy.SCHEMA_REPRESENTATION)\n- [DimensionOrderBy](#DimensionOrderBy)\n - [JSON representation](#DimensionOrderBy.SCHEMA_REPRESENTATION)\n- [OrderType](#OrderType)\n\nOrder 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.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"desc\": boolean, // Union field `one_order_by` can be only one of the following: \"metric\": { object (/analytics/devguides/config/admin/v1/rest/v1beta/AccessOrderBy#MetricOrderBy) }, \"dimension\": { object (/analytics/devguides/config/admin/v1/rest/v1beta/AccessOrderBy#DimensionOrderBy) } // End of list of possible types for union field `one_order_by`. } ``` |\n\n| Fields ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `desc` | `boolean` If true, sorts by descending order. If false or unspecified, sorts in ascending order. |\n| Union field `one_order_by`. Specify one type of order by for `OrderBy`. `one_order_by` can be only one of the following: ||\n| `metric` | `object (`[MetricOrderBy](/analytics/devguides/config/admin/v1/rest/v1beta/AccessOrderBy#MetricOrderBy)`)` Sorts results by a metric's values. |\n| `dimension` | `object (`[DimensionOrderBy](/analytics/devguides/config/admin/v1/rest/v1beta/AccessOrderBy#DimensionOrderBy)`)` Sorts results by a dimension's values. |\n\nMetricOrderBy\n-------------\n\nSorts by metric values.\n\n| JSON representation |\n|----------------------------------|\n| ``` { \"metricName\": string } ``` |\n\n| Fields ||\n|--------------|----------------------------------------------------|\n| `metricName` | `string` A metric name in the request to order by. |\n\nDimensionOrderBy\n----------------\n\nSorts by dimension values.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"dimensionName\": string, \"orderType\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/AccessOrderBy#OrderType) } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dimensionName` | `string` A dimension name in the request to order by. |\n| `orderType` | `enum (`[OrderType](/analytics/devguides/config/admin/v1/rest/v1beta/AccessOrderBy#OrderType)`)` Controls the rule for dimension value ordering. |\n\nOrderType\n---------\n\nRule to order the string dimension values by.\n\n| Enums ||\n|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ORDER_TYPE_UNSPECIFIED` | Unspecified. |\n| `ALPHANUMERIC` | Alphanumeric sort by Unicode code point. For example, \"2\" \\\u003c \"A\" \\\u003c \"X\" \\\u003c \"b\" \\\u003c \"z\". |\n| `CASE_INSENSITIVE_ALPHANUMERIC` | Case insensitive alphanumeric sort by lower case Unicode code point. For example, \"2\" \\\u003c \"A\" \\\u003c \"b\" \\\u003c \"X\" \\\u003c \"z\". |\n| `NUMERIC` | Dimension values are converted to numbers before sorting. For example in NUMERIC sort, \"25\" \\\u003c \"100\", and in `ALPHANUMERIC` sort, \"100\" \\\u003c \"25\". Non-numeric dimension values all have equal ordering value below all numeric values. |"]]