# Get high-precision metric sample data - QueryMetricDenseData

## Overview

Get high-precision metric sample data






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `QueryMetricDenseData`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.genesissai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. Global products do not need to be transmitted, other types must be transmitted. |No|
| **ProjectId** | string | Project ID |No|
| **ProductKey** | string | Resource Type |**Yes**|
| **StartTime** | int | Start Timestamp |**Yes**|
| **EndTime** | int | End Timestamp |**Yes**|
| **MetricInfos.N.Metric** | string | Metric Name |No|
| **MetricInfos.N.ResourceId** | string | Resource ID |No|
| **MetricInfos.N.Tags.AnyKey** | string | AnyKey: Represents any user-defined key.<br />Tags is a user-defined object map, which are the key and value of the tag to be queried.<br />The key and value in the user-defined Tags object are the key and value of the tag to be queried. For example:<br />"Tags":{<br />  "tag1":"value1",<br />  "tag2":"value2",<br />  "tag3":"value3"<br />} |No|

### 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** | [*QueryMetricDataResp*](#querymetricdataresp) | Return high-precision metric monitoring data |No|

#### Data Model


#### QueryMetricDataResp

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **InvalidResourceIds** | array[string] | IDs of invalid or unauthorized resources |No|
| **List** | array[[*QueryMetricDataRespItem*](#querymetricdatarespitem)] | Query Result Set |No|

#### QueryMetricDataRespItem

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Metric** | string | Metric Name |No|
| **ErrCode** | int | Processing status code for this metric |No|
| **ErrMsg** | string | Status message for this metric |No|
| **TagEntries** | array[[*TagEntry*](#tagentry)] | Tag list. Each TagEntry contains TagName and KeyList (all candidate values). |No|
| **Results** | array[[*MetricResult*](#metricresult)] | List of returned time series |No|

#### TagEntry

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **TagName** | string | Tag entry name |No|
| **KeyList** | array[string] | Tag candidate values |No|

#### MetricResult

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ResourceId** | string | UUID of the resource |No|
| **ResourceName** | string | Resource name |No|
| **TagList** | array[[*TagListItem*](#taglistitem)] | Resource tag list. Each TagListItem contains Tag and TagValue. |No|
| **Values** | array[[*MetricSample*](#metricsample)] | Metric data points; each item is a MetricPoint |No|

#### TagListItem

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Tag** | string | Tag name |No|
| **TagValue** | string | Tag value |No|

#### MetricSample

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Timestamp** | int | timestamp |No|
| **Value** | float | Sample Value |No|

## Example

### Request Example
    
```
https://api.genesissai.com/?Action=QueryMetricDenseData
&Region=cn-zj
&ProjectId=RKqqwnaX
&ProductKey=TcritUYT
&StartTime=1
&EndTime=4
&MetricInfos.N.Metric=MAuoFcLS
&MetricInfos.N.ResourceId=bDFuWdlA
&MetricInfos.N.Tags.AnyKey=zBerlldy
```

### Response Example
    
```json
{
  "Action": "QueryMetricDenseDataResponse",
  "Data": {},
  "Message": "WAMdwwGi",
  "RetCode": 0
}
```





