获取数据源详情
功能介绍
获取数据源详情。
URI
GET /v1/{project_id}/connections/{connection_id}
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID。获取方法请参见获取项目ID。 |
connection_id |
是 |
String |
数据源ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Workspace-Id |
是 |
String |
工作空间ID。获取方法请参见获取工作空间ID。 |
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取IAM用户Token接口,接口返回的响应消息头中“X-Subject-Token”就是需要获取的用户Token。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
数据源ID。 |
name |
String |
数据源名称。 |
description |
String |
数据源描述。 |
host |
String |
数据源IP或域名。 |
port |
Integer |
端口。 |
server_list |
String |
服务列表。 |
database_name |
String |
数据库名称。 |
user_name |
String |
用户名。 |
url |
String |
jdbc连接url。 |
test_url |
String |
jdbc连接test_url。 |
password |
String |
连接数据库密码。 |
source_instance_id |
String |
关联云实例ID。 |
vpc_connection_id |
String |
关联云实例vpc_connection_id。 |
project_id |
String |
项目ID。 |
domain_id |
String |
用户domainId。 |
region_id |
String |
所属regionID。 |
work_space_id |
String |
所属工作空间ID。 |
extra |
String |
网络配置信息。 |
config |
DcConfigVO object |
配置信息。 |
type |
String |
参数解释: 数据源类型。 示例:MySQL,指定当前对接的数据源类型为MySQL,涉及查询时会使用MySQL驱动包。 约束限制: 不涉及 取值范围: 以下枚举值:
默认取值: 不涉及 |
source |
String |
数据源来源。枚举值:
|
mode |
String |
模式。 |
default_schema |
String |
默认schema。 |
参数 |
参数类型 |
描述 |
---|---|---|
ssl |
Boolean |
ssl参数配置。 |
region_id |
String |
DLI归属regionId;当前不支持跨region,值只能是当前regionId。 |
catalog_name |
String |
数据目录名称,默认值:dli;DLI自有catalog值为dli。 缺省值:dli |
catalog_type |
String |
数据目录类型,默认值:dil,枚举值:
缺省值:dli |
ds_project_id |
String |
DLI队列归属rpojectId。 |
queue_name |
String |
SQL队列。 |
auth_type |
String |
验证方式;AKSK。 枚举值:
|
ds_ak |
String |
用户ak(验证方式为AKSK时必填)。 |
ds_sk |
String |
用户sk(验证方式为AKSK时必填)。 |
time_out |
Integer |
API数据源时,请求超时时间。 |
protocol |
String |
协议:REST。 |
token_key |
String |
token key。 |
token_value |
String |
token value。 |
resp_param |
Array of ResponseParamVO objects |
返回参数。 |
param_example |
String |
API数据源参数示例。 |
request_url |
String |
API数据源时,请求url。 |
request_method |
String |
请求方式:GET、POST。 枚举值:
|
request_params |
Array of RequestParamDto objects |
请求参数列表。 |
参数 |
参数类型 |
描述 |
---|---|---|
select |
Boolean |
是否选中当前参数。 |
json_path |
String |
json路径。 |
alias_name |
String |
参数别名。 |
field_type |
String |
参数类型:String、Long、Decimal、DateTime、Bool。 |
param_name |
String |
参数名称。 |
参数 |
参数类型 |
描述 |
---|---|---|
location |
String |
位置。 |
value |
Array of strings |
参数值。 |
tag_id |
String |
标签ID,当param_source为user时必填。 |
param_name |
String |
参数名称。 |
alias_name |
String |
参数别名。 |
field_type |
String |
参数类型:String、Long、Decimal、List<String>、List<Long>、List<Decimal>、DateTime、Bool、PageIndex、PageNum。 |
param_source |
String |
参数来源:custom、user、userGroup。 |
type |
Boolean |
是否加密。 |
请求示例
获取数据源详情。
GET /v1/{project_id}/connections/{connection_id}
响应示例
状态码: 200
数据源详情。
{ "id" : "xxxxxxx3796649a185b012a96xxxxxxx", "name" : "xxx_gaussdbtest", "host" : "xxx.xx.x.xx", "port" : 8000, "server_list" : "xxx.xx.x.xx:xxxx", "database_name" : "gaussdb", "user_name" : "modernbi", "test_url" : "jdbc:gaussdb://xxx.xx.xx.xx:xxxx/gaussdb?socketTimeout=120&loginTimeout=5&ssl=true", "project_id" : "xxxxxxxb4dac4055888643b33xxxxxxx", "domain_id" : "xxxxxxxf3c90428fb22606b64xxxxxxx", "work_space_id" : "xxxxxxxea0764ffa850664804xxxxxxx", "extra" : "[{\"ip\": \"xxx.xx.x.xx\", \"port\": xxxx, \"channelType\": \"eip\"}]", "config" : { "ssl" : true }, "type" : "DWS", "source" : "dws", "mode" : "multi-node", "default_schema" : "public", "creation_user" : "xxxxxa863a94b0ba2887b80dxxxxx", "creation_date" : 1700114987113, "creation_user_name" : "test_name", "update_user" : "xxxxxxxa863a94b0ba2887b80dcxxxxxxx", "update_user_name" : "test_name", "update_date" : 1701071948929 }
状态码
状态码 |
描述 |
---|---|
200 |
数据源详情。 |
错误码
请参见错误码。