Query Meta Generic Data


Get meta generic data by object type IDs.

Request Format


GET/POST https://{api-gateway}/cds-meta-service/v1.0/generic?action=query

Request Parameters


Name Location Mandatory/Optional Data Type Description
orgId Query Mandatory String The organization ID which the generic data belongs to. How to get orgId >>
mdmTypes Query/Form Optional String The object type ID which the generic data belongs to. Separate multiple IDs by commas. Up to 100 object type IDs are allowed in a single query. How to get mdmTypes>>
mdmIds Query/Form Optional String The object instance ID which the generic data belongs to. Separate multiple IDs by commas. Up to 20000 object instances are allowed in a single query. To ensure query performance, it is recommended that you pass in no more than 100 object instances in a single query.
metaTypes Query/Form Optional String The type of the returned meta data. Use measurement-point, attribute, and metric. Separate multiple types by commas.
locale Query/Form 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/Form Optional Boolean Whether to return the internationalization content. The value is true or false. Default is false.
withDataSourceInfo Query/Form Optional Boolean Whether to return the information of data source. The default value is false.
withElementGroupInfo Query/Form 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.

Note

mdmTypes and mdmIds are both optional and you need to use at least one of them in a query. If both are used, mdmIds has a higher priority than mdmTypes.

Response Content Type


application/json; charset = UTF-8

Response Parameters


Name To Return Definitely/Conditionally Data Type Description
attribute Conditionally AttributeMeta Struct Describe the information of the attribute metadata. See Query Meta Attribute.
measurementPoint Conditionally MeasurementPointMeta Struct Describe the information of the measurement point metadata. See Query Meta Measurement Point.
metric Conditionally MetricMeta Struct Describe the information of the metric metadata. See Query Meta Metric.

Samples

Request Sample


GET https://{api-gateway}/cds-meta-service/v1.0/generic?action=query&orgId=yourOrgId&mdmTypes=yourMdmType

Response Sample


{
   "data":[
         "measurement-point":[
            {
                "mdmType":"yourMdmType",
                "modelId": "yourModelId",
                "name": "Site Active Power",
                "units": "kW",
                "type": "Double",
                "measurementPoint": "SITE.GenActivePW",
                "timeAggMethods": "avg,sum,max,min,first,last",
                "mdmAggMethods": "sum",
                "interval":"5,15,60",
                "accumulable": false,
                "signalType": "AI"
            },
            {
                "mdmType":"yourMdmType",
                "modelId": "yourModelId",
                "name": "Site POA",
                "units": "W/m²",
                "type": "Double",
                "measurementPoint": "SITE.Radiation",
                "timeAggMethods": "avg,sum,max,min,first,last",
                "mdmAggMethods": "sum",
                "interval":"5,15,60",
                "accumulable": true,
                "signalType": "AI"
            }
        ],
        "attribute":[
            {
                "mdmType":"yourMdmType",
                "modelId": "yourModelId",
                "name":"Commissioning Date",
                "attribute":"operativeDate",
                "units":"--",
                "type":"date"
            },
            {
                "mdmType":"yourMdmType",
                "modelId": "yourModelId",
                "name":"Onboarding Date",
                "attribute":"etlDate",
                "units":"--",
                "type":"date"
            },
            {
                "mdmType":"yourMdmType",
                "modelId": "yourModelId",
                "name":"objectTypeID",
                "attribute":"objectTypeID",
                "units":"--",
                "type":"string"
            },
            {
                "mdmType":"yourMdmType",
                "modelId": "yourModelId",
                "name":"Unit Price",
                "attribute":"correctedPrice",
                "units":"--",
                "type":"Double"
            }
        ],
        "metric":[
            {
                "mdmType":"yourMdmType",
                "metric": "activeProduction",
                "name": "Active Production",
                "units": "kWh",
                "type": "Double",
                "interval": "D,M,Y,T",
                "mdmAggMethods": "sum",
                "accumulativePoint": "SITE.ActiveProduction"
            },
            {
                "mdmType":"yourMdmType",
                "metric": "SITE.StringDownLossRecoverable",
                "name": "Recoverable Down String Loss",
                "units": "kWh",
                "type": "Double",
                "interval": "D,M,Y,T",
                "mdmAggMethods": "sum",
                "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",
   "traceId": "1234567890abcdefghijkl0987654321"
}