[GH-ISSUE #2471] Incorrect API paths in web API router #1704

Closed
opened 2026-10-31 20:20:33 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @da-the-dev on GitHub (Aug 11, 2024).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2471

Describe the bug
The API path for getting inbounds is <panel_uri_path/panel/api/inbounds/list

Expected behavior
The API path for getting inbounds should be <panel_uri_path/api/inbounds/list

Screenshots
Non-applicable

Version (please complete the following information):

  • 3X-UI Version : [v2.3.12]
  • Xray Version : idk how to check, the latest version I guess

Additional context
I was looking for way to automate client creation and found a section in README about the API. I tested a couple of routes from the docs, and I have found out that they are a bit outdated. It seems that API routers in web/api.go use /panel in the beginning of their URIs. So in the end we end up with <panel_uri_path/panel/api/inbounds/list instead of <panel_uri_path/api/inbounds/list.

Checkout web/api.go line 22, this is the line that I think is responsible of the bug

Originally created by @da-the-dev on GitHub (Aug 11, 2024). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2471 **Describe the bug** The API path for getting inbounds is `<panel_uri_path/panel/api/inbounds/list` **Expected behavior** The API path for getting inbounds should be `<panel_uri_path/api/inbounds/list` **Screenshots** Non-applicable **Version (please complete the following information):** - 3X-UI Version : [v2.3.12] - Xray Version : idk how to check, the latest version I guess **Additional context** I was looking for way to automate client creation and found a section in README about the API. I tested a couple of routes from the docs, and I have found out that they are a bit outdated. It seems that API routers in `web/api.go` use `/panel` in the beginning of their URIs. So in the end we end up with `<panel_uri_path/panel/api/inbounds/list` instead of `<panel_uri_path/api/inbounds/list`. Checkout `web/api.go` line 22, this is the line that I think is responsible of the bug
bsakaguchi 2026-10-31 20:20:33 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@da-the-dev commented on GitHub (Aug 11, 2024):

Ok, this behavior is documented in the README, so I suppose this is intended, not a bug

<!-- gh-comment-id:2282351188 --> @da-the-dev commented on GitHub (Aug 11, 2024): Ok, this behavior is documented in the README, so I suppose this is intended, not a bug
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#1704
No description provided.