Obtaining the Resource Lists

Function

This API is used to obtain the resource lists.

URI

GET /v1/{project_id}/resources

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

Table 2 describes the request parameters.
Table 2 Request parameters

Parameter

Mandatory

Type

Description

type

Yes

String

Resource type. The options are DLI and CloudTable.

Response

Table 3 describes the response parameters.
Table 3 Response parameters

Parameter

Mandatory

Type

Description

is_success

Yes

Boolean

Whether the request is successful

clusters

Yes

List

List of clusters. For details, see Table 4.

Table 4 clusters 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,
        "clusters": [
            {
                "id": "f53b3ee688fa4c95b609c2c6616823b7",
                "cluster_name": "res_cluster",
                "status": "success",
                "is_register": true
            }
        ]
    }
  • 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.