Listing Data Sources
Function
This API is used to list data sources.
URI
GET /v1/{project_id}/connections
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
all |
No |
Boolean |
Whether to return the list of all data sources. |
limit |
No |
Integer |
Maximum number of returned data sources. |
offset |
No |
Integer |
Offset. |
name |
No |
String |
Data source search value (fuzzy match by name). |
type |
No |
String |
Explanation Data source type. For example, MySQL indicates that the type of the connected data source is MySQL. The MySQL driver package is used for query. Constraints N/A Value range The enumerated values are:
Default value N/A |
sort_key |
No |
String |
Sorting field. The value can be name, creation_date, or update_date. |
sort_dir |
No |
String |
Sorting type. The options are ASC and DESC. Enumerated values:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Workspace-Id |
Yes |
String |
Workspace ID. For how to obtain it, see Obtaining a Workspace ID. |
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
page_data |
Array of DataConnectionVO objects |
Pagination data. Array length: 0 to 2,147,483,647 elements |
count |
Long |
Total number of data records. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Data source ID. |
name |
String |
Data source name. |
description |
String |
Data source description. |
host |
String |
IP address or domain name of the data source. |
port |
Integer |
Port. |
server_list |
String |
Service list. |
database_name |
String |
Database name. |
user_name |
String |
Username. |
url |
String |
JDBC URL. |
test_url |
String |
JDBC test URL. |
password |
String |
Password for connecting to a database. |
source_instance_id |
String |
ID of the associated cloud instance. |
vpc_connection_id |
String |
VPC connection ID of the associated cloud instance. |
project_id |
String |
Project ID. |
domain_id |
String |
User domain ID. |
region_id |
String |
Region ID. |
work_space_id |
String |
Workspace ID. |
extra |
String |
Network configuration information. |
config |
DcConfigVO object |
Configuration information. |
type |
String |
Explanation Data source type. For example, MySQL indicates that the type of the connected data source is MySQL. The MySQL driver package is used for query. Constraints N/A Value range The enumerated values are:
Default value N/A |
source |
String |
Data source. Enumerated values:
|
mode |
String |
Schema. |
default_schema |
String |
Default schema. |
Parameter |
Type |
Description |
---|---|---|
ssl |
Boolean |
SSL parameter configuration. |
region_id |
String |
Region ID. Currently, cross-region deployment is not supported. The value must be the ID of the current region. |
catalog_name |
String |
Data directory name. The default value is dli. The value of DLI catalogs is dli. |
catalog_type |
String |
Data directory type. The default value is dil. The options include:
|
ds_project_id |
String |
ID of the project the DLI queue belongs to. |
queue_name |
String |
SQL queue. |
auth_type |
String |
Authentication mode. The value is AKSK. Enumerated values:
|
ds_ak |
String |
User AK. Mandatory when the authentication mode is AKSK. |
ds_sk |
String |
User SK. Mandatory when the authentication mode is AKSK. |
time_out |
Integer |
Request timeout interval when an API is used as the data source. |
protocol |
String |
Protocol. The value is REST. |
token_key |
String |
Token key. |
token_value |
String |
Token value. |
resp_param |
Array of ResponseParamVO objects |
Response parameters. |
param_example |
String |
Parameter example for an API data source. |
request_url |
String |
Request URL when an API is used as the data source. |
request_method |
String |
Request method. The value can be GET or POST. Enumerated values:
|
request_params |
Array of RequestParamDto objects |
List of request parameters. |
Parameter |
Type |
Description |
---|---|---|
select |
Boolean |
Whether the current parameter is selected. |
json_path |
String |
JSON path. |
alias_name |
String |
Parameter alias. |
field_type |
String |
Parameter type. The options include String, Long, Decimal, DateTime, and Bool. |
param_name |
String |
Parameter name. |
Parameter |
Type |
Description |
---|---|---|
location |
String |
Location. |
value |
Array of strings |
Parameter value. |
tag_id |
String |
Tag ID. Mandatory when param_source is set to user. |
param_name |
String |
Parameter name. |
alias_name |
String |
Parameter alias. |
field_type |
String |
Parameter type. The options include String, Long, Decimal, List<String>, List<Long>, List<Decimal>, DateTime, Bool, PageIndex, and PageNum. |
param_source |
String |
Parameter source. The options include custom, user, and userGroup. |
type |
Boolean |
Whether to encrypt data. |
Example Request
List data sources.
GET /v1/{project_id}/connections
Example Response
Status code: 200
Data sources are successfully listed.
{ "count" : 100, "page_data" : [ { "id" : "xxxxxxx796649a185b012a96xxxxxxx", "name" : "test_name", "host" : "xxx.xx.x.xx", "port" : 80, "server_list" : "xxx.xx.x.xx:xxxx", "database_name" : "db_name", "user_name" : "test_name", "test_url" : "jdbc:gaussdb://xxx.xx.x.xx:xxxx/gaussdb?socketTimeout=120&loginTimeout=5&ssl=true", "project_id" : "xxxxxxxb4dac4055888643b331axxxxxxx", "domain_id" : "xxxxxxxcf3c90428fb22606b64dxxxxxxx", "work_space_id" : "xxxxxxxa5ea0764ffa850664804b9xxxxxxx", "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" : "xxxxxxx63a94b0ba2887b8xxxxxxx", "creation_date" : 1700114987113, "creation_user_name" : "ei_dlv_l00456193_01", "update_user" : "xxxxxxxa863a94b0ba2887b80dxxxxxxx", "update_user_name" : "name1", "update_date" : 1701071948929 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Data sources are successfully listed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot