getScannerHistories

Prev Next

Available in VPC

Get the scanner execution history.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/catalogs/{catalogId}/scanners/{scannerId}/histories

Request headers

For information about the headers common to all Data Catalog APIs, see Data Catalog request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
catalogId Integer Required Catalog ID
scannerId Integer Required Scanner ID

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
fromTimestamp Integer Required Query start date and time (millisecond)
  • Unix timestamp format
toTimestamp Integer Required Query end date and time (millisecond)
  • Unix timestamp format
pageNo Integer Optional Page number
  • 1-N (default: 1)
pageSize Integer Optional Page output count
  • 1-200 (default: 20)

Request example

The request example is as follows:

curl --location --request GET 'https://datacatalog.apigw.ntruss.com/api/v1/catalogs/4**/scanners/9**/histories?fromTimestamp=1742338800000&toTimestamp=1742342400000' \
--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 - Page output count
totalCount Integer - Number of response results
scannerHistoryListResponseList Array - Running history list

scannerHistoryListResponseList

The following describes scannerHistoryListResponseList.

Field Type Required Description
scannerId Integer - Scanner ID
catalogId Integer - Catalog ID
beginTime String - Scan start date and time
  • ISO 8601 format
endTime String - Scan end date and time
  • ISO 8601 format
result String - Scanner execution result
  • SUCCESS | FAIL | CANCEL
    • SUCCESS: succeeded
    • FAIL: failed
    • CANCEL: canceled
resultMessage String - Execution result message
  • Displayed if result is FAIL or CANCEL
tableChanges String - Table and partition information added or changed as a result of the scan
  • Displayed if result is SUCCESS
elapsedTime Integer - Scanner execution time (second)
createTime String - History creation date and time
  • ISO 8601 format

Response status codes

For response status codes common to all Data Catalog APIs, see Data Catalog response status codes.

Response example

The response example is as follows:

{
    "pageNo": 1,
    "pageSize": 20,
    "totalCount": 3,
    "scannerHistoryListResponseList": [
        {
            "scannerId": 9**,
            "catalogId": 4**,
            "beginTime": "2025-03-19T08:50:45+0900",
            "endTime": "2025-03-19T08:50:50+0900",
            "result": "FAIL",
            "resultMessage": "scanner finished with error",
            "elapsedTime": 5,
            "createTime": "2025-03-19T08:50:51+0900"
        },
        {
            "scannerId": 9**,
            "catalogId": 4**,
            "beginTime": "2025-03-19T08:49:36+0900",
            "endTime": "2025-03-19T08:49:41+0900",
            "result": "FAIL",
            "resultMessage": "scanner finished with error",
            "elapsedTime": 5,
            "createTime": "2025-03-19T08:49:42+0900"
        },
        {
            "scannerId": 9**,
            "catalogId": 4**,
            "beginTime": "2025-03-19T08:43:44+0900",
            "endTime": "2025-03-19T08:43:50+0900",
            "result": "SUCCESS",
            "tableChanges": "{\"table_added\": {\"count\": 1, \"list\": [\"library_books_csv\"]}, \"table_updated\": {\"count\": 0, \"list\": []}, \"table_failed\": {\"count\": 0, \"list\": []}, \"partition_added\": {\"count\": 0, \"list\": []}, \"partition_updated\": {\"count\": 0, \"list\": []}, \"partition_failed\": {\"count\": 0, \"list\": []}}",
            "elapsedTime": 6,
            "createTime": "2025-03-19T08:43:50+0900"
        }
    ]
}