Querying a Basic Datasource Connection
Function
This API is used to query a created basic datasource connection.
Debugging
You can debug this API in API Explorer.
URI
- URI format
GET /v2.0/{project_id}/datasource-connection/{connection_id}
- Parameter description
Table 1 URI parameter Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
connection_id
Yes
String
Connection ID. Identifies the UUID of a datasource connection.
Request
None
Response
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| is_success | No | Boolean | Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed. |
| message | No | String | System prompt. If execution succeeds, the parameter setting may be left blank. |
| connection_id | No | String | Connection ID. Identifies the UUID of a datasource connection. |
| destination | No | String | Queue access address entered by the user during connection creation. |
| state | No | String | Connection status. For details about the status code, see Table 4. |
| process | No | Double | Progress of the datasource connection that is being created. The value ranges from 0.0 to 1.0, indicating 0% to 100%. |
| name | No | String | User-defined connection name. |
| connection_url | No | String | Connection URL used to create a datasource association table. |
| cluster_name | No | String | Name of the Serverless Spark queue. For the datasource connection established in SQL queue mode, this field is left blank. |
| service | No | String | The peer service (CloudTable/CloudTable.OpenTSDB/MRS.OpenTSDB/DWS/RDS/CSS) specified by the user during connection creation. |
| create_time | No | Long | Time when a link is created. The time is converted to a UTC timestamp. |
| connectivity | No | String | Address reachability of all new clusters bound by basic datasource connections. |
| available_queue_info | No | Array of Objects | For details about how to create a datasource connection for each queue, see Table 3. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| peer_id | No | String | ID of a datasource connection. |
| status | No | String | Connection status. For details about the status code, see Table 4. |
| name | No | String | Name of a queue. |
| err_msg | No | String | Detailed error message when the status is FAILED. |
| update_time | No | Long | Time when the available queue list was updated. |
| Parameter | Definition | Description |
|---|---|---|
| CREATING | Creating | The datasource connection is being created. |
| ACTIVE | Active | The datasource connection has been created, and the connection to the destination address is normal. |
| FAILED | Failed | Failed to create a datasource connection. |
| DELETED | Deleted | The datasource connection has been deleted. |
Example
- Example request
None
- Example response (successful request)
{ "is_success": true, "message": "", "connection_id":"378eb1e6-521d-41a4-a41c-bbb58f34a6d6", "destination":"cloudtable-cf82-zk3-pa6HnHpf.cloudtable.com:2181,cloudtable-cf82-zk2-weBkIrjI.cloudtable.com:2181,cloudtable-cf82-zk1-WY09px9l.cloudtable.com:2181", "state": "CREATING", "process": 0, "name": "op", "connection_url": "", "cluster_name": "", "service":"CloudTable.OPENTSDB", "create_time": 1566180327674, "count":1 }
Status Codes
Table 5 describes the status code.
Error Codes
If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Code.
Last Article: Querying a Basic Datasource Connection List
Next Article: APIs Related to Enhanced Datasource Connections
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.