Docs / REST API / Groups

Groups API

Manage RADIUS groups and their membership. Groups hold shared check/reply attributes that apply to every member. All paths are under /api/v1.

Method Path Scope
GET /groups groups.read
GET /groups/{groupname} groups.read
POST /groups groups.write
DELETE /groups/{groupname} groups.write
POST /groups/{groupname}/members groups.write
DELETE /groups/{groupname}/members/{username} groups.write

List groups

GET /groupspaginated (page, size, search). Each item carries a live member count:

{
  "total": 4,
  "page": 1,
  "size": 50,
  "items": [ { "name": "premium", "member_count": 27 } ]
}

Get a group

GET /groups/{groupname} → the group's attributes and members:

{
  "name": "premium",
  "check_attrs": [ { "attribute": "Simultaneous-Use", "op": ":=", "value": "5" } ],
  "reply_attrs": [ { "attribute": "Framed-Pool", "op": ":=", "value": "customers" } ],
  "members": ["alice", "bob"]
}

A group is considered to exist if it has any check attribute, reply attribute, or member — otherwise you get 404.

Create a group

POST /groups201. Body: { "name": "premium" } (1–64 chars). New groups start with a single Fall-Through := No check attribute; add the rest in the UI or via FreeRADIUS. 409 if the name is taken.

curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
     -d '{"name":"premium"}' https://your-host/api/v1/groups

Attributes are managed in the UI

The API creates, deletes, and populates group membership, and reads a group's attributes — but it doesn't edit check/reply attributes. Manage those in Groups.

Delete a group

DELETE /groups/{groupname}204. Removes the group's check and reply attributes, every membership, and its access-type mapping. Users themselves aren't deleted — only their membership in this group.

Add a member

POST /groups/{groupname}/members201 { "ok": true }.

curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
     -d '{"username":"alice","priority":1}' \
     https://your-host/api/v1/groups/premium/members

priority (default 1) orders a user's groups when several apply. 409 if the user is already a member.

Remove a member

DELETE /groups/{groupname}/members/{username}204. 404 if the user isn't a member of that group.

  • Users — a user's groups are set at create/update time too
  • Groups (UI) — manage check/reply attributes