getTableSchema
- Print
- PDF
getTableSchema
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in VPC
Searches for the schema of a specific table with the database/table name of the user's catalog.
Requests
Request URL
GET {DATA_CATALOG API_URL}/catalogs/{catalog-id}/databases/{database-name}/tables/{table-name}/schema
Request parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
catalogId | Yes | String | Unique catalog ID (ref: getCatalogs) | |
databaseName | Yes | String | Database name | |
tableName | Yes | String | Table name | |
pageNo | No | int | Default of the page number: 1 | |
pageSize | No | int | Maximum: 200 | Default of the result list size: 20 |
Request header
Request examples
curl -X GET "https://datacatalog.apigw.ntruss.com/api/v1/catalogs/{catalog-id}/databases/{database-name}/tables/{table-name}/schema?pageNo=1&pageSize=20" \
-H "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}" \
-H "x-ncp-iam-access-key: {x-ncp-iam-access-key}" \
-H "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}"
Responses
Response bodies
Item | Type | Description |
---|---|---|
schema.name | String | Field name |
schema.type | String | Data type |
schema.description | String | Description |
Response examples
HTTP
HTTP Status | Description |
---|---|
200 | OK |
JSON
{
"pageNo": 1,
"pageSize": 20,
"totalCount": 2,
"requestId": "e69042d1-8b84-4bdc-902f-95b4dd8f0b88",
"schema": [
{
"name": "id",
"type": "int",
"description":"string"
},
{
"name": "test",
"type": "string",
"description":"string"
}
]
}
Was this article helpful?