Update a server group

Updates server group settings

put
/servergroups/{id}

https://console.automox.com/api/servergroups/{id}
Request
Response
Request
Path Parameters
id
required
integer
Server Group ID for the specified group
Headers
Content-Type: application/json
required
string
Specify json as the content type for body parameters
Authorization: Bearer
required
string
Your Automox API Key for authentication Format: Authorization: Bearer your_automox_api_key
Query Parameters
o
required
integer
Organization ID for the specified group
Body Parameters
name
optional
string
Name of the group
refresh_interval
required
integer
Frequency of device refreshes (scans) in minutes. Minimum: 360 Maximum: 1440
parent_server_group_id
required
integer
ID of the parent group Use the organization's Default Group ID to make this a top-level group. See Note: Default Group ID
ui_color
optional
string
The highlight color for the group. Primarily used on the System Management view. Format: #059F1D See Note: UI Color
notes
optional
string
Use to define notes that are displayed while editing the policy
enable_os_auto_update
optional
boolean
Enforce automatic update settings Options: null: Keep Device's Setting true: Enable OS automatic updates false: Disable OS automatic updates
enable_wsus
optional
boolean
Enforce WSUS settings for Windows devices Options: null: Keep Device's Setting true: force WSUS false: force Windows Update
wsus_server
optional
string
WSUS server address. Use with enable_wsus. Format: "http://myserver.com:8530"
policies
optional
array
List of Policies to link to this group.
Response
200: OK
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"override": {
"type": "boolean"
},
"parent_server_group_id": {
"type": "integer",
"format": "int64"
},
"refresh_interval": {
"type": "integer",
"format": "int64"
}
}
}

Note: Default Group ID

You can determine an organization's Default Group ID by listing the groups and looking for the group with a blank name: "name": ""

Note: UI Color

The API will accept any value for UI Color. However, if you use a color that is not in the pre-defined list, it will default to Pine Green when saving via the Group Editor UI. The pre-defined colors are the following:

  • Pine Green: #059F1D

  • Salmon: #CC6666

  • Lemonade: #E9FF03

  • Bubblegum: #FFa4c0

  • Colorado Snow: #FFFFFF

  • Battleship Hull: #61666F

  • Utah Clay: #D78500

  • Electric Violet: #BD0FE1

  • Forgot Sunscreen: #F65C23

Example JSON Group Object

{
"name": "API Modified",
"refresh_interval": 1380,
"parent_server_group_id": 23500,
"ui_color": "#E9FF03",
"notes": "3 Policies, Lemonade Color, Force WinUpdate",
"enable_os_auto_update": false,
"enable_wsus": false,
"policies": [
18627,
22645,
25754
]
}

Example Requests

cURL
Python http.client
Python requests
C#
PowerShell
cURL
curl -X PUT \
'https://console.automox.com/api/servergroups/123456?o=0000' \
-H 'Authorization: Bearer your_automox_api_key' \
-H 'Content-Type: application/json' \
-d '
{
"name": "API Modified",
"refresh_interval": 1380,
"parent_server_group_id": 23500,
"ui_color": "#E9FF03",
"notes": "3 Policies, Lemonade Color, Force WinUpdate",
"enable_os_auto_update": false,
"enable_wsus": false,
"policies": [
18627,
22645,
25754
]
}'
Python http.client
import http.client
conn = http.client.HTTPConnection("console,automox,com")
payload = "\r\n{\r\n \"name\": \"API Modified\",\r\n \"refresh_interval\": 1380,\r\n \"parent_server_group_id\": 23500,\r\n \"ui_color\": \"#E9FF03\",\r\n \"notes\": \"3 Policies, Lemonade Color, Force WinUpdate\",\r\n \"enable_os_auto_update\": false,\r\n\t\"enable_wsus\": false,\r\n \"policies\": [\r\n 18627,\r\n 22645,\r\n 25754\r\n ]\r\n}"
headers = {
'Content-Type': "application/json",
'Authorization': "Bearer your_automox_api_key"
}
conn.request("PUT", "api,servergroups,123456", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Python requests
import requests
url = "https://console.automox.com/api/servergroups/123456"
querystring = {"o":"0000"}
payload = "\r\n{\r\n \"name\": \"API Modified\",\r\n \"refresh_interval\": 1380,\r\n \"parent_server_group_id\": 23500,\r\n \"ui_color\": \"#E9FF03\",\r\n \"notes\": \"3 Policies, Lemonade Color, Force WinUpdate\",\r\n \"enable_os_auto_update\": false,\r\n\t\"enable_wsus\": false,\r\n \"policies\": [\r\n 18627,\r\n 22645,\r\n 25754\r\n ]\r\n}"
headers = {
'Content-Type': "application/json",
'Authorization': "Bearer your_automox_api_key"
}
response = requests.request("PUT", url, data=payload, headers=headers, params=querystring)
print(response.text)
C#
var client = new RestClient("https://console.automox.com/api/servergroups/123456?o=0000");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer your_automox_api_key");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("undefined", "\r\n{\r\n \"name\": \"API Modified\",\r\n \"refresh_interval\": 1380,\r\n \"parent_server_group_id\": 23500,\r\n \"ui_color\": \"#E9FF03\",\r\n \"notes\": \"3 Policies, Lemonade Color, Force WinUpdate\",\r\n \"enable_os_auto_update\": false,\r\n\t\"enable_wsus\": false,\r\n \"policies\": [\r\n 18627,\r\n 22645,\r\n 25754\r\n ]\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PowerShell
$apiKey = 'your_automox_api_key'
$headers = @{
"Authorization" = "Bearer $apiKey"
"Content-Type" = "application/json"
}
$body = @"
{
"name": "API Modified",
"refresh_interval": 1380,
"parent_server_group_id": 23500,
"ui_color": "#E9FF03",
"notes": "3 Policies, Lemonade Color, Force WinUpdate",
"enable_os_auto_update": false,
"enable_wsus": false,
"policies": [
18627,
22645,
25754
]
}
"@
$url = "https://console.automox.com/api/servergroups/123456?o=0000"
Invoke-WebRequest -Method Put -Uri $url -Headers $headers -Body $body