--- title: "Get query history" slug: "analytics-dataquery-query-getqueries" updated: 2026-09-17T09:47:59Z published: 2026-09-17T09:47:59Z canonical: "api.ncloud-docs.com/analytics-dataquery-query-getqueries" --- > ## 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. # Get query history Available in VPC Get the query execution history. ## Request This section describes the request format. The method and URI are as follows: | Method | URI | | --- | --- | | GET | /api/v2/queries | ### Request headers For information about the headers common to all Data Query APIs, see [Data Query request headers](/docs/en/analytics-dataquery#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94). ### Request query parameters You can use the following query parameters with your request: | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | String | Optional | Filter by the query status. - `QUEUED` \| `STARTING` \| `RUNNING` \| `FINISHED` \| `FAILED` \| `CANCELED` - `QUEUED`: Pending. - `STARTING`: Execution started. - `RUNNING`: Running. - `FINISHED`: Execution finished. - `FAILED`: Execution failed. - `CANCELED`: Execution canceled. | | `pageNo` | Integer | Optional | Page number - 1-N (default: 1) | | `pageSize` | Integer | Optional | Number of items per page - 1-500 (default: 20) | ### Request example The request example is as follows: ``` curl --location --request GET 'https://kr.dataquery.naverncp.com/api/v2/queries?pageNo=1&pageSize=2' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' ``` ## Response This section describes the response format. ### Response body The response body includes the following data: | Field | Type | Required | Description | | --- | --- | --- | --- | | `pageNo` | Integer | - | Page number | | `pageSize` | Integer | - | Number of items per page | | `hasMore` | Boolean | - | Whether next page exists - `true` \| `false` - `true`: It exists. - `false`: It doesn't exist. | | `queryList` | Array | - | Query execution history: [QueryHistory](/docs/en/analytics-dataquery-query-getqueries#QueryHistory) | #### `QueryHistory` The following describes `QueryHistory`. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | String | - | Execution ID | | `projectId` | Integer | - | Query execution project ID | | `query` | String | - | Execution query statement | | `status` | String | - | Query status | | `isReuse` | Boolean | - | Whether to reuse query results - `true` \| `false` - `true`: Reuse - `false`: Not reuse | | `clientType` | String | - | Query request client type - `CONSOLE` \| `API` | | `errorMessage` | String | - | Error message - Display `null` when call is successful. | | `runTime` | Number | - | Query execution run time (millisecond) | | `processDataSize` | Number | - | Processing data size | | `startTime` | String | - | Query execution start date and time - ISO 8601 format | ### Response status codes For information about the HTTP status codes common to all Data Query APIs, see [Data Query response status codes](/docs/en/analytics-dataquery#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C). ### Response example The response example is as follows: ``` { "pageNo": 1, "pageSize": 2, "hasMore": true, "queryList": [ { "id": "eab65f48-****-****-****-c87f0db59b49", "projectId": 309, "query": "SELECT date, area_name, fine_dust_per_day\r\nFROM data_catalog.default.a_datacatalog_c512_4c8f9378\r\nWHERE area_name = 'downtown'", "status": "FINISHED", "isReuse": false, "clientType": "CONSOLE", "errorMessage": null, "runTime": 827, "processDataSize": 2783, "startTime": "2025-07-14T04:17:24.501+00:00" }, { "id": "d7d1c896-****-****-****-1abcd2f816a2", "projectId": 309, "query": "SELECT date, area_name, fine_dust_per_day\r\nFROM data_catalog.default.a_datacatalog_c512_4c8f9378\r\nWHERE area_name = 'downtown'", "status": "FINISHED", "isReuse": false, "clientType": "CONSOLE", "errorMessage": null, "runTime": 268, "processDataSize": 2783, "startTime": "2025-07-14T02:43:14.411+00:00" } ] } ```