Obtaining the Environment Parameter List of CloudTest
Function
Obtains the environment parameter list of CloudTest.
URI
GET /v1/projects/{project_id}/environments
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
DevCloud project ID Minimum: 32 Maximum: 32 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Long |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. Minimum: 0 Maximum: 999 Default: 0 |
limit |
Yes |
Long |
Number of items displayed on each page. A maximum of 200 items are supported. Minimum: 1 Maximum: 200 Default: 200 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Call IAM to obtain the user token (value of X-Subject-Token in the response header). Minimum: 1 Maximum: 100000 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
environments |
Array of Environment objects |
Environment list |
offset |
Long |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. Minimum: 0 Maximum: 999 |
limit |
Long |
Number of items displayed on each page. A maximum of 200 items are supported. Minimum: 1 Maximum: 200 |
total_count |
Long |
Total number of environments Minimum: 0 Maximum: 100 |
Parameter |
Type |
Description |
---|---|---|
environment_id |
String |
Environment ID Minimum: 32 Maximum: 32 |
environment_name |
String |
Environment name Minimum: 3 Maximum: 80 |
environment_description |
String |
Environment description Minimum: 0 Maximum: 500 |
is_default |
Boolean |
Whether the environment is default |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called Minimum: 12 Maximum: 16 |
error_msg |
String |
Error message displayed after an API fails to be called Minimum: 3 Maximum: 100 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Example Requests
None
Example Responses
Status code: 200
OK
{ "environments" : [ { "environment_id" : "ff4893796ee1a8aa009ff3a470de55d8", "environment_name" : "Default environment", "environment_description" : "Default environment", "is_default" : true } ], "offset" : 0, "limit" : 1, "total_count" : 50 }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
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