Updated on 2022-02-21 GMT+08:00

Querying an Environment List

Function

This API is used to query an environment list that matches specified conditions.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

GET

/v1.0/apigw/envs[?page_no, page_size,name]

  • A combination of different query conditions can be added at the end of the URI by using question marks (?) and ampersands (&).
  • Query conditions include: name, page_size, and page_no.
Table 2 Parameter description

Parameter

Mandatory

Type

Description

name

No

String

Environment name

page_size

No

Integer

Number of records displayed on each page. The default value is 20.

page_no

No

Integer

Page number. The default value is 1.

precise_search

No

String

Parameter name (name) for exact matching

Request

N/A

Response

Table 3 Parameter description

Parameter

Type

Description

total

Integer

Number of environments that match the query conditions

size

Integer

Length of the returned environment list

envs

Dictionary

Environment list

Table 4 Parameter description of envs

Parameter

Type

Description

id

String

Environment ID

name

String

Environment name

create_time

Timestamp

Time when the environment is created

remark

String

Description of the environment

Example response:

{
	"total": 2,
	"size": 2,
	"envs": [{
		"id": "DEFAULT_ENVIRONMENT_RELEASE_ID",
		"name": "RELEASE",
		"remark": "Production environment",
		"create_time": "2017-12-29T03:39:03.165657Z"
	},
	{
		"id": "cca3616a-f368-4b32-9064-b2a631cb3eeb",
		"name": "DEVELOP",
		"remark": "Development environment",
		"create_time": "2017-12-28T12:50:47Z"
	}]
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

500

Server Internal Error