- 数据源API
- queryDataSourceEnv
- getAllEnvListByDataSourceType
- insertJsonEnv
- getEnvEntityById
- removeEnvEntity
- updateJsonEnv
- queryDataSource
- removeDataSource
- insertJsonInfo
- getInfoByDataSourceName
- getInfoByDataSourceId
- expireDataSource
- updateDataSourceInJson
- getInfoByDataSourceIdAndVersion
- getKeyDefinitionsByType
- getConnectParams
- insertJsonParameter
- publishByDataSourceId
- getAllDataSourceTypes
- getConnectParams
- getVersionList
- connectDataSource
- connect
数据源API
DataSourceAdminRestfulApi 类
queryDataSourceEnv
接口地址:/api/rest_j/v1/data-source-manager/env
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:application/json
接口描述: 查询数据源配置的集群环境信息列表
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| currentPage | currentPage | query | false | integer(int32) | |
| name | name | query | false | string | |
| pageSize | pageSize | query | false | integer(int32) | |
| typeId | typeId | query | false | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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. }
getAllEnvListByDataSourceType
接口地址:/api/rest_j/v1/data-source-manager/env-list/all/type/{typeId}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:application/json
接口描述: 查询某种数据源配置的集群信息列表
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| typeId | typeId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceEnv | dataSourceEnv | body | true | DataSourceEnv | DataSourceEnv |
| connectParams | false | object | |||
| createTime | false | string(date-time) | |||
| createUser | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer(int64) | |||
| envDesc | false | string | |||
| envName | false | string | |||
| id | false | integer(int64) | |||
| modifyTime | false | string(date-time) | |||
| modifyUser | false | string |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| envId | envId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| envId | envId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceEnv | dataSourceEnv | body | true | DataSourceEnv | DataSourceEnv |
| connectParams | false | object | |||
| createTime | false | string(date-time) | |||
| createUser | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer(int64) | |||
| envDesc | false | string | |||
| envName | false | string | |||
| id | false | integer(int64) | |||
| modifyTime | false | string(date-time) | |||
| modifyUser | false | string | |||
| envId | envId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| currentPage | currentPage | query | false | integer(int32) | |
| identifies | identifies | query | false | string | |
| name | name | query | false | string | |
| pageSize | pageSize | query | false | integer(int32) | |
| system | system | query | false | string | |
| typeId | typeId | query | false | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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. }
43. ]
44. }
45. }
removeDataSource
接口地址:/api/rest_j/v1/data-source-manager/info/delete/{dataSourceId}
请求方式:DELETE
请求数据类型:application/x-www-form-urlencoded
响应数据类型:application/json
接口描述:删除某条数据源数据
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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. }
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. "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 |
|---|---|---|---|---|---|
| dataSource | dataSource | body | true | DataSource | DataSource |
| connectParams | false | object | |||
| createIdentify | false | string | |||
| createSystem | false | string | |||
| createTime | false | string(date-time) | |||
| createUser | false | string | |||
| dataSourceDesc | false | string | |||
| dataSourceEnv | false | DataSourceEnv | DataSourceEnv | ||
| connectParams | false | object | |||
| createTime | false | string | |||
| createUser | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer | |||
| envDesc | false | string | |||
| envName | false | string | |||
| id | false | integer | |||
| modifyTime | false | string | |||
| modifyUser | false | string | |||
| dataSourceEnvId | false | integer(int64) | |||
| dataSourceName | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer(int64) | |||
| expire | false | boolean | |||
| id | false | integer(int64) | |||
| labels | false | string | |||
| modifyTime | false | string(date-time) | |||
| modifyUser | false | string | |||
| publishedVersionId | false | integer(int64) | |||
| versionId | false | integer(int64) | |||
| versions | false | array | DatasourceVersion | ||
| comment | false | string | |||
| connectParams | false | object | |||
| createTime | false | string | |||
| createUser | false | string | |||
| datasourceId | false | integer | |||
| parameter | false | string | |||
| versionId | false | integer |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceName | dataSourceName | path | true | string |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSource | dataSource | body | true | DataSource | DataSource |
| connectParams | false | object | |||
| createIdentify | false | string | |||
| createSystem | false | string | |||
| createTime | false | string(date-time) | |||
| createUser | false | string | |||
| dataSourceDesc | false | string | |||
| dataSourceEnv | false | DataSourceEnv | DataSourceEnv | ||
| connectParams | false | object | |||
| createTime | false | string | |||
| createUser | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer | |||
| envDesc | false | string | |||
| envName | false | string | |||
| id | false | integer | |||
| modifyTime | false | string | |||
| modifyUser | false | string | |||
| dataSourceEnvId | false | integer(int64) | |||
| dataSourceName | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer(int64) | |||
| expire | false | boolean | |||
| id | false | integer(int64) | |||
| labels | false | string | |||
| modifyTime | false | string(date-time) | |||
| modifyUser | false | string | |||
| publishedVersionId | false | integer(int64) | |||
| versionId | false | integer(int64) | |||
| versions | false | array | DatasourceVersion | ||
| comment | false | string | |||
| connectParams | false | object | |||
| createTime | false | string | |||
| createUser | false | string | |||
| datasourceId | false | integer | |||
| parameter | false | string | |||
| versionId | false | integer | |||
| dataSourceId | dataSourceId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) | |
| version | version | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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. }
getKeyDefinitionsByType
接口地址:/api/rest_j/v1/data-source-manager/key-define/type/{typeId}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:application/json
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| typeId | typeId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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://172.22.32.6:9001/api/rest_j/v1/bml/upload"
24. }
25. ]
26. }
27. }
getConnectParams
接口地址:/api/rest_j/v1/data-source-manager/name/{dataSourceName}/connect-params
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:application/json
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| dataSourceName | dataSourceName | path | true | string |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) | |
| params | params | body | true | object |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) | |
| versionId | versionId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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. },
17. {
18. "id": "4",
19. "name": "hive",
20. "description": "hive数据库",
21. "option": "hive",
22. "classifier": "大数据存储",
23. "layers": 3
24. }
26. ]
27. }
28. }
getConnectParams
接口地址:/api/rest_j/v1/data-source-manager/{dataSourceId}/connect-params
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:application/json
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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 |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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. }
connectDataSource
接口地址:/api/rest_j/v1/data-source-manager/{dataSourceId}/{version}/op/connect
请求方式:PUT
请求数据类型:application/json
响应数据类型:application/json
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| dataSourceId | dataSourceId | path | true | integer(int64) | |
| version | version | path | true | integer(int64) |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(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. ]
58. }
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| dataSource | dataSource | body | true | DataSource | DataSource |
| connectParams | false | object | |||
| createIdentify | false | string | |||
| createSystem | false | string | |||
| createTime | false | string(date-time) | |||
| createUser | false | string | |||
| dataSourceDesc | false | string | |||
| dataSourceEnv | false | DataSourceEnv | DataSourceEnv | ||
| connectParams | false | object | |||
| createTime | false | string | |||
| createUser | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer | |||
| envDesc | false | string | |||
| envName | false | string | |||
| id | false | integer | |||
| modifyTime | false | string | |||
| modifyUser | false | string | |||
| dataSourceEnvId | false | integer(int64) | |||
| dataSourceName | false | string | |||
| dataSourceType | false | DataSourceType | DataSourceType | ||
| classifier | false | string | |||
| description | false | string | |||
| icon | false | string | |||
| id | false | string | |||
| layers | false | integer | |||
| name | false | string | |||
| option | false | string | |||
| dataSourceTypeId | false | integer(int64) | |||
| expire | false | boolean | |||
| id | false | integer(int64) | |||
| labels | false | string | |||
| modifyTime | false | string(date-time) | |||
| modifyUser | false | string | |||
| publishedVersionId | false | integer(int64) | |||
| versionId | false | integer(int64) | |||
| versions | false | array | DatasourceVersion | ||
| comment | false | string | |||
| connectParams | false | object | |||
| createTime | false | string | |||
| createUser | false | string | |||
| datasourceId | false | integer | |||
| parameter | false | string | |||
| versionId | false | integer |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| data | object | ||
| message | string | ||
| method | string | ||
| status | integer(int32) | integer(int32) |
响应示例:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
