# Metadata

- [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#SCHEMA_REPRESENTATION)
- [DimensionMetadata](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#DimensionMetadata)
  - [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#DimensionMetadata.SCHEMA_REPRESENTATION)
- [MetricMetadata](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#MetricMetadata)
  - [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#MetricMetadata.SCHEMA_REPRESENTATION)

The dimensions and metrics currently accepted in reporting methods.

| JSON representation ||
|---|---|
| ``` { "name": string, "dimensions": [ { object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#DimensionMetadata`) } ], "metrics": [ { object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#MetricMetadata`) } ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Resource name of this metadata. |
| `dimensions[]` | ``object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#DimensionMetadata`)`` The dimensions descriptions. |
| `metrics[]` | ``object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#MetricMetadata`)`` The metric descriptions. |

## DimensionMetadata

Explains a dimension.

| JSON representation ||
|---|---|
| ``` { "apiName": string, "uiName": string, "description": string, "deprecatedApiNames": [ string ] } ``` |

| Fields ||
|---|---|
| `apiName` | `string` This dimension's name. Useable in [Dimension](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#Dimension)'s `name`. For example, `eventName`. |
| `uiName` | `string` This dimension's name within the Google Analytics user interface. For example, `Event name`. |
| `description` | `string` Description of how this dimension is used and calculated. |
| `deprecatedApiNames[]` | `string` Still usable but deprecated names for this dimension. If populated, this dimension is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the dimension will be available only by `apiName`. |

## MetricMetadata

Explains a metric.

| JSON representation ||
|---|---|
| ``` { "apiName": string, "uiName": string, "description": string, "deprecatedApiNames": [ string ], "type": enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/MetricType`), "expression": string } ``` |

| Fields ||
|---|---|
| `apiName` | `string` A metric name. Useable in [Metric](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#Metric)'s `name`. For example, `eventCount`. |
| `uiName` | `string` This metric's name within the Google Analytics user interface. For example, `Event count`. |
| `description` | `string` Description of how this metric is used and calculated. |
| `deprecatedApiNames[]` | `string` Still usable but deprecated names for this metric. If populated, this metric is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the metric will be available only by `apiName`. |
| `type` | ``enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/MetricType`)`` The type of this metric. |
| `expression` | `string` The mathematical expression for this derived metric. Can be used in [Metric](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Metadata#Metric)'s `expression` field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty. |