DB Connection確認

Prev Next

ドメインに対しデータベースアップロード機能を実行する前に、接続を確認します。

POST https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/db_upload/check_connection

リクエスト

リクエストボディ

パラメータ名 必須有無 タイプ 制約事項 説明
dbKind Yes String mysql, mariadb データベースの種類
host Yes String データベースのIP
port Yes Integer データベースのポート
user Yes String ユーザーID
password Yes String パスワード
db Yes String データベース名
charset Yes String データベースのキャラクターセット
connectTimeout Yes Int 接続タイムアウト、単位は秒

レスポンス

レスポンスStatus

HTTP Status Desc
200 OK(照会完了)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

リクエスト例

POST /CloudSearch/real/v1/db_upload/check_connection
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": "2.2.2.2",
    "port": 3306,
    "user": "root",
    "password": "alskdj",
    "db": "cloud_search",
    "charset": "utf8",
    "connectTimeout": 4,
}

レスポンス例

{"result":"ok"}