Obtaining the Environment Parameter Group List
Function
This API is used to obtain the environment parameter group list.
Calling Method
For details, see Calling APIs.
URI
GET /v1/projects/{project_id}/environments
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project UUID, which uniquely identifies a project. For details about how to obtain the project UUID, see Obtaining a Project ID. Constraints 32 characters (letters and digits). Range A string of 32 characters. Default Value N/A. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | Yes | Long | Definition The position where the query starts. Constraints N/A. Range 0–999 Default Value N/A. |
| limit | Yes | Long | Definition Number of items displayed on each page. Constraints N/A. Range 1–200 Default Value N/A. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token. Constraints 1 to 100,000 characters. Range N/A. Default Value N/A. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| environments | Array of Environment objects | Definition Environment groups. |
| offset | Long | Definition The position where the query starts. Range 0–999 |
| limit | Long | Definition Number of items displayed on each page. Range 1–200 |
| total_count | Long | Definition Total number of environment groups. Range 0–100 |
| Parameter | Type | Description |
|---|---|---|
| environment_id | String | Definition Environment group ID. Range A string of 32 characters. |
| environment_name | String | Definition Environment group name. Range A string of 3 to 50 characters |
| environment_description | String | Definition Environment group description. Range A string of 0 to 300 characters. |
| is_default | Boolean | Definition Whether the environment is default. Range false or true. true: default false: not default |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code displayed after the API fails to be called. Range A string of 12 to 16 characters |
| error_msg | String | Definition Error message displayed after the API fails to be called. Range A string of 3 to 100 characters. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
| error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
| error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
| error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
| error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Example Requests
get https://{endpoint}/v1/projects/75681cbb7c324e15a9eb8ee74a96a474/environments?offset=1&limit=10 Example Responses
Status code: 200
Response body for obtaining the environment parameter group list
{
"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 | Response body for obtaining the environment parameter group list |
| 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.