List metric definitions

GET {{baseUrl}}/api/-/pulse/definitions?order_by=<string>&view=DEFINITION_VIEW_FULL&number_of_metrics=<long>&page_size=<integer>&filter=<string>&metric_id=<string>&page_token=<string>

Lists the metric definitions configured for a site or, optionally, the details and definition for a specific metric.

Version: Available in API 3.21 (Tableau Cloud December 2023) and later. Not available for Tableau Server. Versioning Overview

Permissions: Can be called by any user, but only returns definitions and metrics that the user has permissions to view. Permissions Overview

License: No additional license required.

Access Scope: tableau:insightdefinitionsmetrics:read
Access Scopes Overview: Cloud

Request Params

KeyDatatypeRequiredDescription
order_bystring
viewstringThe range of metrics to return for a definition. The default is DEFINITION_VIEW_BASIC if not specified.
  • DEFINITION_VIEW_BASIC - Return only the specified metric definition.

  • DEFINITION_VIEW_FULL - Return the metric definition and the specified number of metrics.

  • DEFINITION_VIEW_DEFAULT - Return the metric definition and the default metric. | | number_of_metrics | string | | (Required if view is DEFINITION_VIEW_FULL) The number of metrics to return. | | page_size | string | | description: |- Specifies the number of results in a paged response.

    Example:

    > GET .../subscriptions?pageSize=50

    Combining Path Parameters: A page_size expression can be combined with other path parameters using an ampersand (&) as a separator, and is typically used along with a page number expression.

    <a href='https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_paging.htm&#39; target='_blank'>Learn more about paginating the response</a>. required: false | | filter | string | | | | metric_id | string | | If a metric LUID is specified, only return the definition that is related to the metric, and the details of the metric. | | page_token | string | | Specifies the page of items to be returned from a requested list. The value of page_token for the next page of returns is found in the next_page_token of the current response. If there are no further items to return, the value of next_page_token will be empty.

Example:

> GET .../definitions?pageToken={next_page_value}

Combining Path Parameters: A page_token expression can be combined with other path parameters using an ampersand (&) as a separator, and is typically used along with a page number expression.

<a href='https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_paging.htm&#39; target='_blank'>Learn more about paginating the response</a>. |

HEADERS

KeyDatatypeRequiredDescription
X-Tableau-AuthstringThe Tableau authentication header. The value is a credentials token from a Tableau server's response to an authentication request.
The Content-Type and Accept headers should be the mediatype of the request and response except in cases where you want to explicitly allow other versions of the resource.
Acceptstring

RESPONSES

status: OK

{&quot;definitions&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;properties&quot;:{&quot;metadata&quot;:{&quot;properties&quot;:{&quot;name&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The name of the definition.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;description&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The description of the definition.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;id&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The LUID of the definition.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;schema_version&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The version of the schema of the definition. Current version is 1.0.0.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;definition_version&quot;:{&quot;type&quot;:&quot;integer&quot;,&quot;description&quot;:&quot;The version of the definition. Increments every time the definition is updated.&quot;,&quot;format&quot;:&quot;int64&quot;,&quot;default&quot;:&quot;\u003clong\u003e&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;specification&quot;:{&quot;properties&quot;:{&quot;datasource&quot;:{&quot;properties&quot;:{&quot;id&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The LUID for the datasource for a definition.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;basic_specification&quot;:{&quot;properties&quot;:{&quot;measure&quot;:{&quot;properties&quot;:{&quot;field&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The data source field of the measure of the metric.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;aggregation&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;\u003cbr/\u003eThe method used to aggregate the values of the measured data source field.&quot;,&quot;enum&quot;:[&quot;AGGREGATION_UNSPECIFIED&quot;,&quot;AGGREGATION_SUM&quot;,&quot;AGGREGATION_AVERAGE&quot;,&quot;AGGREGATION_MEDIAN&quot;,&quot;AGGREGATION_MAX&quot;,&quot;AGGREGATION_MIN&quot;,&quot;AGGREGATION_COUNT&quot;,&quot;AGGREGATION_COUNT_DISTINCT&quot;]}},&quot;type&quot;:&quot;object&quot;},&quot;time_dimension&quot;:{&quot;properties&quot;:{&quot;field&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The data source field used for the time dimension of the metric.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;filters&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;properties&quot;:{&quot;field&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;_(Required)_ The data source field that contains the values of metric filter options.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;operator&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;_(Required)_ The operator of the filter. Determines if the filter includes or excludes the specified categorical values.&quot;,&quot;enum&quot;:[&quot;OPERATOR_UNSPECIFIED&quot;,&quot;OPERATOR_EQUAL&quot;,&quot;OPERATOR_NOT_EQUAL&quot;]},&quot;categorical_values&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;description&quot;:&quot;_(Required)_ An array listing the values of the field to be operated on when the filter is applied to the metric data. The type of each member can be one of string, boolean, or null.&quot;,&quot;items&quot;:{&quot;properties&quot;:{&quot;string_value&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The string value of the categorical value.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;bool_value&quot;:{&quot;type&quot;:&quot;boolean&quot;,&quot;description&quot;:&quot;The boolean value of the categorical value.&quot;,&quot;default&quot;:&quot;\u003cboolean\u003e&quot;},&quot;null_value&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The null value of the categorical value.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;}}},&quot;type&quot;:&quot;object&quot;}}},&quot;type&quot;:&quot;object&quot;},&quot;viz_state_specification&quot;:{&quot;properties&quot;:{&quot;viz_state_string&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot; This is a Base64 encoded string, typically generated via the advanced option in the Tableau user interface.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;is_running_total&quot;:{&quot;type&quot;:&quot;boolean&quot;,&quot;description&quot;:&quot;If true, metrics related to a definition have a running total. If false, then totals are only for the defined time period of the measure. Defaults to false.&quot;,&quot;default&quot;:&quot;\u003cboolean\u003e&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;extension_options&quot;:{&quot;properties&quot;:{&quot;allowed_dimensions&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;description&quot;:&quot;_(Required)_ Specifies which data source dimensions can be used  as filters by metrics created using the definition.  Values included are a comma separated list of data source column names.&quot;},&quot;allowed_granularities&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;_(Required)_ Specifies the span of time time that can be used to calculate metrics created using the definition.&quot;,&quot;enum&quot;:[&quot;GRANULARITY_UNSPECIFIED&quot;,&quot;GRANULARITY_BY_YEAR&quot;,&quot;GRANULARITY_BY_QUARTER&quot;,&quot;GRANULARITY_BY_MONTH&quot;,&quot;GRANULARITY_BY_WEEK&quot;,&quot;GRANULARITY_BY_DAY&quot;]}}},&quot;type&quot;:&quot;object&quot;},&quot;metrics&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;properties&quot;:{&quot;id&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The LUID of the metric.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;specification&quot;:{&quot;properties&quot;:{&quot;filters&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;properties&quot;:{&quot;field&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;_(Required)_ The data source field that contains the values of metric filter options.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;operator&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;_(Required)_ The operator of the filter. Determines if the filter includes or excludes the specified categorical values.&quot;,&quot;enum&quot;:[&quot;OPERATOR_UNSPECIFIED&quot;,&quot;OPERATOR_EQUAL&quot;,&quot;OPERATOR_NOT_EQUAL&quot;]},&quot;categorical_values&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;description&quot;:&quot;_(Required)_ An array listing the values of the field to be operated on when the filter is applied to the metric data. The type of each member can be one of string, boolean, or null.&quot;,&quot;items&quot;:{&quot;properties&quot;:{&quot;string_value&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The string value of the categorical value.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;bool_value&quot;:{&quot;type&quot;:&quot;boolean&quot;,&quot;description&quot;:&quot;The boolean value of the categorical value.&quot;,&quot;default&quot;:&quot;\u003cboolean\u003e&quot;},&quot;null_value&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The null value of the categorical value.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;}}},&quot;type&quot;:&quot;object&quot;}},&quot;measurement_period&quot;:{&quot;properties&quot;:{&quot;granularity&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;_(Required)_ The time period used to aggregate the metric.&quot;,&quot;enum&quot;:[&quot;GRANULARITY_UNSPECIFIED&quot;,&quot;GRANULARITY_BY_YEAR&quot;,&quot;GRANULARITY_BY_QUARTER&quot;,&quot;GRANULARITY_BY_MONTH&quot;,&quot;GRANULARITY_BY_WEEK&quot;,&quot;GRANULARITY_BY_DAY&quot;]},&quot;range&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;Options for how to define the period that measures are aggregated in.\u003cbr/\u003e\u003cul\u003e\u003cli\u003e`RANGE_CURRENT_PARTIAL` - use an aggregation of the measures in the current period up till now.\u003c/li\u003e\u003cli\u003e`RANGE_LAST_COMPLETE` - use an aggregation of the measures up till the end of the last complete period.\u003c/li\u003e\u003c/ul\u003e&quot;,&quot;enum&quot;:[&quot;RANGE_UNSPECIFIED&quot;,&quot;RANGE_CURRENT_PARTIAL&quot;,&quot;RANGE_LAST_COMPLETE&quot;]}},&quot;type&quot;:&quot;object&quot;},&quot;comparison&quot;:{&quot;properties&quot;:{&quot;comparison&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The configuration of the period of metric values being compared.&quot;,&quot;enum&quot;:[&quot;TIME_COMPARISON_UNSPECIFIED&quot;,&quot;TIME_COMPARISON_NONE&quot;,&quot;TIME_COMPARISON_PREVIOUS_PERIOD&quot;,&quot;TIME_COMPARISON_YEAR_AGO_PERIOD&quot;]}},&quot;type&quot;:&quot;object&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;definition_id&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The LUID of the definition that the metric is related to.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;is_default&quot;:{&quot;type&quot;:&quot;boolean&quot;,&quot;description&quot;:&quot;If true, the metric is the default metric that is created for it&#39;s definition. If false, the metric was created by a user or programmatically. Default metrics can&#39;t be deleted unless their definition is deleted.&quot;,&quot;default&quot;:&quot;\u003cboolean\u003e&quot;},&quot;schema_version&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The version of the schema of the metric. The current version is 1.0.0.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;}},&quot;total_metrics&quot;:{&quot;type&quot;:&quot;integer&quot;,&quot;description&quot;:&quot;The total number of metrics in the definition.&quot;,&quot;format&quot;:&quot;int64&quot;,&quot;default&quot;:&quot;\u003clong\u003e&quot;},&quot;representation_options&quot;:{&quot;properties&quot;:{&quot;type&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The number format type of the definition.&quot;,&quot;enum&quot;:[&quot;NUMBER_FORMAT_TYPE_UNSPECIFIED&quot;,&quot;NUMBER_FORMAT_TYPE_NUMBER&quot;,&quot;NUMBER_FORMAT_TYPE_PERCENT&quot;,&quot;NUMBER_FORMAT_TYPE_CURRENCY&quot;]},&quot;number_units&quot;:{&quot;properties&quot;:{&quot;singular_noun&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The singular noun to use for the number unit.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;plural_noun&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The plural noun to use for the number unit.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;sentiment_type&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;Whether the favorable direction of the metric to increase or decrease, or is neutral.&quot;,&quot;enum&quot;:[&quot;SENTIMENT_TYPE_UNSPECIFIED&quot;,&quot;SENTIMENT_TYPE_NONE&quot;,&quot;SENTIMENT_TYPE_UP_IS_GOOD&quot;,&quot;SENTIMENT_TYPE_DOWN_IS_GOOD&quot;]},&quot;row_level_id_field&quot;:{&quot;properties&quot;:{&quot;identifier_col&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The data source column that contains the `identifier_label` of a row whose values will be aggregated for the metric.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;identifier_label&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The value in `identifier_col` column that causes the row containing the label to be aggregated as part of the metric.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;row_level_entity_names&quot;:{&quot;properties&quot;:{&quot;entity_name_singular&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The singular form of the expression describing the row level dimension of a data source.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;},&quot;entity_name_plural&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The plural form of the expression describing the row level dimension of a data source.&quot;,&quot;default&quot;:&quot;\u003cstring\u003e&quot;}},&quot;type&quot;:&quot;object&quot;}},&quot;type&quot;:&quot;object&quot;},&quot;insights_options&quot;:{&quot;properties&quot;:{&quot;settings&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;properties&quot;:{&quot;type&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;description&quot;:&quot;The type of the insight setting.&quot;,&quot;enum&quot;:[&quot;INSIGHT_TYPE_UNSPECIFIED&quot;,&quot;INSIGHT_TYPE_RISKY_MONOPOLY&quot;,&quot;INSIGHT_TYPE_TOP_DRIVERS&quot;,&quot;INSIGHT_TYPE_RECORD_LEVEL_OUTLIERS&quot;,&quot;INSIGHT_TYPE_CURRENT_TREND&quot;,&quot;INSIGHT_TYPE_NEW_TREND&quot;,&quot;INSIGHT_TYPE_TOP_DIMENSION_MEMBER_MOVERS&quot;,&quot;INSIGHT_TYPE_METRIC_FORECAST&quot;,&quot;INSIGHT_TYPE_BOTTOM_CONTRIBUTORS&quot;,&quot;INSIGHT_TYPE_TOP_DETRACTORS&quot;]},&quot;disabled&quot;:{&quot;type&quot;:&quot;boolean&quot;,&quot;description&quot;:&quot;Determines whether or not the insight setting is disabled. Defaults to false.&quot;,&quot;default&quot;:&quot;\u003cboolean\u003e&quot;}},&quot;type&quot;:&quot;object&quot;}}},&quot;type&quot;:&quot;object&quot;}},&quot;type&quot;:&quot;object&quot;}},&quot;next_page_token&quot;:&quot;\u003cstring\u003e&quot;,&quot;total_available&quot;:&quot;\u003cinteger\u003e&quot;,&quot;offset&quot;:&quot;\u003cinteger\u003e&quot;}