Help Center> CodeArts Deploy> API Reference> APIs> Managing Host Clusters> Querying the Basic Environment Information List of an Application
Updated on 2024-07-05 GMT+08:00

Querying the Basic Environment Information List of an Application

Function

This API is used to query the basic environment information list of an application.

Calling Method

For details, see Calling APIs.

URI

GET /v1/applications/{application_id}/host-groups/base/infos

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

application_id

Yes

String

Application ID

Minimum: 32

Maximum: 32

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

project_uuid

Yes

String

Project ID

Minimum: 32

Maximum: 32

os

No

String

Operating system: Windows or Linux

Minimum: 0

Maximum: 128

Enumeration values:

  • linux

  • windows

page_index

No

Integer

Page number

Minimum: 1

Maximum: 2147483647

page_size

No

Integer

Number of records on each page

Minimum: 1

Maximum: 1000

name

No

String

Search by host cluster name

Minimum: 0

Maximum: 128

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 quantity

result

Array of EnvironmentBaseInfo objects

Basic environment information list

Table 5 EnvironmentBaseInfo

Parameter

Type

Description

name

String

Environment name

os

String

Operating system: Windows or Linux

uuid

String

Environment ID

group_id

String

Host cluster ID

host_count

Integer

Number of hosts in an environment

Example Requests

https://{endpoint}/v1/applications/fe50d93c5a7f4335bb44a68419606ced/host-groups/base/infos?project_uuid=7e6caf3cd9a64d5b8ea451e38221892e&page_index=1&page_size=1000

Example Responses

Status code: 200

OK: The request is successful.

{
  "status" : "success",
  "result" : [ {
    "name" : "Create an environment test permission",
    "os" : "linux",
    "uuid" : "c51d2173c541496c9561f77ccdacf13e",
    "group_id" : "c51d2173c541496c9561f77ccdacf13e",
    "host_count" : 0
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.