Import a table list by accessing the user's DB.
POST https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/db_upload/table/vpc
Request
Request parameters
Parameter name |
Requirement status |
Type |
Restrictions |
Explanation |
region |
Yes |
string |
region code |
The region code where the DB server is located |
Request body
Parameter name |
Requirement status |
Type |
Restrictions |
Explanation |
dbKind |
Yes |
String |
mysql, mariadb |
DB type |
host |
Yes |
String |
|
DB Instance ID |
port |
Yes |
Integer |
|
DB port |
user |
Yes |
String |
|
User ID |
password |
Yes |
String |
|
Password |
db |
Yes |
String |
|
Database base name |
charset |
Yes |
String |
|
DB character set |
connectTimeout |
Yes |
Int |
|
Connection timeout (Unit: second) |
Response
Response statuses
HTTP status |
Desc |
200 |
OK (Successfully searched) |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Response body
List
Example
Request example
POST /CloudSearch/real/v1/db_upload/table/vpc
Host: cloudsearch.apigw.ntruss.com
accept:application/json
x-ncp-apigw-signature-v2: cDwtHuQeGmwWyNmwlN6XIGA66zge4iMXvfoDQNna05g=
x-ncp-apigw-timestamp: 1545817618751
x-ncp-iam-access-key: teGTwtcSEGA7fu28BGGi
{
"dbKind": "mysql",
"host": "1111223",
"port": 3306,
"user": "root",
"password": "alskdj",
"db": "cloud_search",
"charset": "utf8",
"connectTimeout": 4,
}
Response example
["test_database", "dev_database"]