Update server startup variable
Updates a single startup variable for the specified server. Only user-editable variables can be modified.
Updates a single startup variable for the specified server. Only user-editable variables can be modified.
Authorization
bearerAuth AuthorizationBearer <token>
Enter your API token in the format: Bearer {token}
In: header
Path Parameters
server*string
Server UUID
Request Body
application/json
Variable update data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PUT "https://example.com/api/client/servers/string/startup/variable" \ -H "Content-Type: application/json" \ -d '{ "key": "SERVER_PORT", "value": "25566" }'{
"object": "egg_variable",
"attributes": {
"name": "Server Port",
"description": "The port your server will listen on",
"env_variable": "SERVER_PORT",
"default_value": "25565",
"server_value": "25566",
"is_editable": true,
"rules": "required|integer|between:1024,65535"
},
"meta": {
"startup_command": "java -Xms128M -Xmx1024M -jar server.jar",
"raw_startup_command": "java -Xms{{SERVER_MEMORY}}M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}"
}
}{
"errors": [
{
"status": "400",
"detail": "The environment variable you are trying to edit does not exist."
}
]
}Empty
Empty
Empty
{
"errors": {
"value": [
"The value field is required."
]
}
}