数据源API

DataSourceAdminRestfulApi 类

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

请求方式:GET

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

响应数据类型:application/json

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

请求参数:

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

响应参数:

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

响应示例:

  1. {
  2. "method": "/api/data-source-manager/env",
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "queryList": [
  7. {
  8. "id": 2,
  9. "envName": "测试环境UAT",
  10. "envDesc": "测试环境UAT",
  11. "dataSourceTypeId": 4,
  12. "connectParams": {
  13. "hadoopConf": {
  14. "hive.metastore.execute.setugi": "true"
  15. },
  16. "uris": "thrift://localhost:9083"
  17. },
  18. "createTime": 1647249913000,
  19. "modifyTime": 1647249913000
  20. },
  21. {
  22. "id": 3,
  23. "envName": "开源测试环境",
  24. "envDesc": "开源测试环境",
  25. "dataSourceTypeId": 4,
  26. "connectParams": {
  27. "keytab": "4dd408ad-a2f9-4501-83b3-139290977ca2",
  28. "uris": "thrift://bdpclustername:9083",
  29. "principle": "hadoop@WEBANK.COM"
  30. },
  31. "createTime": 1647249913000,
  32. "modifyTime": 1647249913000
  33. }
  34. ]
  35. }
  36. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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类

接口地址:/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

响应数据类型:application/json

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

请求参数:

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

响应参数:

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

响应示例:

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

接口地址:/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. "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

响应参数:

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

响应示例:

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

接口地址:/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. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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. "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. }

接口地址:/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)

响应示例:

  1. {
  2. "method": "/api/data-source-manager/key-define/type/4",
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "keyDefine": [
  7. {
  8. "id": 6,
  9. "key": "envId",
  10. "description": "集群环境",
  11. "name": "集群环境",
  12. "valueType": "SELECT",
  13. "require": true,
  14. "dataSource": "/data-source-manager/env-list/all/type/4"
  15. },
  16. {
  17. "id": 7,
  18. "key": "keyTabFile",
  19. "description": "KeyTab文件",
  20. "name": "keyTab文件",
  21. "valueType": "FILE",
  22. "require": false,
  23. "dataSource": "http://127.0.0.1:9001/api/rest_j/v1/bml/upload"
  24. }
  25. ]
  26. }
  27. }

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

请求方式:GET

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

响应数据类型:application/json

接口描述:

请求参数:

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

响应参数:

参数名称参数说明类型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. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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. }

接口地址:/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类

接口地址:/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. ]
  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

响应参数:

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

响应示例:

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