DataSourceAdminRestfulApi

queryDataSourceEnv

Interface address: /api/rest_j/v1/data-source-manager/env

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Query the list of cluster environment information configured by the data source

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
currentPagecurrentPagequeryfalseinteger(int32)
namenamequeryfalsestring
pageSizepageSizequeryfalseinteger(int32)
typeIdtypeIdqueryfalseinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  1. {
  2. "method": "/api/data-source-manager/env",
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "queryList": [
  7. {
  8. "id": 2,
  9. "envName": "Test Environment UAT",
  10. "envDesc": "Test Environment 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": "Open Source Test Environment",
  24. "envDesc": "Open Source Test Environment",
  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. }

getAllEnvListByDataSourceType

Interface address: /api/rest_j/v1/data-source-manager/env-list/all/type/{typeId}

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Query a list of cluster information configured by a data source

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
typeIdtypeIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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": "Test Environment SIT"
  10. },
  11. {
  12. "id": 2,
  13. "envName": "Test Environment UAT"
  14. },
  15. {
  16. "id": 3,
  17. "envName": "Open Source Test Environment"
  18. }
  19. ]
  20. }
  21. }

insertJsonEnv

Interface address: /api/rest_j/v1/data-source-manager/env/json

Request method: POST

Request data type: application/json

Response data type: application/json

Interface description:

Request example:

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

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceEnvdataSourceEnvbodytrueDataSourceEnvDataSourceEnv
  connectParamsfalseobject
  createTimefalsestring(date-time)
  createUserfalsestring
  dataSourceTypefalseDataSourceTypeDataSourceType
    classifierfalsestring
    descriptionfalsestring
    iconfalsestring
    idfalsestring
    layersfalseinteger
    namefalsestring
    optionfalsestring
  dataSourceTypeIdfalseinteger(int64)
  envDescfalsestring
  envNamefalsestring
  idfalseinteger(int64)
  modifyTimefalsestring(date-time)
  modifyUserfalsestring

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

getEnvEntityById

Interface address:/api/rest_j/v1/data-source-manager/env/{envId}

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Query the detailed information of an environment

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
envIdenvIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  1. {
  2. "method": "/api/data-source-manager/env/1",
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "env": {
  7. "id": 1,
  8. "envName": "Test Environment SIT",
  9. "envDesc": "Test Environment 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

Interface address:/api/rest_j/v1/data-source-manager/env/{envId}

Request method: DELETE

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
envIdenvIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

updateJsonEnv Interface address: /api/rest_j/v1/data-source-manager/env/{envId}/json

Request method: PUT

Request data type: application/json

Response data type: application/json

Interface description:

Request example:

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

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
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)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

DataSourceCoreRestfulApi

queryDataSource

Interface address:/api/rest_j/v1/data-source-manager/info

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Query the specific information of the data source

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
currentPagecurrentPagequeryfalseinteger(int32)
identifiesidentifiesqueryfalsestring
namenamequeryfalsestring
pageSizepageSizequeryfalseinteger(int32)
systemsystemqueryfalsestring
typeIdtypeIdqueryfalseinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

removeDataSource

Interface address:/api/rest_j/v1/data-source-manager/info/delete/{dataSourceId}

Request method: DELETE

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: delete a data source data

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

insertJsonInfo

Interface address:/api/rest_j/v1/data-source-manager/info/json

Request method: POST

Request data type: application/json

Response data type: application/json

Interface description:

Request example:

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

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
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

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

getInfoByDataSourceName

Interface address: /api/rest_j/v1/data-source-manager/info/name/{dataSourceName}

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Query data source information through datsourceName

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceNamedataSourceNamepathtruestring

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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

Interface address:/api/rest_j/v1/data-source-manager/info/{dataSourceId}

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  1. {
  2. "method": "/api/data-source-manager/info/1",
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "info": {
  7. "id": 1,
  8. "dataSourceName": "Open source co-construction environment",
  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

Interface address: /api/rest_j/v1/data-source-manager/info/{dataSourceId}/expire

Request method: PUT

Request data type: application/json

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

updateDataSourceInJson Interface address: /api/rest_j/v1/data-source-manager/info/{dataSourceId}/json

Request method: PUT

Request data type: application/json

Response data type: application/json

Interface description:

Request example:

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

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
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)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

getInfoByDataSourceIdAndVersion

Interface address: /api/rest_j/v1/data-source-manager/info/{dataSourceId}/{version}

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)
versionversionpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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": "Open source co-construction environment",
  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. }

getKeyDefinitionsByType

Interface address:/api/rest_j/v1/data-source-manager/key-define/type/{typeId}

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
typeIdtypeIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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": "Cluster Environment",
  11. "name": "Cluster Environment",
  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 file",
  20. "name": "keyTab file",
  21. "valueType": "FILE",
  22. "require": false,
  23. "dataSource": "http://172.22.32.6:9001/api/rest_j/v1/bml/upload"
  24. }
  25. ]
  26. }
  27. }

getConnectParams

Interface address: /api/rest_j/v1/data-source-manager/name/{dataSourceName}/connect-params

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceNamedataSourceNamepathtruestring

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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

Interface address:/api/rest_j/v1/data-source-manager/parameter/{dataSourceId}/json

Request method: POST

Request data type: application/json

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)
paramsparamsbodytrueobject

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

publishByDataSourceId

Interface address: /api/rest_j/v1/data-source-manager/publish/{dataSourceId}/{versionId}

Request method: POST

Request data type: application/json

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)
versionIdversionIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

getAllDataSourceTypes

Interface address:/api/rest_j/v1/data-source-manager/type/all

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters: No Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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 database",
  11. "option": "mysql database",
  12. "classifier": "Relational Database",
  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 database",
  20. "option": "hive",
  21. "classifier": "Big Data Storage",
  22. "layers": 3
  23. }
  24. ]
  25. }
  26. }

getConnectParams

Interface address:/api/rest_j/v1/data-source-manager/{dataSourceId}/connect-params

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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

Interface address: /api/rest_j/v1/data-source-manager/{dataSourceId}/versions

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

  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": "Initialization Version",
  18. "createUser": "hadoop"
  19. }
  20. ]
  21. }
  22. }

connectDataSource

Interface address: /api/rest_j/v1/data-source-manager/{dataSourceId}/{version}/op/connect

Request method: PUT

Request data type: application/json

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
dataSourceIddataSourceIdpathtrueinteger(int64)
versionversionpathtrueinteger(int64)

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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

data-source-operate-restful-api

connect

Interface address:/api/rest_j/v1/data-source-manager/op/connect/json

Request method: POST

Request data type: application/json

Response data type: application/json

Interface description:

Request example:

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

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
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

Response parameters:

parameter nameparameter descriptiontypeschema
dataobject
messagestring
methodstring
statusinteger(int32)integer(int32)

Sample Response:

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