Map DB table
- Print
- PDF
Map DB table
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
Request
Request body
Parameter name | Requirement status | Type | Restrictions | Explanation |
---|---|---|---|---|
dbKind | Yes | String | mysql, mariadb | DB type |
host | Yes | String | DB IP | |
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
Example
Request example
POST /CloudSearch/real/v1/db_upload/table
Host: cloudsearch.apigw.ntruss.com
accept:application/json
{
"dbKind": "mysql",
"host": "2.2.2.2",
"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"
}
}
Was this article helpful?