Obtaining the Environment List
Function
This API is used to obtain the environment list.
URI
GET /v1/{project_id}/cae/environments
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token.
Maximum characters: 16,384 |
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
NOTE:
For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
api_version |
String |
API version. Fixed value: v1. Enumerated value:
|
kind |
String |
API type. Fixed value: Environment. Enumerated value:
|
items |
Array of EnvironmentItem objects |
Environment list. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Environment ID. |
name |
String |
Environment name. |
job_id |
String |
Job ID. |
status |
String |
Environment status. Enumerated values:
|
annotations |
Map<String,String> |
Additional attributes of the environment.
|
created_at |
String |
Creation time. |
updated_at |
String |
Update time. |
Example Request
Obtain the environment list.
GET https://{endpoint}/v1/{project_id}/cae/environments
Example Response
Status code: 200
The request is successful.
{ "api_version" : "v1", "kind" : "Environment", "items" : [ { "id" : "5d3d1e90-2f5d-4ef1-958b-3fc1ed0b0898", "name" : "test", "version" : "1.2.0", "job_id" : "15cbf4ff-e6a8-4504-a5e0-574b9c21493a", "status" : "finish", "annotations" : { "cluster_id" : "2177808d-a78e-11ed-be73-0255ac100b0a", "enterprise_project_id" : "0", "group_name" : "xxx", "inbound_eip_addr" : "100.xx.xx.xxx", "namespace" : "79c4xxxf5f3a4xxxda92601xxx64b1e8c-test", "public_elb_id" : "da9e107e-bd25-412f-9546-563ed11ae34c", "type" : "exclusive", "vpc_id" : "09902850-9454-4715-9764-018f0c3701fd" }, "created_at" : "2023-02-08T08:49:34.000737Z", "updated_at" : "2023-02-08T08:49:34.000737Z" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
The request is successful. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot