Help Center> CodeArts Deploy> API Reference> APIs> Managing Host Clusters> Querying Information About the Environment Associated with a Host Cluster
Updated on 2024-07-05 GMT+08:00

Querying Information About the Environment Associated with a Host Cluster

Function

This API is used to query information about the environment associated with a host cluster.

Calling Method

For details, see Calling APIs.

URI

GET /v1/resources/host-groups/{group_id}/environments/infos

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

group_id

Yes

String

Host cluster ID

Minimum: 32

Maximum: 32

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

page_index

No

Integer

Page number

Minimum: 1

Maximum: 2147483647

page_size

No

Integer

Number of records per page

Minimum: 1

Maximum: 1000

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Minimum: 0

Maximum: 20000

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

status

String

Request success or failure status

total

Integer

Total number of associated environments

result

Array of EnvironmentInfo objects

Environment information list

Table 5 EnvironmentInfo

Parameter

Type

Description

id

String

Environment ID

name

String

Environment name

app_id

String

Application ID

app_name

String

Application name

project_id

String

Project ID

Example Requests

https://{endpoint}/v1/resources/host-groups/849f425a74034fd2a4e60c367414efba/environments/infos?page_index=1&page_size=10

Example Responses

Status code: 200

OK: The request is successful.

{
  "status" : "success",
  "result" : [ {
    "id" : "54e5b8b0d10148cc96142ac9d6c1c1f6",
    "name" : "Test_environment_update",
    "project_id" : "7e6caf3cd9a64d5b8ea451e38221892e",
    "app_name" : "VM_deployment_and_update",
    "app_id" : "8ddf0566c1784da29faac80516fa8425"
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.