Map DB table (VPC)

Prev Next

After accessing the user's DB and importing the table information, map according to the schema of Cloud Search, and then return.

POST https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/db_upload/mapping/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
table Yes String DB table
connectTimeout Yes Int Connection timeout (Unit: second)

Response

Response Status###

HTTP status Desc
200 OK (Successfully searched)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Response body

Schema

Example

Request example

POST /CloudSearch/real/v1/db_upload/table/vpc
Host: cloudsearch.apigw.ntruss.com
accept:application/json
{
  "dbKind": "mysql",
  "host": "111112233",
  "port": 23306,
  "user": "root",
  "password": "Cloudsearch,
  "db": "test_db",
  "charset": "utf8",
  "connectTimeout": 30,
  "table": "test_data"
}

Response example

{
  "document": {
    "sections": [
      {
        "name": "tid"
      },
      {
        "name": "first_name"
      },
      {
        "name": "last_name"
      },
      {
        "name": "gender"
      },
      {
        "name": "ip_address"
      },
      {
        "name": "index_type"
      }
    ],
    "indexes": [],
    "primarySectionName": "tid"
  }
}