Querying an Environment Variable List
Function
This API is used to query the list of all environment variables under an API group.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
| Request Method | URI |
|---|---|
| GET | /v1/{project_id}/apigw/instances/{instance_id}/env-variables[?page_size, page_no, env_id, group_id, variable_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: env_id, group_id, variable_name, page_size, and page_no.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which can be obtained by the administrator on the My Credentials page. |
| instance_id | Yes | String | Instance ID, which can be obtained from the dedicated gateway information on the API Gateway console. |
| env_id | No | String | Environment ID |
| group_id | Yes | String | API group ID |
| variable_name | No | String | Variable 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 |
|---|---|---|
| variables | Dictionary | Environment variable list |
| total | Integer | Number of environment variables that match the query conditions |
| size | Integer | Length of the returned environment variable list |
| Parameter | Type | Description |
|---|---|---|
| id | String | Environment variable ID |
| env_id | String | Environment ID |
| group_id | String | API group ID |
| variable_name | String | Variable name |
| variable_value | String | Variable value |
Example response:
{
"total": 2,
"size": 2,
"variables": [{
"id": "09ab8135-7224-40b9-bf5d-107f2a09d409",
"env_id": "cca3616a-f368-4b32-9064-b2a631cb3eeb",
"group_id": "73c58022-f20d-495a-a188-85d718647f09",
"variable_name": "port",
"variable_value": "8080"
},
{
"id": "104185e5-3e8f-4c63-a7e5-ef4117bf870c",
"env_id": "cca3616a-f368-4b32-9064-b2a631cb3eeb",
"group_id": "73c58022-f20d-495a-a188-85d718647f09",
"variable_name": "address",
"variable_value": "192.168.1.5"
}]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Server Internal Error |
Last Article: Querying Environment Variable Details
Next Article: Request Throttling Policy Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.