应用与数据集成平台 ROMA CONNECT-创建数据源:请求示例

时间:2024-10-30 19:37:41

请求示例

  • 创建一个MySQL数据源,连接模式为默认。
    {
      "datasource_name" : "fdi_ds_y3k674",
      "datasource_type" : "MYSQL",
      "content" : {
        "host" : "**.**.**.**",
        "port" : "3306",
        "database_name" : "testfdi",
        "user_name" : "fditest",
        "password" : "******",
        "mode" : "default"
      },
      "app_id" : "9dbd2cd2-9622-4a1b-ad47-31018cf44cbd",
      "description" : "testtesttest"
    }
  • 创建一个FTP数据源,连接模式为active,协议类型为ftp。
    {
      "datasource_name" : "fdi_ds_v2frp",
      "datasource_type" : "FTP",
      "content" : {
        "ftp_connect_mode" : "active",
        "host" : "**.**.**.**",
        "port" : "21",
        "user_name" : "ftpuser",
        "password" : "******",
        "ftp_protocol" : "ftp"
      },
      "app_id" : "9dbd2cd2-9622-4a1b-ad47-31018cf44cbd",
      "description" : "testtesttest"
    }
  • 创建一个API数据源,API请求方式为GET,认证方式为无认证。
    {
      "datasource_name" : "fdi_ds_api_v2",
      "datasource_type" : "API",
      "content" : {
        "url" : "http%3A%2F%2FVM6_ip%3A1080%2F0928njapi",
        "api_method" : "GET",
        "api_auth_detail" : {
          "auth_method" : "none"
        }
      },
      "description" : "testAPI",
      "app_id" : "9dbd2cd2-9622-4a1b-ad47-31018cf44cbd"
    }
support.huaweicloud.com/api-roma/CreateDatasourceInfo.html