Get metric definition

GET {{baseUrl}}/api/-/pulse/definitions/:definition_id

Gets a metric definition and optionally metrics it contains.

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

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

{"definition":{"metadata":{"name":"\u003cstring\u003e","description":"\u003cstring\u003e","id":"\u003cstring\u003e","schema_version":"\u003cstring\u003e","definition_version":"\u003clong\u003e"},"specification":{"datasource":{"id":"\u003cstring\u003e"},"basic_specification":{"measure":{"field":"\u003cstring\u003e","aggregation":"AGGREGATION_UNSPECIFIED"},"time_dimension":{"field":"\u003cstring\u003e"},"filters":[{"field":"\u003cstring\u003e","operator":"OPERATOR_NOT_EQUAL","categorical_values":[{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"},{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"}]},{"field":"\u003cstring\u003e","operator":"OPERATOR_NOT_EQUAL","categorical_values":[{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"},{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"}]}]},"viz_state_specification":{"viz_state_string":"\u003cstring\u003e"},"is_running_total":"\u003cboolean\u003e"},"extension_options":{"allowed_dimensions":["\u003cstring\u003e","\u003cstring\u003e"],"allowed_granularities":["GRANULARITY_BY_DAY","GRANULARITY_BY_QUARTER"]},"metrics":[{"id":"\u003cstring\u003e","specification":{"filters":[{"field":"\u003cstring\u003e","operator":"OPERATOR_NOT_EQUAL","categorical_values":[{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"},{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"}]},{"field":"\u003cstring\u003e","operator":"OPERATOR_EQUAL","categorical_values":[{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"},{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"}]}],"measurement_period":{"granularity":"GRANULARITY_BY_YEAR","range":"RANGE_LAST_COMPLETE"},"comparison":{"comparison":"TIME_COMPARISON_YEAR_AGO_PERIOD"}},"definition_id":"\u003cstring\u003e","is_default":"\u003cboolean\u003e","schema_version":"\u003cstring\u003e"},{"id":"\u003cstring\u003e","specification":{"filters":[{"field":"\u003cstring\u003e","operator":"OPERATOR_EQUAL","categorical_values":[{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"},{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"}]},{"field":"\u003cstring\u003e","operator":"OPERATOR_EQUAL","categorical_values":[{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"},{"string_value":"\u003cstring\u003e","bool_value":"\u003cboolean\u003e","null_value":"\u003cstring\u003e"}]}],"measurement_period":{"granularity":"GRANULARITY_BY_MONTH","range":"RANGE_LAST_COMPLETE"},"comparison":{"comparison":"TIME_COMPARISON_NONE"}},"definition_id":"\u003cstring\u003e","is_default":"\u003cboolean\u003e","schema_version":"\u003cstring\u003e"}],"total_metrics":"\u003clong\u003e","representation_options":{"type":"NUMBER_FORMAT_TYPE_PERCENT","number_units":{"singular_noun":"\u003cstring\u003e","plural_noun":"\u003cstring\u003e"},"sentiment_type":"SENTIMENT_TYPE_DOWN_IS_GOOD","row_level_id_field":{"identifier_col":"\u003cstring\u003e","identifier_label":"\u003cstring\u003e"},"row_level_entity_names":{"entity_name_singular":"\u003cstring\u003e","entity_name_plural":"\u003cstring\u003e"}},"insights_options":{"settings":[{"type":"INSIGHT_TYPE_UNSPECIFIED","disabled":"\u003cboolean\u003e"},{"type":"INSIGHT_TYPE_RISKY_MONOPOLY","disabled":"\u003cboolean\u003e"}]}}}