Skip to content

Reorder a server's firewall groups

PUT/servers/{server}/firewall-groups/reorder

Overview

Changes the order in which the server's firewall groups are evaluated. Send groups with every assigned group ID exactly once, from first to last. Invalid lists return 422 without changing the order. The new order is applied in the background.

Permissions

Requires the firewall.update (Change the firewall) permission for the selected team. Resources outside that team return 404.

curl --request PUT \
  --url 'https://console.advinservers.com/api/v1/client/servers/{server}/firewall-groups/reorder' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "groups": [
    "72a4a737-236f-456f-827f-6145d9c95727",
    "437b596c-78c9-47e4-abc9-94bc0eab1598"
  ]
}'
[
  {
    "id": "72a4a737-236f-456f-827f-6145d9c95727",
    "uuid_short": "Uuid short",
    "name": "Lambda Complex ingress",
    "applied": true,
    "rules": [
      {
        "id": "986f78ba-68f7-4dd3-8f15-1bac745f5ab1",
        "position": 0,
        "type": "in",
        "action": "ACCEPT",
        "macro": "Web",
        "proto": null,
        "sport": null,
        "dport": null,
        "source": null,
        "source_ip_group": null,
        "dest": null,
        "dest_ip_group": null,
        "enabled": true
      },
      {
        "id": "23f9fb19-d43a-4144-af19-95348d88c247",
        "position": 1,
        "type": "in",
        "action": "ACCEPT",
        "macro": "SSH",
        "proto": null,
        "sport": null,
        "dport": null,
        "source": null,
        "source_ip_group": {
          "id": "145e6e6f-a6b0-4b9e-9060-2d4f017baff8",
          "name": "Sector C lab"
        },
        "dest": null,
        "dest_ip_group": null,
        "enabled": true
      },
      {
        "id": "97fd3850-8315-4eae-be31-4ef1211f6d76",
        "position": 2,
        "type": "in",
        "action": "ACCEPT",
        "macro": null,
        "proto": "tcp",
        "sport": null,
        "dport": "9100",
        "source": "10.24.0.0/24",
        "source_ip_group": null,
        "dest": null,
        "dest_ip_group": null,
        "enabled": true
      }
    ],
    "servers": [
      {
        "id": "ecc6f4f1-c89b-4dce-a20b-a330641c5b0b",
        "uuid_short": "ecc6f4f1",
        "name": "lambda-core",
        "hostname": "lambda-core.blackmesa.example.com",
        "template_name": "Ubuntu 24.04",
        "template_icon_url": "/assets/icons/ubuntu.png",
        "windows": false,
        "location": "Kansas City, MO",
        "address": "203.0.113.24",
        "synced_at": "2026-09-14T15:58:21+00:00",
        "sync_state": "pending",
        "sync_error": null,
        "is_current": true
      }
    ],
    "created_at": "2026-03-02T19:31:08+00:00"
  }
]

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Path parameters

serverstringrequired

The server uuid short

Body

application/json
groupsstring[]required

The value of groups.

At least 1 items

Response 200

application/json

The whole set, as a JSON array. There is no envelope and no paging.

idstringrequired

The id ID.

uuid_shortstringrequired

The first eight characters of the UUID. Either form can identify the group.

namestringrequired

The name shown to customers.

appliedbooleanrequired

Whether the group is applied to the requested server. Always false when no server was requested.

rulesobject[]required

The value of rules.

Show child attributes
idstringrequired

The id ID.

uuid_shortstringrequired

The first eight characters of the UUID. Either form can identify the rule.

positionintegerrequired

Where the rule sits in its group's top-down evaluation order.

typestringrequired

The type of operation or resource.

One of: in, out

actionstringrequired

The value of action.

One of: ACCEPT, DROP

macrostring | nullrequired

The value of macro.

protostring | nullrequired

The value of proto.

sportstring | nullrequired

The source port or port range this rule matches.

dportstring | nullrequired

The destination port or port range this rule matches.

sourcestring | nullrequired

The source address or network this rule matches.

source_ip_groupobject | nullrequired

The value of source_ip_group.

Show child attributes
idstringrequired

The id ID.

uuid_shortstringrequired

The value of uuid_short.

namestringrequired

The name shown to customers.

deststring | nullrequired

The value of dest.

dest_ip_groupobject | nullrequired

Set instead of dest when the rule's destination is an IP group.

Show child attributes
idstringrequired

The id ID.

uuid_shortstringrequired

The value of uuid_short.

namestringrequired

The name shown to customers.

enabledbooleanrequired

The value of enabled.

serversobject[]required

The value of servers.

Show child attributes
idstringrequired

The id ID.

uuid_shortstringrequired

The value of uuid_short.

namestringrequired

The name shown to customers.

hostnamestringrequired

The fully qualified hostname.

template_namestring | nullrequired

The value of template_name.

template_icon_urlstring | nullrequired

The value of template_icon_url.

windowsbooleanrequired

The value of windows.

locationstring | nullrequired

The value of location.

addressstring | nullrequired

The IP address assigned to the resource.

synced_atstring | nullrequired

The date and time for synced at, in UTC.

sync_statestringrequired

The value of sync_state.

One of: pending, synced, failed

sync_errorstring | nullrequired

The value of sync_error.

is_currentbooleanrequired

Whether this is the requested server.

created_atstring | nullrequired

The date and time for created at, in UTC.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
404
The resource was not found in the selected team. Resources in another account or team also return 404.
422
A field is missing or invalid, or the resource cannot accept this change in its current state. Check message for details. Field validation also includes an errors object keyed by field name.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.