DB Tableマッピング
    • PDF

    DB Tableマッピング

    • PDF

    Article Summary

    userのdbにアクセスしてtable情報を取得した後、cloud searchのschemaに合わせてマッピングして返します。

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

    リクエスト

    リクエストボディ

    パラメータ名必須有無タイプ制約事項説明
    dbKindYesStringmysql, mariadbデータベースの種類
    hostYesStringデータベースのIP
    portYesIntegerデータベースのポート
    userYesStringユーザーID
    passwordYesStringパスワード
    dbYesStringデータベース名
    charsetYesStringデータベースのキャラクターセット
    tableYesStringデータベースのテーブル
    connectTimeoutYesInt接続タイムアウト、単位は秒

    レスポンス

    レスポンスStatus

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

    응답 body

    Schema

    リクエスト例

    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"
    }
    

    レスポンス例

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

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.