Query Meta Metric¶
Get meta metrics by object type IDs.
Request Format¶
GET https://{api-gateway}/cds-meta-service/v1.0/metric?action=query
Request Parameters¶
Name |
Location |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID which the metric belongs to. How to get orgId >> |
mdmTypes |
Query |
Mandatory |
String |
The object type ID which the metric belongs to. Separate multiple IDs by commas. Up to 100 object type IDs are allowed in a single query. How to get mdmTypes>> |
locale |
Query |
Optional |
String |
Use zh-CN, en-US, ja-JP, or es-ES. If not specified, the value is set to en_US by default. |
withI18n |
Query |
Optional |
Boolean |
Whether to return the internationalization content. The value is |
withDataSourceInfo |
Query |
Optional |
Boolean |
Whether to return the information of data source. The default value is false. |
withElementGroupInfo |
Query |
Optional |
Boolean |
Whether to return the visualization group information. The default value is true. |
withSourceMetric |
Query |
Optional |
Boolean |
Whether to return the source metric metadata. The default value is false. If true, ensure that the required source metrics are open for query. |
withDescription |
Query |
Optional |
Boolean |
Whether to return the description. Default is false. |
Response Content Type¶
application/json; charset = UTF-8
Response Parameters¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
mdmType |
Definitely |
String |
The object type which the metric belongs to. |
metric |
Definitely |
String |
The identifier of the metric. |
name |
Definitely |
String |
The name of the metric in the corresponding request language. |
nameI18n |
Conditionally |
I18n Struct |
Describe the internalization content of the metric name. See I18n Struct. |
description |
Conditionally |
String |
The description of the metric in the corresponding request language. |
descriptionI18n |
Conditionally |
I18n Struct |
Describe the internalization content of the metric description. |
type |
Definitely |
String |
The data type of the metric. |
units |
Conditionally |
String |
The unit of the metric. |
expression |
Conditionally |
String |
The expression of the metric. |
mdmAggMethods |
Conditionally |
String |
The aggregation method of the metric by object type. |
interval |
Definitely |
String |
The supported query intervals of the metric such as D, M, and Y. |
period |
Conditionally |
String |
The time dimension of the cumulative metric such as TD, MTD, and YTD. |
passMetric |
Conditionally |
String |
The corresponding primary metric identifier of the cumulative metric. |
groups |
Conditionally |
Map (The Key is of the String type and the Value is a Group Struct) |
Describe the visualization group information of the metric. See Group Struct. |
enumerate |
Conditionally |
Map (The Key is of the String type and the Value is a Enumerate Struct) |
Describe the enumeration values of the enumerated metric. See Enumerate Struct. |
dimensions |
Conditionally |
String |
The supported dimension to aggregate the metric data. |
standardType |
Conditionally |
String |
The standard type of the metric to indicate if the metric is standardized and compliance. |
filters |
Conditionally |
String |
The supported filters of the metric. |
sortable |
Conditionally |
Boolean |
Whether the metric is sortable. |
datasources |
Conditionally |
String |
The data source of the metric. |
dataSourceCapability |
Conditionally |
String |
The supported capabilities of the data source such as pagination, filtering metrics, and sorting metrics. |
I18n Struct ¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
defaultValue |
Definitely |
String |
The default content. |
en_US |
Conditionally |
String |
The English content. |
zh_CN |
Conditionally |
String |
The Chinese content. |
es_ES |
Conditionally |
String |
The Spanish content. |
ja_JP |
Conditionally |
String |
The Japanese content. |
Group Struct ¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
groupName |
Definitely |
String |
The name of the visualization group in the corresponding request language. |
groupNameI18n |
Conditionally |
I18n Struct |
Describe the internalization content of the visualization group name. See I18n Struct. |
groupOrder |
Definitely |
Integer |
The order of the visualization group. |
elementName |
Definitely |
String |
The name of the element in the visualization group in the corresponding request language. |
elementNameI18n |
Conditionally |
I18n Struct |
Describe the internalization content of the element. See I18n Struct. |
elementOrder |
Definitely |
Integer |
The order of the element in the visualization group. |
area |
Definitely |
Map (The Key is of the String type and the Value is an Area Struct) |
Describe the area in the visualization group. See Area Struct. |
Area Struct ¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
areaName |
Definitely |
String |
The name of the area in the corresponding request language. |
areaNameI18n |
Conditionally |
I18n Struct |
Describe the internalization content of the area name. See I18n Struct. |
areaOrder |
Definitely |
Integer |
The order of the area. |
Enumerate Struct ¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
name |
Definitely |
String |
The name of the enumeration values in the corresponding request language. |
nameI18n |
Conditionally |
I18n Struct |
Describe the internalization content of the enumeration values. See I18n Struct. |
Response Codes¶
Samples¶
Request Sample¶
GET https://{api-gateway}/cds-meta-service/v1.0/metric?action=query&orgId=yourOrgId&mdmTypes=yourMdmType
Response Sample¶
{
"data":[
{
"mdmType":"yourMdmType",
"metric": "activeProduction",
"name": "Active Production",
"units": "kWh",
"type": "Double",
"interval": "D,M,Y,T",
"mdmAggMethods": "sum",
"accumulativePoint": "SITE.ActiveProduction",
"dimensions": "inverterModel,inverterMfr",
"dataSources": "SolarAPI,OLAPAPI"
},
{
"mdmType":"yourMdmType",
"metric": "PlannedCompRate",
"name": "Plan Completion Rate",
"units": "%",
"type": "Double",
"interval": "D,M,Y,T",
"mdmAggMethods": "--",
"groups": {
"Mobile_Metric_Tool": {
"groupName": "Mobile_Metric_Comparison",
"groupNameI18n": {
"defaultValue": "Mobile_Metric_Comparison",
"i18nValue": {}
},
"groupOrder": 12,
"elementName": "Planned Complete Rate",
"elementNameI18n": {
"defaultValue": "Planned Complete Rate",
"i18nValue": {
"en_US": "Planned Complete Rate",
"zh_CN": "计划完成率"
}
},
"elementOrder": 11,
"area": {
"Mobile_Metric_Tool_4": {
"areaName": "Production",
"areaNameI18n": {
"defaultValue": "Production",
"i18nValue": {}
},
"areaOrder": 4
}
}
},
"CT_Metric": {
"groupName": "Charting Tool",
"groupNameI18n": {
"defaultValue": "Charting Tool",
"i18nValue": {}
},
"groupOrder": 7,
"elementName": "Planned Complete Rate",
"elementNameI18n": {
"defaultValue": "Planned Complete Rate",
"i18nValue": {
"en_US": "Planned Complete Rate",
"zh_CN": "完成率"
}
},
"elementOrder": 3,
"area": {
"CT_Metric1": {
"areaName": "Metric",
"areaNameI18n": {
"defaultValue": "Metric",
"i18nValue": {}
},
"areaOrder": 2
}
}
}
},
"enumerate": {
"yourEnumValue": {
"nameI18n": {
"defaultValue": "yourEnumValue",
"i18nValue": {}
},
"name": "yourEnumValue"
},
"yourEnumValue": {
"nameI18n": {
"defaultValue": "yourEnumValue",
"i18nValue": {}
},
"name": "yourEnumValue"
}
}
},
{
"mdmType":"yourMdmType",
"metric": "SITE.PR",
"name": "Performance Ratio",
"units": "%",
"type": "Double",
"interval": "D,M,Y,T",
"expression": "#{Metric['SITE.PR150_Numerator'] / Metric['SITE.PR150_Denominator']}",
"standardType": "illegal",
"filters": ">,>=",
"sortable": false,
"dataSources": "SolarAPI",
"dataSourceCapability": {
"dimensionFilter": "2",
"pagination": "1",
"mdmGroup": "1",
"virtualDimension": "1",
"dimensionSort": "2",
"metricSort": "2",
"metricFilter": "2",
"rollup": "1"
}
}
],
"code":0,
"msg":"OK"
}