Updates the environment variables of an application. This operation is only supported for PolarClaw.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ApplicationId |
string |
Yes |
The application ID. |
pa-************** |
| Variables |
object |
No |
A mapping from environment variable names to values. |
{ "ENV_TEST": "test-value" } |
| Restart |
boolean |
No |
Specifies whether to restart the gateway after the update. The default value is true. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response schema |
||
| RequestId |
string |
The request ID. |
6A2EE5B4-CC9F-46E1-A747-E43BC9****** |
| Message |
string |
The response message. |
successful |
| Code |
integer |
The response status code. |
200 |
| ApplicationId |
string |
The application ID. |
pa-************** |
| Ok |
boolean |
Indicates whether the operation succeeded. |
true |
| UpdatedKeys |
array |
A list of the environment variable names that were added or updated. |
|
|
string |
The environment variable name. |
ENV_TEST |
|
| TotalVariables |
integer |
The total number of environment variables for the application after the update. |
1 |
| Restarted |
boolean |
Indicates whether the gateway was restarted. |
true |
Examples
Success response
JSON format
{
"RequestId": "6A2EE5B4-CC9F-46E1-A747-E43BC9******",
"Message": "successful",
"Code": 200,
"ApplicationId": "pa-**************",
"Ok": true,
"UpdatedKeys": [
"ENV_TEST"
],
"TotalVariables": 1,
"Restarted": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.