Skip to main content
Version: 1.1.1

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:

{
"method": "/api/data-source-manager/env",
"status": 0,
"message": "OK",
"data": {
"queryList": [
{
"id": 2,
"envName": "Test Environment UAT",
"envDesc": "Test Environment UAT",
"dataSourceTypeId": 4,
"connectParams": {
"hadoopConf": {
"hive.metastore.execute.setugi": "true"
},
"uris": "thrift://localhost:9083"
},
"createTime": 1647249913000,
"modifyTime": 1647249913000
},
{
"id": 3,
"envName": "Open Source Test Environment",
"envDesc": "Open Source Test Environment",
"dataSourceTypeId": 4,
"connectParams": {
"keytab": "4dd408ad-a2f9-4501-83b3-139290977ca2",
"uris": "thrift://bdpclustername:9083",
"principle": "hadoop@WEBANK.COM"
},
"createTime": 1647249913000,
"modifyTime": 1647249913000
}
]
}
}

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:

{
"method": "/api/data-source-manager/env-list/all/type/4",
"status": 0,
"message": "OK",
"data": {
"envList": [
{
"id": 1,
"envName": "Test Environment SIT"
},
{
"id": 2,
"envName": "Test Environment UAT"
},
{
"id": 3,
"envName": "Open Source Test Environment"
}
]
}
}

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:

{
"connectParams": {},
"createTime": "",
"createUser": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"envDesc": "",
"envName": "",
"id": 0,
"modifyTime": "",
"modifyUser": ""
}

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:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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:

{
"method": "/api/data-source-manager/env/1",
"status": 0,
"message": "OK",
"data": {
"env": {
"id": 1,
"envName": "Test Environment SIT",
"envDesc": "Test Environment SIT",
"connectParams": {
"hadoopConf": {
"hive.metastore.execute.setugi": "true"
},
"uris": "thrift://localhost:9083"
},
"createTime": 1647249913000,
"modifyTime": 1647249913000
}
}
}

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:

{
"method": "/api/data-source-manager/env/4",
"status": 0,
"message": "OK",
"data": {
"removeId": 4
}
}

##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:

{
"connectParams": {},
"createTime": "",
"createUser": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"envDesc": "",
"envName": "",
"id": 0,
"modifyTime": "",
"modifyUser": ""
}

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:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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:

{
"method": "/api/data-source-manager/info",
"status": 0,
"message": "OK",
"data": {
"totalPage": 12,
"queryList": [
{
"id": 11,
"dataSourceName": "test1256",
"dataSourceTypeId": 4,
"createSystem": "Linkis",
"createTime": 1647909291000,
"createUser": "hadoop",
"versionId": 1,
"expire": false,
"dataSourceType": {
"id": "11",
"name": "hive",
"layers": 0
}
},
{
"id": 10,
"dataSourceName": "hive-test",
"dataSourceDesc": "hive test",
"dataSourceTypeId": 4,
"createSystem": "Linkis",
"createTime": 1647862455000,
"modifyTime": 1647930476000,
"modifyUser": "hadoop",
"createUser": "hadoop",
"versionId": 3,
"publishedVersionId": 1,
"expire": false,
"dataSourceType": {
"id": "10",
"name": "hive",
"layers": 0
}
}

]
}
}

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:

{
"method": "/api/data-source-manager/info/delete/1",
"status": 0,
"message": "OK",
"data": {
"removeId": 1
}
}

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:

{
"connectParams": {},
"createIdentify": "",
"createSystem": "",
"createTime": "",
"createUser": "",
"dataSourceDesc": "",
"dataSourceEnv": {
"connectParams": {},
"createTime": "",
"createUser": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"envDesc": "",
"envName": "",
"id": 0,
"modifyTime": "",
"modifyUser": ""
},
"dataSourceEnvId": 0,
"dataSourceName": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"expire": true,
"id": 0,
"labels": "",
"modifyTime": "",
"modifyUser": "",
"publishedVersionId": 0,
"versionId": 0,
"versions": [
{
"comment": "",
"connectParams": {},
"createTime": "",
"createUser": "",
"datasourceId": 0,
"parameter": "",
"versionId": 0
}
]
}

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:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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:

{
"method": "/api/data-source-manager/info/name/hive-test",
"status": 0,
"message": "OK",
"data": {
"info": {
"id": 10,
"dataSourceName": "hive-test",
"dataSourceDesc": "hive test",
"dataSourceTypeId": 4,
"createSystem": "Linkis",
"connectParams": {
"envId": "3"
},
"createTime": 1647862455000,
"modifyTime": 1647930476000,
"modifyUser": "hadoop",
"createUser": "hadoop",
"versionId": 3,
"publishedVersionId": 1,
"expire": false,
"dataSourceType": {
"name": "hive",
"layers": 0
}
}
}
}

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:

{
"method": "/api/data-source-manager/info/1",
"status": 0,
"message": "OK",
"data": {
"info": {
"id": 1,
"dataSourceName": "Open source co-construction environment",
"dataSourceDesc": "123",
"dataSourceTypeId": 1,
"createSystem": "Linkis",
"connectParams": {
"host": "127.0.0.1",
"password": "xxxxx",
"port": "9600",
"username": "linkis"
},
"createTime": 1647258360000,
"modifyTime": 1647437692000,
"modifyUser": "hadoop",
"createUser": "hadoop",
"versionId": 1,
"publishedVersionId": 1,
"expire": false,
"dataSourceType": {
"name": "mysql",
"icon": "https://uat.dongcha.weoa.com/static/img/logo.770c1525.png",
"layers": 0
}
}
}
}

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:

{
"method": "/api/data-source-manager/info/1/expire",
"status": 0,
"message": "OK",
"data": {
"expireId": 1
}
}

##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:

{
"connectParams": {},
"createIdentify": "",
"createSystem": "",
"createTime": "",
"createUser": "",
"dataSourceDesc": "",
"dataSourceEnv": {
"connectParams": {},
"createTime": "",
"createUser": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"envDesc": "",
"envName": "",
"id": 0,
"modifyTime": "",
"modifyUser": ""
},
"dataSourceEnvId": 0,
"dataSourceName": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"expire": true,
"id": 0,
"labels": "",
"modifyTime": "",
"modifyUser": "",
"publishedVersionId": 0,
"versionId": 0,
"versions": [
{
"comment": "",
"connectParams": {},
"createTime": "",
"createUser": "",
"datasourceId": 0,
"parameter": "",
"versionId": 0
}
]
}

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:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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:

{
"method": "/api/data-source-manager/info/1/1",
"status": 0,
"message": "OK",
"data": {
"info": {
"id": 1,
"dataSourceName": "Open source co-construction environment",
"dataSourceDesc": "123",
"dataSourceTypeId": 1,
"createSystem": "Linkis",
"connectParams": {
"host": "127.0.0.1",
"password": "xxxxx",
"port": "9600",
"username": "linkis"
},
"createTime": 1647258360000,
"modifyTime": 1647437692000,
"modifyUser": "hadoop",
"createUser": "hadoop",
"versionId": 1,
"publishedVersionId": 1,
"expire": false,
"dataSourceType": {
"name": "mysql",
"icon": "https://uat.dongcha.weoa.com/static/img/logo.770c1525.png",
"layers": 0
}
}
}
}

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:

{
"method": "/api/data-source-manager/key-define/type/4",
"status": 0,
"message": "OK",
"data": {
"keyDefine": [
{
"id": 6,
"key": "envId",
"description": "Cluster Environment",
"name": "Cluster Environment",
"valueType": "SELECT",
"require": true,
"dataSource": "/data-source-manager/env-list/all/type/4"
},
{
"id": 7,
"key": "keyTabFile",
"description": "KeyTab file",
"name": "keyTab file",
"valueType": "FILE",
"require": false,
"dataSource": "http://127.0.0.1:9001/api/rest_j/v1/bml/upload"
}
]
}
}

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:

{
"method": "/api/data-source-manager/name/linkis_test256/connect-params",
"status": 0,
"message": "OK",
"data": {
"connectParams": {
"host": "127.0.0.1",
"password": "xxxxx",
"port": "9600",
"username": "linkis"
}
}
}

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:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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:

{
"method": "/api/data-source-manager/publish/3/2",
"status": 0,
"message": "OK",
"data": {}
}

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:

{
"method": "/api/data-source-manager/type/all",
"status": 0,
"message": "OK",
"data": {
"typeList": [
{
"id": "1",
"name": "mysql",
"description": "mysql database",
"option": "mysql database",
"classifier": "Relational Database",
"icon": "https://uat.dongcha.weoa.com/static/img/logo.770c1525.png",
"layers": 3
},

{
"id": "4",
"name": "hive",
"description": "hive database",
"option": "hive",
"classifier": "Big Data Storage",
"layers": 3
}

]
}
}

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:

{
"method": "/api/data-source-manager/3/connect-params",
"status": 0,
"message": "OK",
"data": {
"connectParams": {
"host": "127.0.0.1",
"password": "xxxxx",
"port": "9600",
"username": "linkis"
}
}
}

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:

{
"method": "/api/data-source-manager/1/versions",
"status": 0,
"message": "OK",
"data": {
"versions": [
{
"versionId": 1,
"datasourceId": 1,
"connectParams": {
"host": "127.0.0.1",
"password": "xxxxx",
"port": "9600",
"username": "linkis"
},
"parameter": "{\"host\":\"127.0.0.1\",\"port\":\"9600\",\"username\":\"linkis\",\"password\": \"rO0ABXQACUFiY2RAMjAyMg==\"}",
"comment": "Initialization Version",
"createUser": "hadoop"
}
]
}
}

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:

{
"method": "/api/data-source-manager/1/1/op/connect",
"status": 0,
"message": "OK",
"data": {
"ok": true
}
}

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:

{
"connectParams": {},
"createIdentify": "",
"createSystem": "",
"createTime": "",
"createUser": "",
"dataSourceDesc": "",
"dataSourceEnv": {
"connectParams": {},
"createTime": "",
"createUser": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"envDesc": "",
"envName": "",
"id": 0,
"modifyTime": "",
"modifyUser": ""
},
"dataSourceEnvId": 0,
"dataSourceName": "",
"dataSourceType": {
"classifier": "",
"description": "",
"icon": "",
"id": "",
"layers": 0,
"name": "",
"option": ""
},
"dataSourceTypeId": 0,
"expire": true,
"id": 0,
"labels": "",
"modifyTime": "",
"modifyUser": "",
"publishedVersionId": 0,
"versionId": 0,
"versions": [
{
"comment": "",
"connectParams": {},
"createTime": "",
"createUser": "",
"datasourceId": 0,
"parameter": "",
"versionId": 0
}
]
}

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:

{
"data": {},
"message": "",
"method": "",
"status": 0
}