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
| Field | Type | Description |
|---|---|---|
groups | Group[] | |
hosts | GroupHost[] | |
vpn | GroupVPN[] |
{
"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
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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
note | string | no |
{
"name": "string",
"note": ""
}Response 200 Successful Response · GroupsResponse
Response fields
| Field | Type | Description |
|---|---|---|
groups | Group[] | |
hosts | GroupHost[] | |
vpn | GroupVPN[] |
{
"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
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes |
Request body application/json · GroupModify
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
note | string | no | |
hosts | integer[] | no | |
vpn | string[] | no |
{
"name": "string",
"note": "string",
"hosts": [
0
],
"vpn": [
"string"
]
}Response 200 Successful Response · GroupsResponse
Response fields
| Field | Type | Description |
|---|---|---|
groups | Group[] | |
hosts | GroupHost[] | |
vpn | GroupVPN[] |
{
"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
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes |
Response 200 Successful Response · GroupsResponse
Response fields
| Field | Type | Description |
|---|---|---|
groups | Group[] | |
hosts | GroupHost[] | |
vpn | GroupVPN[] |
{
"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
curl -X DELETE 'https://YOUR-PANEL/api/groups/<name>' \
-H 'Authorization: Bearer $TOKEN'