# Update
# General Settings
# HTTP Request:
POST https://api.serveravatar.com/organizations/{organization}/servers/{server}/settings/general
# Parameters:
| parameters | Required | Type | Description |
|---|---|---|---|
| name | Yes | String | Update name of the Server |
| hostname | Yes | Alphabet Numeric | Update hostname of your server |
| php_cli_version | No | Float | If your web server is apache2 , nginx, or openlitespeed then Select any one PHP Cli Version: 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 or 8.5. |
| ols_automatically_restart | Yes | Boolean | If your web server is openlitespeed then true or false. otherwise false |
| timezone | Yes | String | Timezone For Example: UTC or Asia/Kolkata |
# Curl Request example:
# General Settings Curl Request
curl --request POST \
--url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/settings/general" \
--header 'content-type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: <Your API Token>' \
--data '{
"name": "alex-client-server",
"hostname": "alex-client-server",
"php_cli_version": "7.4",
"ols_automatically_restart": false,
"timezone": "Asia/Kolkata"
}'
# Updated General Settings
- 200 (Ok)
{
"message": "General Settings Updated Successfully."
}
# Security Settings
# HTTP Request
POST https://api.serveravatar.com/organizations/{organization}/servers/{server}/settings/security
# Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| redis_password | Yes | String | Password for Redis (must be alphanumeric with dashes/underscores, max length: 254). |
| redis_maxmemory | No | String | Maximum memory limit for Redis (must be in a valid format such as 256mb or 1gb, ending with mb or gb). |
| maxmemory_policy | No | String | Redis max memory policy. Select any one policy from:volatile-lru, allkeys-lru, volatile-lfu, allkeys-lfu, volatile-random, allkeys-random, volatile-ttl, noeviction. |
| ssh_port | Yes | Numeric | The port number for SSH access. |
| is_enabled_security_updates | No | Boolean | Enable or disable automatic security updates. |
| schedule | No | String | Scheduling type: options include every12Hours, everyDay, everyWeek, everyMonth, or custom for a custom schedule. |
| minute | No | Numeric | Minute component of the schedule (required if schedule is custom). |
| hour | No | Numeric | Hour component of the schedule (required if schedule is custom). |
| month | No | Numeric | Month component of the schedule (required if schedule is custom). |
| day_of_week | No | Numeric | Day of the week component of the schedule (required if schedule is custom). |
| day_of_month | No | Numeric | Day of the month component of the schedule (required if schedule is custom). |
| permit_root_login | Yes | String | Allow root login (must be yes or no). |
| root_password_authentication | Yes | String | Require password authentication for root login (must be yes or no). |
# cURL Request Example
curl --request POST \
--url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/settings/security" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <Your API Token>' \
--data '{
"redis_password": "your_redis_password",
"redis_maxmemory": "256mb",
"maxmemory_policy": "volatile-lru",
"ssh_port": 22,
"is_enabled_security_updates": 1,
"schedule": "custom",
"minute": 0,
"hour": 2,
"month": "*",
"day_of_week": "*",
"day_of_month": "*",
"permit_root_login": "no",
"root_password_authentication": "yes"
}'
# Response
- Success (200 OK)
{
"message": "Settings has been updated successfully."
}
# Organization Not Found
- 404 (Not Found)
{
"message": "Organization not found."
}
# Server Not Found
- 404 (Not Found)
"message": "Server not found."
# Server Error
- 500 (Internal Server Error)
{
"message": "Something went wrong."
}