The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Available in VPC
Get the list of tables in a database.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| GET | /api/v1/catalogs/{catalogId}/databases/{databaseName}/tables |
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
|
databaseName |
String | Required | Database name
|
Request query parameters
You can use the following query parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
pageNo |
Integer | Optional | Page number
|
pageSize |
Integer | Optional | Page output count
|
Request example
The request example is as follows:
curl --location --request GET 'https://datacatalog.apigw.ntruss.com/api/v1/catalogs/4**/databases/my_database/tables?pageNo=1&pageSize=20' \
--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 |
requestId |
String | - | ID for the request
|
tableResponseList |
Array | - | Table list: tableResponseList |
tableResponseList
The following describes tableResponseList.
| Field | Type | Required | Description |
|---|---|---|---|
catalogId |
Integer | - | Catalog ID |
tableName |
String | - | Table name |
databaseName |
String | - | Database name |
location |
String | - | Table location |
tableFormat |
String | - | Table format
|
dataFormat |
String | - | Data format |
createTime |
String | - | Table creation date and time
|
updateTime |
String | - | Update date and time
|
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": 2,
"requestId": "570aad8d-****-****-****-898f3c1bd0d6",
"tableResponseList": [
{
"catalogId": 4**,
"tableName": "employeelist",
"databaseName": "my_database",
"location": "s3a://datacatalog-c***-e******f/my_database/employeeList",
"dataFormat": "csv",
"tableFormat":"EXTERNAL_TABLE",
"createTime": "2025-03-18T09:31:32+0900",
"updateTime": "2025-03-18T09:52:11+0900"
},
{
"catalogId": 4**,
"tableName": "db_metadata_json",
"databaseName": "my_database",
"location": "s3a://datacatalog-c***-e******f/db_metadata.json",
"dataFormat": "json",
"tableFormat":"EXTERNAL_TABLE",
"createTime": "2025-03-17T16:30:43+0900",
"updateTime": "2025-03-18T10:12:18+0900"
}
]
}