[GH-ISSUE #3248] Question : API #2201

Closed
opened 2026-10-31 20:23:54 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Golden-Source on GitHub (Jul 18, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3248

Question

Hello,

We plan to develop an API for the panel, but we face an issue: if we consider one inbound with multiple users, the output does not provide the consumption details for each user.

{
"success": true,
"msg": "",
"obj": {
"id": 1,
"up": 20930403009,
"down": 282122465782,
"total": 0,
"remark": "saeed",
"enable": true,
"expiryTime": 0,
"clientStats": null,
"listen": "",
"port": 12827,
"protocol": "vless",
"settings": "{\n "clients": [\n {\n "comment": "",\n "email": "ialc5fk1",\n "enable": true,\n "expiryTime": 0,\n "flow": "",\n "id": "0c0d65a1-3353-42a6-8534-8ae0fb8d42b9",\n "limitIp": 0,\n "reset": 0,\n "subId": "xpwqdshdkuhdb64b",\n "tgId": "",\n "totalGB": 0\n },\n {\n "comment": "",\n "email": "dorsa",\n "enable": true,\n "expiryTime": 0,\n "flow": "",\n "id": "4bd38d15-ceed-4482-b2b8-799f63c71ec7",\n "limitIp": 0,\n "reset": 0,\n "subId": "h3ex1ygjzotjwy8h",\n "tgId": "",\n "totalGB": 10737418240\n },\n {\n "comment": "",\n "email": "amir",\n "enable": true,\n "expiryTime": 0,\n "flow": "",\n "id": "bebe8f4a-f229-4ff9-8b1c-32d7bae4a93f",\n "limitIp": 0,\n "reset": 0,\n "subId": "r9pwf5qgnxggxh90",\n "tgId": "",\n "totalGB": 0\n },\n {\n "comment": "",\n "email": "dr4co8o3",\n "enable": true,\n "expiryTime": 1753865705000,\n "flow": "",\n "id": "6c286f4e-a18e-4cb6-91bf-2df24e0b5eb6",\n "limitIp": 0,\n "reset": 0,\n "subId": "5tfo80gz3vbcc9dy",\n "tgId": "",\n "totalGB": 21474836480\n }\n ],\n "decryption": "none",\n "fallbacks": []\n}",
"streamSettings": "{\n "network": "tcp",\n "security": "none",\n "externalProxy": [],\n "tcpSettings": {\n "acceptProxyProtocol": false,\n "header": {\n "type": "none"\n }\n }\n}",
"tag": "inbound-12827",
"sniffing": "{\n "enabled": false,\n "destOverride": [\n "http",\n "tls",\n "quic",\n "fakedns"\n ],\n "metadataOnly": false,\n "routeOnly": false\n}",
"allocate": "{\n "strategy": "always",\n "refresh": 5,\n "concurrency": 3\n}"
}
}
If we have around 500 users, we encounter request limit issues. How can we resolve this?

Additionally, while creating a user for VLESS requires sending data in JSON format, how should an inbound for WireGuard be created?

Checklist

  • This question is written entirely in English.
Originally created by @Golden-Source on GitHub (Jul 18, 2025). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3248 ### Question Hello, We plan to develop an API for the panel, but we face an issue: if we consider one inbound with multiple users, the output does not provide the consumption details for each user. { "success": true, "msg": "", "obj": { "id": 1, "up": 20930403009, "down": 282122465782, "total": 0, "remark": "saeed", "enable": true, "expiryTime": 0, "clientStats": null, "listen": "", "port": 12827, "protocol": "vless", "settings": "{\n \"clients\": [\n {\n \"comment\": \"\",\n \"email\": \"ialc5fk1\",\n \"enable\": true,\n \"expiryTime\": 0,\n \"flow\": \"\",\n \"id\": \"0c0d65a1-3353-42a6-8534-8ae0fb8d42b9\",\n \"limitIp\": 0,\n \"reset\": 0,\n \"subId\": \"xpwqdshdkuhdb64b\",\n \"tgId\": \"\",\n \"totalGB\": 0\n },\n {\n \"comment\": \"\",\n \"email\": \"dorsa\",\n \"enable\": true,\n \"expiryTime\": 0,\n \"flow\": \"\",\n \"id\": \"4bd38d15-ceed-4482-b2b8-799f63c71ec7\",\n \"limitIp\": 0,\n \"reset\": 0,\n \"subId\": \"h3ex1ygjzotjwy8h\",\n \"tgId\": \"\",\n \"totalGB\": 10737418240\n },\n {\n \"comment\": \"\",\n \"email\": \"amir\",\n \"enable\": true,\n \"expiryTime\": 0,\n \"flow\": \"\",\n \"id\": \"bebe8f4a-f229-4ff9-8b1c-32d7bae4a93f\",\n \"limitIp\": 0,\n \"reset\": 0,\n \"subId\": \"r9pwf5qgnxggxh90\",\n \"tgId\": \"\",\n \"totalGB\": 0\n },\n {\n \"comment\": \"\",\n \"email\": \"dr4co8o3\",\n \"enable\": true,\n \"expiryTime\": 1753865705000,\n \"flow\": \"\",\n \"id\": \"6c286f4e-a18e-4cb6-91bf-2df24e0b5eb6\",\n \"limitIp\": 0,\n \"reset\": 0,\n \"subId\": \"5tfo80gz3vbcc9dy\",\n \"tgId\": \"\",\n \"totalGB\": 21474836480\n }\n ],\n \"decryption\": \"none\",\n \"fallbacks\": []\n}", "streamSettings": "{\n \"network\": \"tcp\",\n \"security\": \"none\",\n \"externalProxy\": [],\n \"tcpSettings\": {\n \"acceptProxyProtocol\": false,\n \"header\": {\n \"type\": \"none\"\n }\n }\n}", "tag": "inbound-12827", "sniffing": "{\n \"enabled\": false,\n \"destOverride\": [\n \"http\",\n \"tls\",\n \"quic\",\n \"fakedns\"\n ],\n \"metadataOnly\": false,\n \"routeOnly\": false\n}", "allocate": "{\n \"strategy\": \"always\",\n \"refresh\": 5,\n \"concurrency\": 3\n}" } } If we have around 500 users, we encounter request limit issues. How can we resolve this? Additionally, while creating a user for VLESS requires sending data in JSON format, how should an inbound for WireGuard be created? ### Checklist - [x] This question is written entirely in English.
bsakaguchi 2026-10-31 20:23:54 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@4rrowSwift commented on GitHub (Jul 29, 2025):

столкнулся с такой же проблемой, мне необходим clientStats в /panel/api/inbounds/get/{inboundId}

<!-- gh-comment-id:3132523285 --> @4rrowSwift commented on GitHub (Jul 29, 2025): столкнулся с такой же проблемой, мне необходим clientStats в /panel/api/inbounds/get/{inboundId}
Author
Owner

@batonogov commented on GitHub (Apr 27, 2026):

Если clientStats в /panel/api/inbounds/list или /panel/api/inbounds/get/:id приходит null — он действительно заполняется не всегда. Стабильно работает другой эндпоинт: /panel/api/inbounds/getClientTraffics/:email — он возвращает up/down/total по конкретному клиенту.

Если строишь своё API поверх 3x-ui — можно подсмотреть реализацию на Go: Client.GetClientTrafficsByEmail в моём Terraform-провайдере для 3x-ui: https://github.com/batonogov/terraform-provider-threexui/blob/main/provider/client.go

<!-- gh-comment-id:4327421405 --> @batonogov commented on GitHub (Apr 27, 2026): Если `clientStats` в `/panel/api/inbounds/list` или `/panel/api/inbounds/get/:id` приходит `null` — он действительно заполняется не всегда. Стабильно работает другой эндпоинт: `/panel/api/inbounds/getClientTraffics/:email` — он возвращает up/down/total по конкретному клиенту. Если строишь своё API поверх 3x-ui — можно подсмотреть реализацию на Go: `Client.GetClientTrafficsByEmail` в моём Terraform-провайдере для 3x-ui: https://github.com/batonogov/terraform-provider-threexui/blob/main/provider/client.go
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#2201
No description provided.