--- title: "QueryWidgetDataPreview" slug: "management-cloudinsight-querywidgetdatapreview" updated: 2026-09-17T09:58:00Z published: 2026-09-17T09:58:00Z canonical: "api.ncloud-docs.com/management-cloudinsight-querywidgetdatapreview" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # QueryWidgetDataPreview Classic/VPC環境で利用できます。 Metricデータと一緒にプレビューチャートを照会します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | POST | /cw_fea/real/cw/api/data/chart/preview | ### リクエストヘッダ Cloud Insight APIで共通して使用されるヘッダの詳細は、[Cloud Insightのリクエストヘッダ](/docs/ja/management-cloudinsight#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストボディ Metric情報を利用したプレビューチャート照会関連フィールドの詳細は、[ChartDataWidgetDto](/common-vapidatatype-cichartdatawidgetdto)をご参照ください。 ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl --location -request POST 'https://cw.apigw.ntruss.com/cw_fea/real/cw/api/data/chart/preview' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Content-Type: application/json' \ --data '{ "metricsInfo": [ { "resourceId": "**********", "resourceName": "**********", "color": "#1f77b4", "displayName": "avg_write_cnt", "metric": "avg_write_cnt", "period": "Min30", "statistic": "COUNT", "prodKey": "**********", "productName": "System/Server(VPC)", "dimensions": { "type": "svr", "instanceNo": "**********" } } ], "periodStart": **********, "periodEnd": ********** }' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスボディ レスポンスボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `color` | String | - | チャートの色 | | `data` | Array | - | 照会結果 - データポイント(Unix Timestamp形式)、データの値の形式で表示 | | `dimensions` | Object | - | Dimension情報 | | `dimensions.instanceNo` | String | - | インスタンス番号 | | `dimensions.name` | String | - | Dimension名 | | `dimensions.type` | String | - | Dimensionタイプ | | `displayName` | String | - | ウィジェットに表示される Metric名 | | `idDimension` | String | - | Dimension名 | | `metric` | String | - | Metricの名前 | | `period` | String | - | 集計周期 - `Min1` \| `Min5` \| `Min30` \| `Hour2` \| `Day1` | | `prodKey` | String | - | 商品キー(cw_key) - [Cloud Insight指標](/docs/ja/management-cloudinsight-productinfo)を参照 | | `prodName` | String | - | 商品名 - [Cloud Insight指標](/docs/ja/management-cloudinsight-productinfo)を参照 | | `resourceName` | String | - | リソース名 | | `statistic` | String | - | 集計関数 - `COUNT` \| `SUM` \| `MAX` \| `MIN` \| `AVG` | ### レスポンスステータスコード NAVERクラウドプラットフォームで共通して使用されるレスポンスステータスコードの詳細は、[Cloud Insight APIのレスポンスステータスコード](/docs/ja/management-cloudinsight#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` [ { "color": "#1f77b4", "data": [ [ 1733184000000, 22 ], [ 1733185800000, 30 ], [ 1733187600000, 30 ], [ 1733189400000, 30 ], [ 1733191200000, 30 ], [ 1733193000000, 30 ], [ 1733194800000, 30 ], [ 1733196600000, 30 ], [ 1733198400000, 30 ], [ 1733200200000, 30 ], [ 1733202000000, 30 ], [ 1733203800000, 30 ] ], "dimensions": { "instanceNo": "**********", "name": "**********", "type": "svr" }, "displayName": "avg_write_cnt", "idDimension": "instanceNo", "metric": "avg_write_cnt", "period": "Min30", "prodKey": "**********", "prodName": "Server(VPC)", "resourceName": "**********", "statistic": "COUNT" } ] ```