Get metrics definition

GET/projects/{projectId}/entities/{entityId}/metrics/{metricsDefinitionId}

Base URL: https://api.tinkermode.com

Get the specified metrics definition.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user API key of a user with permission to read the entity metrics, a service account token with the same permission, or a project API key.

Path parameters

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityIdstringYesEntity ID (unique within project)
metricsDefinitionIdstringYesMetrics definition ID (unique within entity class)

Responses

200 Successful retrieval of metrics definition.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataStoreConfigurationobjectYesData store configuration of metrics.
Properties of dataStoreConfiguration
PropertyTypeRequiredConstraintsDescription
bulkDataLabelstringNoIf Module Type is tsdb or sensor_cloud_tsdb the module instance, this field is the bulk data lable assigned to the TSDB module instance.
moduleInstanceIdstringNoIf Module Type is tsdb or sensor_cloud_tsdb, this field is the TSDB module instance ID. If module type is home_app_proxy, this field is the Home App Proxy path.
moduleTypestringNoModule type. Must be tsdb, tsdbv2, sensor_cloud_tsdb, or home_app_proxy.
sensorCloudTSDBConfigobjectNoRequired if Module Type is sensor_cloud_tsdb
Properties of sensorCloudTSDBConfig
PropertyTypeRequiredConstraintsDescription
attributeForCollectionIdstringNoEntity attribute that holds the TSDB collection ID corresponding to the metrics definition.
tsdbv2ConfigobjectNoRequired if Module Type is tsdbv2
Properties of tsdbv2Config
PropertyTypeRequiredConstraintsDescription
managedbooleanNoWhether BizStack should manage the TSDBv2 schema. If set to true, BizStack will manage the corresponding TSDBv2 schema for the entity metrics definition based on the provided numericMetrics and tagMetrics. This means that BizStack will: - create the schema if it does not exist; - create the numericMetrics and tagMetrics specified in the request; and - delete any numericMetrics and tagMetrics that exist in the TSDBv2 schema but not in the request. If set to false, you are expected to create the TSDBv2 schema yourself and set schemaName accordingly. BizStack will only validate that a schema with schemaName exists. numericMetrics and tagMetrics must be provided if managed=true, and must not be provided if managed=false.
schemaNamestringNoName of TSDBv2 schema used by metrics definition.
displayNamestringNoThe display name for the metrics.
metricsDefinitionIdstringYesread-only (server-generated)ID of the metrics definition. Must be unique within an Entity Class.
metricsTypestringYesread-only (server-generated)Type of metrics. Must be raw or derived.
numericMetricsarrayYesList of numerical field definitions.
tagMetricsarrayNoList of string tag definitions.

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

404 The requested metric does not exist or is not accessible.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.