Obtaining Cross-Connections

Function

This API is used to obtain cross-connections.

URI

GET /v1/{project_id}/datasource-connection

Table 1 describes the URI parameters.
Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used for resource isolation. For details about how to obtain the project ID, see Obtaining a Project ID.

Request

N/A

Response

Table 2 describes the response parameters.
Table 2 Response parameters

Parameter

Mandatory

Type

Description

is_success

Yes

Boolean

Whether the request is successful

connections

Yes

List

List of cross-connections. For details, see Table 3.

Table 3 connections parameters

Parameter

Mandatory

Type

Description

id

No.

String

ID

cluster_name

Yes

String

Cluster name

status

No.

String

Cluster status

is_register

No.

Boolean

Registered or not

Example

  • Example of a successful response
    {
        "is_success": true,
        "connections": [
            {
                "connection_id": "914ba558-35e1-4fcf-a848-5f193e3b2444",
                "name": "a",
                "destination": "cloudtable-res-zk2-rpbIBWT5.cloudtable.com:2181,cloudtable-res-zk3-gqefTdc8.cloudtable.com:2181,cloudtable-res-zk1-3FsKGq9h.cloudtable.com:2181",
                "state": "FAILED",
                "cluster_name": "",
                "service": "CloudTable",
                "create_time": "1566887641603",
                "cloudtable_name": "cloudtable-res"
            }
        ]
    
    }
  • Example of a failed response
    {
        "is_success": false,
        "error_code": "res.1006",
        "error_msg": "The content for the request is invalid."
    }

Status Code

For details about status codes, see Status Codes.