Skip to content

Groups ​

Inbound groups.

4 endpoints

GET /api/groups ​

List Groups

All host groups with their hosts and the admins limited to them

Sudo admin only

Response 200 Successful Response · GroupsResponse

Response fields
FieldTypeDescription
groupsGroup[]
hostsGroupHost[]
vpnGroupVPN[]
json
{
  "groups": [
    {
      "name": "string",
      "note": "",
      "hosts": [],
      "admins": [],
      "vpn": []
    }
  ],
  "hosts": [
    {
      "id": 0,
      "remark": "string",
      "address": "string",
      "inbound_tag": "string",
      "groups": [],
      "is_disabled": false
    }
  ],
  "vpn": []
}

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X GET 'https://YOUR-PANEL/api/groups' \
  -H 'Authorization: Bearer $TOKEN'

POST /api/groups ​

Create Group

Create an inbound group.

Sudo admin only

Request body application/json · GroupCreate

FieldTypeRequiredDescription
namestringyes
notestringno
json
{
  "name": "string",
  "note": ""
}

Response 200 Successful Response · GroupsResponse

Response fields
FieldTypeDescription
groupsGroup[]
hostsGroupHost[]
vpnGroupVPN[]
json
{
  "groups": [
    {
      "name": "string",
      "note": "",
      "hosts": [],
      "admins": [],
      "vpn": []
    }
  ],
  "hosts": [
    {
      "id": 0,
      "remark": "string",
      "address": "string",
      "inbound_tag": "string",
      "groups": [],
      "is_disabled": false
    }
  ],
  "vpn": []
}

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X POST 'https://YOUR-PANEL/api/groups' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "string", "note": ""}'

PUT /api/groups/{name} ​

Modify Group

Change a group's inbounds.

Sudo admin only

Parameters

NameInTypeRequiredDescription
namepathstringyes

Request body application/json · GroupModify

FieldTypeRequiredDescription
namestringno
notestringno
hostsinteger[]no
vpnstring[]no
json
{
  "name": "string",
  "note": "string",
  "hosts": [
    0
  ],
  "vpn": [
    "string"
  ]
}

Response 200 Successful Response · GroupsResponse

Response fields
FieldTypeDescription
groupsGroup[]
hostsGroupHost[]
vpnGroupVPN[]
json
{
  "groups": [
    {
      "name": "string",
      "note": "",
      "hosts": [],
      "admins": [],
      "vpn": []
    }
  ],
  "hosts": [
    {
      "id": 0,
      "remark": "string",
      "address": "string",
      "inbound_tag": "string",
      "groups": [],
      "is_disabled": false
    }
  ],
  "vpn": []
}

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X PUT 'https://YOUR-PANEL/api/groups/<name>' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "string", "note": "string", "hosts": [0], "vpn": ["string"]}'

DELETE /api/groups/{name} ​

Delete Group

Delete a group. Its hosts become ungrouped and admins lose the group.

Sudo admin only

Parameters

NameInTypeRequiredDescription
namepathstringyes

Response 200 Successful Response · GroupsResponse

Response fields
FieldTypeDescription
groupsGroup[]
hostsGroupHost[]
vpnGroupVPN[]
json
{
  "groups": [
    {
      "name": "string",
      "note": "",
      "hosts": [],
      "admins": [],
      "vpn": []
    }
  ],
  "hosts": [
    {
      "id": 0,
      "remark": "string",
      "address": "string",
      "inbound_tag": "string",
      "groups": [],
      "is_disabled": false
    }
  ],
  "vpn": []
}

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X DELETE 'https://YOUR-PANEL/api/groups/<name>' \
  -H 'Authorization: Bearer $TOKEN'

Alexen v2.3.14 · 204 API endpoints