Get the metric list associated with cloud products - GetProductMetrics
Overview
Get the metric list associated with cloud products
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetProductMetrics . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProductKey | string | Cloud product key, for example UHOST-uhost | Yes |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Data | GetProductMetricsRespData | Return Data | Yes |
Data Model
GetProductMetricsRespData
Field Name | Type | Description Information | Required |
---|---|---|---|
Total | int | Total number of query results | No |
List | array[Metirc] | Metric List | No |
UnitConfigs | array[MetricUnitConfig] | Unit Conversion Information | No |
Metirc
Field Name | Type | Description Information | Required |
---|---|---|---|
ProductType | int | Cloud Product ID | No |
UnitID | int | Unit ID | No |
MetricID | int | Metric ID | No |
Metric | string | Unique Indicator Identifier (uhost_cpu_usage) | No |
MetricEnName | string | Metric English Name | No |
MetricChName | string | Metric Chinese Name | No |
MetricEnDesc | string | Metric English Description | No |
MetricChDesc | string | Metric Chinese Description | No |
MetricGroup | string | Metric Classification/Metric Group | No |
FrequencyMs | int | Reporting Frequency Milliseconds | No |
Unit | MetricUnit | Unit | No |
CreatedBy | string | Creator | No |
CreatedAt | string | Creation Time | No |
UpdatedBy | string | Modifier | No |
UpdatedAt | string | Modification Time | No |
MetricUnitConfig
Field Name | Type | Description Information | Required |
---|---|---|---|
UnitCnNames | array[string] | List of Metric Chinese Names | No |
UnitEnNames | array[string] | List of Indicator English Names | No |
ConversionFactor | int | Conversion Factor | No |
ConversionRules | array[ConversionRule] | Conversion Rules | No |
ConversionRule
Field Name | Type | Description Information | Required |
---|---|---|---|
From | string | Source | No |
To | string | Target | No |
ConversionFactor | int | Conversion Factor | No |
MetricUnit
Field Name | Type | Description Information | Required |
---|---|---|---|
UnitID | int | Unit ID | No |
GroupId | int | GroupId | No |
UnitEnName | string | English Name of the Unit | No |
UnitChName | string | Company Chinese Name | No |
UnitDesc | string | Unit Description | No |
ConversionFactor | int | Conversion Factor | No |
CreatedBy | string | Creator | No |
UpdatedBy | string | Modifier | No |
CreatedAt | string | Creation Time | No |
UpdatedAt | string | Modification Time | No |
DeletedAt | int | Deletion Time | No |
Example
Request Example
https://api.surfercloud.com/?Action=GetProductMetrics
&ProductKey=jVhlepWB
&MetricGroup=XQkJSCbW
Response Example
{
"Action": "GetProductMetricsResponse",
"List": [
{
"CreatedAt": 1,
"CreatedBy": "tLhKOVLD",
"FrequencyMs": 9,
"Id": 1,
"Metric": "ugUWVHdH",
"MetricChDesc": "qVkXFHAM",
"MetricChName": "LNuoYvdb",
"MetricEnDesc": "TSlSuWGC",
"MetricEnName": "CLhJOIQh",
"MetricGroup": "YdeQeLBt",
"MetricID": 6,
"ProductType": 3,
"UnitID": 2,
"UpdateAt": 8,
"UpdateBy": "fchAAjJb"
}
],
"RetCode": 0,
"Total": 9
}