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.
|
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.
|
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
|
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 |
|
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
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
500 |
Server Internal Error |
Last Article: Deleting an Environment
Next Article: Environment Variable Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.