数据源API

    接口地址:

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述: 查询数据源配置的集群环境信息列表

    请求参数:

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    getAllEnvListByDataSourceType

    接口地址:/api/rest_j/v1/data-source-manager/env-list/all/type/{typeId}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述: 查询某种数据源配置的集群信息列表

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    typeIdtypeIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/env-list/all/type/4",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "envList": [
    7. {
    8. "id": 1,
    9. "envName": "测试环境SIT"
    10. },
    11. {
    12. "id": 2,
    13. "envName": "测试环境UAT"
    14. },
    15. {
    16. "id": 3,
    17. "envName": "开源测试环境"
    18. }
    19. ]
    20. }
    21. }

    insertJsonEnv

    接口地址:/api/rest_j/v1/data-source-manager/env/json

    请求方式:POST

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求示例:

    1. {
    2. "connectParams": {},
    3. "createTime": "",
    4. "createUser": "",
    5. "dataSourceType": {
    6. "classifier": "",
    7. "description": "",
    8. "icon": "",
    9. "id": "",
    10. "layers": 0,
    11. "name": "",
    12. "option": ""
    13. },
    14. "dataSourceTypeId": 0,
    15. "envDesc": "",
    16. "envName": "",
    17. "id": 0,
    18. "modifyTime": "",
    19. "modifyUser": ""
    20. }

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceEnvdataSourceEnvbodytrueDataSourceEnvDataSourceEnv
      connectParamsfalseobject
      createTimefalsestring(date-time)
      createUserfalsestring
      dataSourceTypefalseDataSourceTypeDataSourceType
        classifierfalsestring
        descriptionfalsestring
        iconfalsestring
        idfalsestring
        layersfalseinteger
        namefalsestring
        optionfalsestring
      dataSourceTypeIdfalseinteger(int64)
      envDescfalsestring
      envNamefalsestring
      idfalseinteger(int64)
      modifyTimefalsestring(date-time)
      modifyUserfalsestring

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "data": {},
    3. "message": "",
    4. "method": "",
    5. "status": 0
    6. }

    getEnvEntityById

    接口地址:/api/rest_j/v1/data-source-manager/env/{envId}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:查询某环境详细信息

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    envIdenvIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/env/1",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "env": {
    7. "id": 1,
    8. "envName": "测试环境SIT",
    9. "envDesc": "测试环境SIT",
    10. "connectParams": {
    11. "hadoopConf": {
    12. "hive.metastore.execute.setugi": "true"
    13. },
    14. "uris": "thrift://localhost:9083"
    15. },
    16. "createTime": 1647249913000,
    17. "modifyTime": 1647249913000
    18. }
    19. }
    20. }

    removeEnvEntity

    接口地址:/api/rest_j/v1/data-source-manager/env/{envId}

    请求方式:DELETE

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    envIdenvIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "data": {},
    3. "message": "",
    4. "method": "",
    5. "status": 0
    6. }

    updateJsonEnv

    接口地址:/api/rest_j/v1/data-source-manager/env/{envId}/json

    请求方式:PUT

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求示例:

    1. {
    2. "connectParams": {},
    3. "createTime": "",
    4. "createUser": "",
    5. "dataSourceType": {
    6. "classifier": "",
    7. "description": "",
    8. "icon": "",
    9. "id": "",
    10. "layers": 0,
    11. "name": "",
    12. "option": ""
    13. },
    14. "dataSourceTypeId": 0,
    15. "envDesc": "",
    16. "envName": "",
    17. "id": 0,
    18. "modifyTime": "",
    19. "modifyUser": ""
    20. }

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceEnvdataSourceEnvbodytrueDataSourceEnvDataSourceEnv
      connectParamsfalseobject
      createTimefalsestring(date-time)
      createUserfalsestring
      dataSourceTypefalseDataSourceTypeDataSourceType
        classifierfalsestring
        descriptionfalsestring
        iconfalsestring
        idfalsestring
        layersfalseinteger
        namefalsestring
        optionfalsestring
      dataSourceTypeIdfalseinteger(int64)
      envDescfalsestring
      envNamefalsestring
      idfalseinteger(int64)
      modifyTimefalsestring(date-time)
      modifyUserfalsestring
    envIdenvIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "data": {},
    3. "message": "",
    4. "method": "",
    5. "status": 0
    6. }

    DataSourceCoreRestfulApi类

    queryDataSource

    接口地址:/api/rest_j/v1/data-source-manager/info

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:查询数据源具体信息

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    currentPagecurrentPagequeryfalseinteger(int32)
    identifiesidentifiesqueryfalsestring
    namenamequeryfalsestring
    pageSizepageSizequeryfalseinteger(int32)
    systemsystemqueryfalsestring
    typeIdtypeIdqueryfalseinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/info",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "totalPage": 12,
    7. "queryList": [
    8. {
    9. "id": 11,
    10. "dataSourceName": "test1256",
    11. "dataSourceTypeId": 4,
    12. "createSystem": "Linkis",
    13. "createTime": 1647909291000,
    14. "createUser": "hadoop",
    15. "versionId": 1,
    16. "expire": false,
    17. "dataSourceType": {
    18. "id": "11",
    19. "name": "hive",
    20. "layers": 0
    21. }
    22. },
    23. {
    24. "id": 10,
    25. "dataSourceName": "hive-test",
    26. "dataSourceDesc": "hive test",
    27. "dataSourceTypeId": 4,
    28. "createSystem": "Linkis",
    29. "createTime": 1647862455000,
    30. "modifyTime": 1647930476000,
    31. "modifyUser": "hadoop",
    32. "createUser": "hadoop",
    33. "versionId": 3,
    34. "publishedVersionId": 1,
    35. "expire": false,
    36. "dataSourceType": {
    37. "id": "10",
    38. "name": "hive",
    39. "layers": 0
    40. }
    41. }
    42. ]
    43. }
    44. }

    接口地址:/api/rest_j/v1/data-source-manager/info/delete/{dataSourceId}

    请求方式:DELETE

    请求数据类型:application/x-www-form-urlencoded

    接口描述:删除某条数据源数据

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)

    响应参数:

    响应示例:

    insertJsonInfo

    接口地址:/api/rest_j/v1/data-source-manager/info/json

    请求方式:POST

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求示例:

    1. {
    2. "connectParams": {},
    3. "createIdentify": "",
    4. "createSystem": "",
    5. "createTime": "",
    6. "createUser": "",
    7. "dataSourceDesc": "",
    8. "dataSourceEnv": {
    9. "connectParams": {},
    10. "createTime": "",
    11. "createUser": "",
    12. "dataSourceType": {
    13. "classifier": "",
    14. "description": "",
    15. "icon": "",
    16. "layers": 0,
    17. "name": "",
    18. "option": ""
    19. },
    20. "dataSourceTypeId": 0,
    21. "envDesc": "",
    22. "envName": "",
    23. "id": 0,
    24. "modifyTime": "",
    25. "modifyUser": ""
    26. "dataSourceEnvId": 0,
    27. "dataSourceName": "",
    28. "dataSourceType": {
    29. "classifier": "",
    30. "description": "",
    31. "icon": "",
    32. "id": "",
    33. "layers": 0,
    34. "name": "",
    35. "option": ""
    36. },
    37. "dataSourceTypeId": 0,
    38. "expire": true,
    39. "id": 0,
    40. "labels": "",
    41. "modifyTime": "",
    42. "modifyUser": "",
    43. "publishedVersionId": 0,
    44. "versionId": 0,
    45. "versions": [
    46. {
    47. "comment": "",
    48. "connectParams": {},
    49. "createTime": "",
    50. "createUser": "",
    51. "datasourceId": 0,
    52. "parameter": "",
    53. "versionId": 0
    54. }
    55. ]
    56. }

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourcedataSourcebodytrueDataSourceDataSource
      connectParamsfalseobject
      createIdentifyfalsestring
      createSystemfalsestring
      createTimefalsestring(date-time)
      createUserfalsestring
      dataSourceDescfalsestring
      dataSourceEnvfalseDataSourceEnvDataSourceEnv
        connectParamsfalseobject
        createTimefalsestring
        createUserfalsestring
        dataSourceTypefalseDataSourceTypeDataSourceType
          classifierfalsestring
          descriptionfalsestring
          iconfalsestring
          idfalsestring
          layersfalseinteger
          namefalsestring
          optionfalsestring
        dataSourceTypeIdfalseinteger
        envDescfalsestring
        envNamefalsestring
        idfalseinteger
        modifyTimefalsestring
        modifyUserfalsestring
      dataSourceEnvIdfalseinteger(int64)
      dataSourceNamefalsestring
      dataSourceTypefalseDataSourceTypeDataSourceType
        classifierfalsestring
        descriptionfalsestring
        iconfalsestring
        idfalsestring
        layersfalseinteger
        namefalsestring
        optionfalsestring
      dataSourceTypeIdfalseinteger(int64)
      expirefalseboolean
      idfalseinteger(int64)
      labelsfalsestring
      modifyTimefalsestring(date-time)
      modifyUserfalsestring
      publishedVersionIdfalseinteger(int64)
      versionIdfalseinteger(int64)
      versionsfalsearrayDatasourceVersion
        commentfalsestring
        connectParamsfalseobject
        createTimefalsestring
        createUserfalsestring
        datasourceIdfalseinteger
        parameterfalsestring
        versionIdfalseinteger

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "data": {},
    3. "message": "",
    4. "method": "",
    5. "status": 0
    6. }

    getInfoByDataSourceName

    接口地址:/api/rest_j/v1/data-source-manager/info/name/{dataSourceName}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:通过datsourceName查询数据源信息

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceNamedataSourceNamepathtruestring

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/info/name/hive-test",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "info": {
    7. "id": 10,
    8. "dataSourceName": "hive-test",
    9. "dataSourceDesc": "hive test",
    10. "dataSourceTypeId": 4,
    11. "createSystem": "Linkis",
    12. "connectParams": {
    13. "envId": "3"
    14. },
    15. "createTime": 1647862455000,
    16. "modifyTime": 1647930476000,
    17. "modifyUser": "hadoop",
    18. "createUser": "hadoop",
    19. "versionId": 3,
    20. "publishedVersionId": 1,
    21. "expire": false,
    22. "dataSourceType": {
    23. "name": "hive",
    24. "layers": 0
    25. }
    26. }
    27. }
    28. }

    getInfoByDataSourceId

    接口地址:/api/rest_j/v1/data-source-manager/info/{dataSourceId}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/info/1",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "info": {
    7. "id": 1,
    8. "dataSourceName": "开源共建环境",
    9. "dataSourceDesc": "123",
    10. "dataSourceTypeId": 1,
    11. "createSystem": "Linkis",
    12. "connectParams": {
    13. "host": "127.0.0.1",
    14. "password": "xxxxx",
    15. "port": "9600",
    16. "username": "linkis"
    17. },
    18. "createTime": 1647258360000,
    19. "modifyTime": 1647437692000,
    20. "modifyUser": "hadoop",
    21. "createUser": "hadoop",
    22. "versionId": 1,
    23. "publishedVersionId": 1,
    24. "expire": false,
    25. "dataSourceType": {
    26. "name": "mysql",
    27. "icon": "https://uat.dongcha.weoa.com/static/img/logo.770c1525.png",
    28. "layers": 0
    29. }
    30. }
    31. }
    32. }

    expireDataSource

    接口地址:/api/rest_j/v1/data-source-manager/info/{dataSourceId}/expire

    请求方式:PUT

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/info/1/expire",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "expireId": 1
    7. }
    8. }

    updateDataSourceInJson

    接口地址:/api/rest_j/v1/data-source-manager/info/{dataSourceId}/json

    请求方式:PUT

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求示例:

    1. {
    2. "connectParams": {},
    3. "createIdentify": "",
    4. "createSystem": "",
    5. "createTime": "",
    6. "createUser": "",
    7. "dataSourceDesc": "",
    8. "dataSourceEnv": {
    9. "connectParams": {},
    10. "createTime": "",
    11. "createUser": "",
    12. "dataSourceType": {
    13. "classifier": "",
    14. "description": "",
    15. "icon": "",
    16. "id": "",
    17. "layers": 0,
    18. "name": "",
    19. "option": ""
    20. },
    21. "dataSourceTypeId": 0,
    22. "envDesc": "",
    23. "envName": "",
    24. "id": 0,
    25. "modifyTime": "",
    26. "modifyUser": ""
    27. },
    28. "dataSourceEnvId": 0,
    29. "dataSourceName": "",
    30. "dataSourceType": {
    31. "classifier": "",
    32. "description": "",
    33. "icon": "",
    34. "id": "",
    35. "layers": 0,
    36. "name": "",
    37. "option": ""
    38. },
    39. "dataSourceTypeId": 0,
    40. "expire": true,
    41. "id": 0,
    42. "labels": "",
    43. "modifyTime": "",
    44. "modifyUser": "",
    45. "publishedVersionId": 0,
    46. "versionId": 0,
    47. "versions": [
    48. {
    49. "comment": "",
    50. "connectParams": {},
    51. "createTime": "",
    52. "createUser": "",
    53. "datasourceId": 0,
    54. "parameter": "",
    55. "versionId": 0
    56. }
    57. ]
    58. }

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourcedataSourcebodytrueDataSourceDataSource
      connectParamsfalseobject
      createIdentifyfalsestring
      createSystemfalsestring
      createTimefalsestring(date-time)
      createUserfalsestring
      dataSourceDescfalsestring
      dataSourceEnvfalseDataSourceEnvDataSourceEnv
        connectParamsfalseobject
        createTimefalsestring
        createUserfalsestring
        dataSourceTypefalseDataSourceTypeDataSourceType
          classifierfalsestring
          descriptionfalsestring
          iconfalsestring
          idfalsestring
          layersfalseinteger
          namefalsestring
          optionfalsestring
        dataSourceTypeIdfalseinteger
        envDescfalsestring
        envNamefalsestring
        idfalseinteger
        modifyTimefalsestring
        modifyUserfalsestring
      dataSourceEnvIdfalseinteger(int64)
      dataSourceNamefalsestring
      dataSourceTypefalseDataSourceTypeDataSourceType
        classifierfalsestring
        descriptionfalsestring
        iconfalsestring
        idfalsestring
        layersfalseinteger
        namefalsestring
        optionfalsestring
      dataSourceTypeIdfalseinteger(int64)
      expirefalseboolean
      idfalseinteger(int64)
      labelsfalsestring
      modifyTimefalsestring(date-time)
      modifyUserfalsestring
      publishedVersionIdfalseinteger(int64)
      versionIdfalseinteger(int64)
      versionsfalsearrayDatasourceVersion
        commentfalsestring
        connectParamsfalseobject
        createTimefalsestring
        createUserfalsestring
        datasourceIdfalseinteger
        parameterfalsestring
        versionIdfalseinteger
    dataSourceIddataSourceIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "data": {},
    3. "message": "",
    4. "method": "",
    5. "status": 0
    6. }

    getInfoByDataSourceIdAndVersion

    接口地址:/api/rest_j/v1/data-source-manager/info/{dataSourceId}/{version}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)
    versionversionpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/info/1/1",
    3. "message": "OK",
    4. "data": {
    5. "info": {
    6. "id": 1,
    7. "dataSourceName": "开源共建环境",
    8. "dataSourceDesc": "123",
    9. "dataSourceTypeId": 1,
    10. "createSystem": "Linkis",
    11. "connectParams": {
    12. "host": "127.0.0.1",
    13. "password": "xxxxx",
    14. "port": "9600",
    15. "username": "linkis"
    16. "createTime": 1647258360000,
    17. "modifyTime": 1647437692000,
    18. "modifyUser": "hadoop",
    19. "createUser": "hadoop",
    20. "versionId": 1,
    21. "publishedVersionId": 1,
    22. "expire": false,
    23. "dataSourceType": {
    24. "name": "mysql",
    25. "icon": "https://uat.dongcha.weoa.com/static/img/logo.770c1525.png",
    26. "layers": 0
    27. }
    28. }
    29. }
    30. }

    接口地址:/api/rest_j/v1/data-source-manager/key-define/type/{typeId}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    typeIdtypeIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    getConnectParams

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/name/linkis_test256/connect-params",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "connectParams": {
    7. "host": "127.0.0.1",
    8. "password": "xxxxx",
    9. "port": "9600",
    10. "username": "linkis"
    11. }
    12. }
    13. }

    insertJsonParameter

    接口地址:/api/rest_j/v1/data-source-manager/parameter/{dataSourceId}/json

    请求方式:POST

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)
    paramsparamsbodytrueobject

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "data": {},
    3. "message": "",
    4. "method": "",
    5. "status": 0
    6. }

    publishByDataSourceId

    接口地址:/api/rest_j/v1/data-source-manager/publish/{dataSourceId}/{versionId}

    请求方式:POST

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)
    versionIdversionIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/publish/3/2",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {}
    6. }

    getAllDataSourceTypes

    接口地址:/api/rest_j/v1/data-source-manager/type/all

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数: 暂无 响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/type/all",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "typeList": [
    7. {
    8. "id": "1",
    9. "name": "mysql",
    10. "description": "mysql数据库",
    11. "option": "mysql数据库",
    12. "classifier": "关系型数据库",
    13. "icon": "https://uat.dongcha.weoa.com/static/img/logo.770c1525.png",
    14. "layers": 3
    15. },
    16. {
    17. "id": "4",
    18. "name": "hive",
    19. "description": "hive数据库",
    20. "option": "hive",
    21. "classifier": "大数据存储",
    22. "layers": 3
    23. }
    24. ]
    25. }
    26. }

    getConnectParams

    接口地址:/api/rest_j/v1/data-source-manager/{dataSourceId}/connect-params

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/3/connect-params",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "connectParams": {
    7. "host": "127.0.0.1",
    8. "password": "xxxxx",
    9. "port": "9600",
    10. "username": "linkis"
    11. }
    12. }
    13. }

    getVersionList

    接口地址:/api/rest_j/v1/data-source-manager/{dataSourceId}/versions

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/1/versions",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "versions": [
    7. {
    8. "versionId": 1,
    9. "datasourceId": 1,
    10. "connectParams": {
    11. "host": "127.0.0.1",
    12. "password": "xxxxx",
    13. "port": "9600",
    14. "username": "linkis"
    15. },
    16. "parameter": "{\"host\":\"127.0.0.1\",\"port\":\"9600\",\"username\":\"linkis\",\"password\":\"rO0ABXQACUFiY2RAMjAyMg==\"}",
    17. "comment": "初始化版本",
    18. "createUser": "hadoop"
    19. }
    20. ]
    21. }
    22. }

    接口地址:/api/rest_j/v1/data-source-manager/{dataSourceId}/{version}/op/connect

    请求方式:PUT

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtrueinteger(int64)
    versionversionpathtrueinteger(int64)

    响应参数:

    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例:

    1. {
    2. "method": "/api/data-source-manager/1/1/op/connect",
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "ok": true
    7. }
    8. }

    DataSourceOperateRestfulApi类

    connect

    接口地址:/api/rest_j/v1/data-source-manager/op/connect/json

    请求方式:POST

    请求数据类型:application/json

    响应数据类型:application/json

    接口描述:

    请求示例:

    1. {
    2. "connectParams": {},
    3. "createIdentify": "",
    4. "createSystem": "",
    5. "createTime": "",
    6. "createUser": "",
    7. "dataSourceDesc": "",
    8. "dataSourceEnv": {
    9. "connectParams": {},
    10. "createTime": "",
    11. "createUser": "",
    12. "dataSourceType": {
    13. "classifier": "",
    14. "description": "",
    15. "icon": "",
    16. "id": "",
    17. "layers": 0,
    18. "name": "",
    19. "option": ""
    20. },
    21. "dataSourceTypeId": 0,
    22. "envDesc": "",
    23. "envName": "",
    24. "id": 0,
    25. "modifyTime": "",
    26. "modifyUser": ""
    27. },
    28. "dataSourceEnvId": 0,
    29. "dataSourceName": "",
    30. "dataSourceType": {
    31. "classifier": "",
    32. "description": "",
    33. "icon": "",
    34. "id": "",
    35. "layers": 0,
    36. "name": "",
    37. "option": ""
    38. },
    39. "dataSourceTypeId": 0,
    40. "expire": true,
    41. "id": 0,
    42. "labels": "",
    43. "modifyTime": "",
    44. "modifyUser": "",
    45. "publishedVersionId": 0,
    46. "versionId": 0,
    47. "versions": [
    48. {
    49. "comment": "",
    50. "connectParams": {},
    51. "createTime": "",
    52. "createUser": "",
    53. "datasourceId": 0,
    54. "parameter": "",
    55. "versionId": 0
    56. }
    57. ]

    请求参数:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourcedataSourcebodytrueDataSourceDataSource
      connectParamsfalseobject
      createIdentifyfalsestring
      createSystemfalsestring
      createTimefalsestring(date-time)
      createUserfalsestring
      dataSourceDescfalsestring
      dataSourceEnvfalseDataSourceEnvDataSourceEnv
        connectParamsfalseobject
        createTimefalsestring
        createUserfalsestring
        dataSourceTypefalseDataSourceTypeDataSourceType
          classifierfalsestring
          descriptionfalsestring
          iconfalsestring
          idfalsestring
          layersfalseinteger
          namefalsestring
          optionfalsestring
        dataSourceTypeIdfalseinteger
        envDescfalsestring
        envNamefalsestring
        idfalseinteger
        modifyTimefalsestring
        modifyUserfalsestring
      dataSourceEnvIdfalseinteger(int64)
      dataSourceNamefalsestring
      dataSourceTypefalseDataSourceTypeDataSourceType
        classifierfalsestring
        descriptionfalsestring
        iconfalsestring
        idfalsestring
        layersfalseinteger
        namefalsestring
        optionfalsestring
      dataSourceTypeIdfalseinteger(int64)
      expirefalseboolean
      idfalseinteger(int64)
      labelsfalsestring
      modifyTimefalsestring(date-time)
      modifyUserfalsestring
      publishedVersionIdfalseinteger(int64)
      versionIdfalseinteger(int64)
      versionsfalsearrayDatasourceVersion
        commentfalsestring
        connectParamsfalseobject
        createTimefalsestring
        createUserfalsestring
        datasourceIdfalseinteger
        parameterfalsestring
        versionIdfalseinteger
    参数名称参数说明类型schema
    dataobject
    messagestring
    methodstring
    statusinteger(int32)integer(int32)

    响应示例: