mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-04 16:34:52 +03:00
fix(groups): page client dialogs and submit server-resolved scopes
Keep group client tables and bulk requests bounded with paged queries, frozen selections, and a streamed subscription export. Reuse existing bulk mutations and preserve the explicit-email contracts.
This commit is contained in:
@@ -183,11 +183,9 @@ _openapi:
|
||||
changed count and per-email skip reasons.
|
||||
url: '#disable-many-clients-in-one-call-emails-are-grouped-by-inbound-and-applied-with-a-single-read-modify-write-per-inbound-the-running-xray-local-or-remote-node-is-updated-to-remove-each-user-returns-the-changed-count-and-per-email-skip-reasons'
|
||||
- depth: 2
|
||||
title: Delete many clients in one call. The server processes the list
|
||||
sequentially so each delete sees the committed state of the previous one
|
||||
— avoids the race the per-email fan-out had on the panel side. Pass
|
||||
keepTraffic=true to retain the xray_client_traffic rows after deletion.
|
||||
url: '#delete-many-clients-in-one-call-the-server-processes-the-list-sequentially-so-each-delete-sees-the-committed-state-of-the-previous-one--avoids-the-race-the-per-email-fan-out-had-on-the-panel-side-pass-keeptraffictrue-to-retain-the-xray_client_traffic-rows-after-deletion'
|
||||
title: Delete clients identified by emails or by a server-resolved group. Set
|
||||
keepTraffic to retain client counters.
|
||||
url: '#delete-clients-identified-by-emails-or-by-a-server-resolved-group-set-keeptraffic-to-retain-client-counters'
|
||||
- depth: 2
|
||||
title: Create many clients in one call. Body is a JSON array of {client,
|
||||
inboundIds} payloads — the same shape /add accepts. Items are processed
|
||||
@@ -196,18 +194,13 @@ _openapi:
|
||||
any inbound was running.
|
||||
url: '#create-many-clients-in-one-call-body-is-a-json-array-of-client-inboundids-payloads--the-same-shape-add-accepts-items-are-processed-sequentially-per-email-skip-reasons-are-returned-for-items-that-fail-eg-duplicate-email-triggers-a-single-xray-restart-at-the-end-if-any-inbound-was-running'
|
||||
- depth: 2
|
||||
title: Add many clients to a group in one call. Updates clients.group_name and
|
||||
patches the matching client entry inside every owning inbound's settings
|
||||
JSON in a single transaction. If the group name does not yet exist (in
|
||||
client_groups or as a derived label), it is auto-created as a persistent
|
||||
group. To clear the group label, use /groups/bulkRemove instead.
|
||||
url: '#add-many-clients-to-a-group-in-one-call-updates-clientsgroup_name-and-patches-the-matching-client-entry-inside-every-owning-inbounds-settings-json-in-a-single-transaction-if-the-group-name-does-not-yet-exist-in-client_groups-or-as-a-derived-label-it-is-auto-created-as-a-persistent-group-to-clear-the-group-label-use-groupsbulkremove-instead'
|
||||
title: Move clients into a group and update every owning inbound's settings in
|
||||
the same transaction.
|
||||
url: '#move-clients-into-a-group-and-update-every-owning-inbounds-settings-in-the-same-transaction'
|
||||
- depth: 2
|
||||
title: Clear the group label on many clients in one call. Inverse of
|
||||
/groups/bulkAdd. Clients themselves are kept — only the group label is
|
||||
cleared from clients.group_name and from each owning inbound's settings
|
||||
JSON. Groups become empty if all their members are removed.
|
||||
url: '#clear-the-group-label-on-many-clients-in-one-call-inverse-of-groupsbulkadd-clients-themselves-are-kept--only-the-group-label-is-cleared-from-clientsgroup_name-and-from-each-owning-inbounds-settings-json-groups-become-empty-if-all-their-members-are-removed'
|
||||
title: Clear group membership and preserve the clients. Use either emails or a
|
||||
selection scoped to the named group.
|
||||
url: '#clear-group-membership-and-preserve-the-clients-use-either-emails-or-a-selection-scoped-to-the-named-group'
|
||||
- depth: 2
|
||||
title: Attach many existing clients to many inbounds in one call. Each client
|
||||
keeps its identity (email/UUID/password/subId) and a shared traffic row;
|
||||
@@ -258,6 +251,14 @@ _openapi:
|
||||
other clients are unaffected. An empty array clears the bindings.
|
||||
Returns the saved host group IDs.
|
||||
url: '#replace-the-host-groups-attached-to-a-client-group-clients-in-this-group-receive-the-bound-host-groups-instead-of-the-inbound-default-host-pool-other-clients-are-unaffected-an-empty-array-clears-the-bindings-returns-the-saved-host-group-ids'
|
||||
- depth: 2
|
||||
title: Page through group candidates, members or subscription IDs. Pages are
|
||||
one-based with a fixed size of 100 and an exact total.
|
||||
url: '#page-through-group-candidates-members-or-subscription-ids-pages-are-one-based-with-a-fixed-size-of-100-and-an-exact-total'
|
||||
- depth: 2
|
||||
title: Stream all subscription links for a group as tab-separated text. Each row
|
||||
has an email and regular link, followed by a JSON link when enabled.
|
||||
url: '#stream-all-subscription-links-for-a-group-as-tab-separated-text-each-row-has-an-email-and-regular-link-followed-by-a-json-link-when-enabled'
|
||||
- depth: 2
|
||||
title: Return just the email list of clients that currently belong to the given
|
||||
group. Useful for fanning a single bulk action over an entire group
|
||||
@@ -548,30 +549,21 @@ _openapi:
|
||||
(local or remote node) is updated to remove each user. Returns the
|
||||
changed count and per-email skip reasons.
|
||||
id: disable-many-clients-in-one-call-emails-are-grouped-by-inbound-and-applied-with-a-single-read-modify-write-per-inbound-the-running-xray-local-or-remote-node-is-updated-to-remove-each-user-returns-the-changed-count-and-per-email-skip-reasons
|
||||
- content: Delete many clients in one call. The server processes the list
|
||||
sequentially so each delete sees the committed state of the previous
|
||||
one — avoids the race the per-email fan-out had on the panel side.
|
||||
Pass keepTraffic=true to retain the xray_client_traffic rows after
|
||||
deletion.
|
||||
id: delete-many-clients-in-one-call-the-server-processes-the-list-sequentially-so-each-delete-sees-the-committed-state-of-the-previous-one--avoids-the-race-the-per-email-fan-out-had-on-the-panel-side-pass-keeptraffictrue-to-retain-the-xray_client_traffic-rows-after-deletion
|
||||
- content: Delete clients identified by emails or by a server-resolved group. Set
|
||||
keepTraffic to retain client counters.
|
||||
id: delete-clients-identified-by-emails-or-by-a-server-resolved-group-set-keeptraffic-to-retain-client-counters
|
||||
- content: Create many clients in one call. Body is a JSON array of {client,
|
||||
inboundIds} payloads — the same shape /add accepts. Items are
|
||||
processed sequentially; per-email skip reasons are returned for items
|
||||
that fail (e.g., duplicate email). Triggers a single Xray restart at
|
||||
the end if any inbound was running.
|
||||
id: create-many-clients-in-one-call-body-is-a-json-array-of-client-inboundids-payloads--the-same-shape-add-accepts-items-are-processed-sequentially-per-email-skip-reasons-are-returned-for-items-that-fail-eg-duplicate-email-triggers-a-single-xray-restart-at-the-end-if-any-inbound-was-running
|
||||
- content: Add many clients to a group in one call. Updates clients.group_name and
|
||||
patches the matching client entry inside every owning inbound's
|
||||
settings JSON in a single transaction. If the group name does not yet
|
||||
exist (in client_groups or as a derived label), it is auto-created as
|
||||
a persistent group. To clear the group label, use /groups/bulkRemove
|
||||
instead.
|
||||
id: add-many-clients-to-a-group-in-one-call-updates-clientsgroup_name-and-patches-the-matching-client-entry-inside-every-owning-inbounds-settings-json-in-a-single-transaction-if-the-group-name-does-not-yet-exist-in-client_groups-or-as-a-derived-label-it-is-auto-created-as-a-persistent-group-to-clear-the-group-label-use-groupsbulkremove-instead
|
||||
- content: Clear the group label on many clients in one call. Inverse of
|
||||
/groups/bulkAdd. Clients themselves are kept — only the group label is
|
||||
cleared from clients.group_name and from each owning inbound's
|
||||
settings JSON. Groups become empty if all their members are removed.
|
||||
id: clear-the-group-label-on-many-clients-in-one-call-inverse-of-groupsbulkadd-clients-themselves-are-kept--only-the-group-label-is-cleared-from-clientsgroup_name-and-from-each-owning-inbounds-settings-json-groups-become-empty-if-all-their-members-are-removed
|
||||
- content: Move clients into a group and update every owning inbound's settings in
|
||||
the same transaction.
|
||||
id: move-clients-into-a-group-and-update-every-owning-inbounds-settings-in-the-same-transaction
|
||||
- content: Clear group membership and preserve the clients. Use either emails or a
|
||||
selection scoped to the named group.
|
||||
id: clear-group-membership-and-preserve-the-clients-use-either-emails-or-a-selection-scoped-to-the-named-group
|
||||
- content: Attach many existing clients to many inbounds in one call. Each client
|
||||
keeps its identity (email/UUID/password/subId) and a shared traffic
|
||||
row; all clients are added to a target inbound in a single
|
||||
@@ -616,6 +608,13 @@ _openapi:
|
||||
host pool; other clients are unaffected. An empty array clears the
|
||||
bindings. Returns the saved host group IDs.
|
||||
id: replace-the-host-groups-attached-to-a-client-group-clients-in-this-group-receive-the-bound-host-groups-instead-of-the-inbound-default-host-pool-other-clients-are-unaffected-an-empty-array-clears-the-bindings-returns-the-saved-host-group-ids
|
||||
- content: Page through group candidates, members or subscription IDs. Pages are
|
||||
one-based with a fixed size of 100 and an exact total.
|
||||
id: page-through-group-candidates-members-or-subscription-ids-pages-are-one-based-with-a-fixed-size-of-100-and-an-exact-total
|
||||
- content: Stream all subscription links for a group as tab-separated text. Each
|
||||
row has an email and regular link, followed by a JSON link when
|
||||
enabled.
|
||||
id: stream-all-subscription-links-for-a-group-as-tab-separated-text-each-row-has-an-email-and-regular-link-followed-by-a-json-link-when-enabled
|
||||
- content: Return just the email list of clients that currently belong to the
|
||||
given group. Useful for fanning a single bulk action over an entire
|
||||
group without round-tripping the full client list.
|
||||
@@ -909,6 +908,35 @@ _openapi:
|
||||
previously downloaded configuration loses access after the
|
||||
configuration is applied.
|
||||
heading: delete-an-additional-wireguard-device-and-release-its-address
|
||||
- content: Send emails for explicit clients or group for server-resolved members.
|
||||
Optionally send an unfiltered remove scopeToken from clientPage to
|
||||
reject stale membership while excluding clients created after the
|
||||
scope was frozen. Group responses include skippedCount when clients
|
||||
are skipped and at most 20 representative skip records.
|
||||
heading: shift-expiry-andor-traffic-quota-for-many-clients-in-one-call-adddaysaddbytes-may-be-negative-clients-with-unlimited-expiry-expirytime0-or-unlimited-traffic-totalgb0-are-skipped-for-the-corresponding-field--bulk-extend-never-converts-unlimited-to-limited-a-client-that-was-auto-disabled-solely-because-it-was-depleted-expired-or-over-quota-is-automatically-re-enabled--locally-and-on-its-node--when-the-adjustment-lifts-it-out-of-depletion-a-manually-disabled-or-still-depleted-client-is-left-disabled-the-optional-flow-directive-sets-the-xtls-flow-on-every-client-none-clears-it-xtls-rprx-visionxtls-rprx-vision-udp443-set-it-where-the-inbound-supports-it-omit-or--to-leave-it-unchanged-the-optional-limithwid-sets-maximum-registered-devices-0--unlimited-the-optional-adtag-sets-mtproto-telegram-sponsor-channel-none-clears-alternatively-send-externallinks-to-append-external-share-links-and-https-subscriptions-to-each-selected-client-in-one-transaction-this-mode-cannot-be-combined-with-other-adjustments-existing-entries-metadata-and-ordering-are-preserved-duplicates-match-kind-value-per-client-including-repeated-input-rows-the-first-entry-wins-missing-clients-are-not-written-and-appear-in-skipped-externallinksadded-counts-inserted-rows-externallinksskipped-counts-duplicate-rows-across-found-clients-externallinkserrors-counts-missing-clients-and-adjusted-counts-clients-receiving-at-least-one-new-row-validation-or-database-failure-aborts-the-whole-append-without-writes-repeating-an-append-is-idempotent-and-does-not-restart-xray
|
||||
- content: For group deletion, optionally send an unfiltered remove scopeToken
|
||||
from clientPage to reject stale membership before deletion. Newer
|
||||
clients outside the frozen scope are excluded. Group responses include
|
||||
skippedCount when clients are skipped and at most 20 representative
|
||||
skip records.
|
||||
heading: delete-clients-identified-by-emails-or-by-a-server-resolved-group-set-keeptraffic-to-retain-client-counters
|
||||
- content: Send one of emails, inboundId, or selection with the target group.
|
||||
Emails and inboundId can create the group. A picker selection targets
|
||||
an existing group and excludes current members. Explicit selections
|
||||
use clientIds. Frozen selections use scopeToken, the original search
|
||||
and up to 1,000 excludedClientIds. A stale selection makes no changes.
|
||||
heading: move-clients-into-a-group-and-update-every-owning-inbounds-settings-in-the-same-transaction
|
||||
- content: Explicit selections use clientIds. Frozen selections use scopeToken,
|
||||
the original search and up to 1,000 excludedClientIds. Only members of
|
||||
the selected group are eligible. A stale selection makes no changes.
|
||||
heading: clear-group-membership-and-preserve-the-clients-use-either-emails-or-a-selection-scoped-to-the-named-group
|
||||
- content: Add mode excludes current members. Remove mode selects current members.
|
||||
Links mode selects members with a subscription ID. Search matches
|
||||
email, comment and group. freeze=true returns only the matching count,
|
||||
a scope token and the maximum ID for an add or remove selection. For
|
||||
subsequent pages, send maxId and scopeSearch to mark rows inside the
|
||||
frozen filter.
|
||||
heading: page-through-group-candidates-members-or-subscription-ids-pages-are-one-based-with-a-fixed-size-of-100-and-an-exact-total
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
@@ -918,7 +946,7 @@ export default function Layout(props) {
|
||||
return (
|
||||
<>
|
||||
{props.children}
|
||||
<OpenAPIPage document="./public/openapi.json" webhooks={[]} operations={[{"path":"/panel/api/clients/list","method":"get"},{"path":"/panel/api/clients/attachCandidates","method":"get"},{"path":"/panel/api/clients/list/paged","method":"get"},{"path":"/panel/api/clients/get/{email}","method":"get"},{"path":"/panel/api/clients/get","method":"get"},{"path":"/panel/api/clients/get/subId/{subId}","method":"get"},{"path":"/panel/api/clients/get/tgId/{tgId}","method":"get"},{"path":"/panel/api/clients/add","method":"post"},{"path":"/panel/api/clients/renewalPreview","method":"post"},{"path":"/panel/api/clients/update/{email}","method":"post"},{"path":"/panel/api/clients/update","method":"post"},{"path":"/panel/api/clients/del/{email}","method":"post"},{"path":"/panel/api/clients/del","method":"post"},{"path":"/panel/api/clients/{email}/attach","method":"post"},{"path":"/panel/api/clients/{email}/detach","method":"post"},{"path":"/panel/api/clients/{email}/externalLinks","method":"post"},{"path":"/panel/api/clients/wireguardDevices","method":"get"},{"path":"/panel/api/clients/wireguardDevices","method":"post"},{"path":"/panel/api/clients/wireguardDevices/limit","method":"put"},{"path":"/panel/api/clients/wireguardDevices/{deviceId}","method":"patch"},{"path":"/panel/api/clients/wireguardDevices/{deviceId}","method":"delete"},{"path":"/panel/api/clients/resetAllTraffics","method":"post"},{"path":"/panel/api/clients/delDepleted","method":"post"},{"path":"/panel/api/clients/delOrphans","method":"post"},{"path":"/panel/api/clients/export","method":"get"},{"path":"/panel/api/clients/import","method":"post"},{"path":"/panel/api/clients/bulkAdjust","method":"post"},{"path":"/panel/api/clients/bulkEnable","method":"post"},{"path":"/panel/api/clients/bulkDisable","method":"post"},{"path":"/panel/api/clients/bulkDel","method":"post"},{"path":"/panel/api/clients/bulkCreate","method":"post"},{"path":"/panel/api/clients/groups/bulkAdd","method":"post"},{"path":"/panel/api/clients/groups/bulkRemove","method":"post"},{"path":"/panel/api/clients/bulkAttach","method":"post"},{"path":"/panel/api/clients/bulkAttach/{id}","method":"get"},{"path":"/panel/api/clients/bulkDetach","method":"post"},{"path":"/panel/api/clients/bulkResetTraffic","method":"post"},{"path":"/panel/api/clients/groups","method":"get"},{"path":"/panel/api/clients/groups/{name}/hosts","method":"post"},{"path":"/panel/api/clients/groups/{name}/emails","method":"get"},{"path":"/panel/api/clients/groups/create","method":"post"},{"path":"/panel/api/clients/groups/rename","method":"post"},{"path":"/panel/api/clients/groups/delete","method":"post"},{"path":"/panel/api/clients/groups/resetTraffic","method":"post"},{"path":"/panel/api/clients/resetTraffic/{email}","method":"post"},{"path":"/panel/api/clients/updateTraffic/{email}","method":"post"},{"path":"/panel/api/clients/ips/{email}","method":"post"},{"path":"/panel/api/clients/clearIps/{email}","method":"post"},{"path":"/panel/api/clients/hwids/{email}","method":"post"},{"path":"/panel/api/clients/hwids/{email}","method":"delete"},{"path":"/panel/api/clients/hwids/{email}/{id}","method":"delete"},{"path":"/panel/api/clients/hwids/{email}/{id}/block","method":"post"},{"path":"/panel/api/clients/onlines","method":"post"},{"path":"/panel/api/clients/onlinesByGuid","method":"post"},{"path":"/panel/api/clients/clientIpsByGuid","method":"post"},{"path":"/panel/api/clients/activeInbounds","method":"post"},{"path":"/panel/api/clients/lastOnline","method":"post"},{"path":"/panel/api/clients/traffic/{email}","method":"get"},{"path":"/panel/api/clients/usageHistory/{email}","method":"get"},{"path":"/panel/api/clients/subLinks/{subId}","method":"get"},{"path":"/panel/api/clients/happLink/{id}","method":"post"},{"path":"/panel/api/clients/links/{email}","method":"get"}]} showTitle />
|
||||
<OpenAPIPage document="./public/openapi.json" webhooks={[]} operations={[{"path":"/panel/api/clients/list","method":"get"},{"path":"/panel/api/clients/attachCandidates","method":"get"},{"path":"/panel/api/clients/list/paged","method":"get"},{"path":"/panel/api/clients/get/{email}","method":"get"},{"path":"/panel/api/clients/get","method":"get"},{"path":"/panel/api/clients/get/subId/{subId}","method":"get"},{"path":"/panel/api/clients/get/tgId/{tgId}","method":"get"},{"path":"/panel/api/clients/add","method":"post"},{"path":"/panel/api/clients/renewalPreview","method":"post"},{"path":"/panel/api/clients/update/{email}","method":"post"},{"path":"/panel/api/clients/update","method":"post"},{"path":"/panel/api/clients/del/{email}","method":"post"},{"path":"/panel/api/clients/del","method":"post"},{"path":"/panel/api/clients/{email}/attach","method":"post"},{"path":"/panel/api/clients/{email}/detach","method":"post"},{"path":"/panel/api/clients/{email}/externalLinks","method":"post"},{"path":"/panel/api/clients/wireguardDevices","method":"get"},{"path":"/panel/api/clients/wireguardDevices","method":"post"},{"path":"/panel/api/clients/wireguardDevices/limit","method":"put"},{"path":"/panel/api/clients/wireguardDevices/{deviceId}","method":"patch"},{"path":"/panel/api/clients/wireguardDevices/{deviceId}","method":"delete"},{"path":"/panel/api/clients/resetAllTraffics","method":"post"},{"path":"/panel/api/clients/delDepleted","method":"post"},{"path":"/panel/api/clients/delOrphans","method":"post"},{"path":"/panel/api/clients/export","method":"get"},{"path":"/panel/api/clients/import","method":"post"},{"path":"/panel/api/clients/bulkAdjust","method":"post"},{"path":"/panel/api/clients/bulkEnable","method":"post"},{"path":"/panel/api/clients/bulkDisable","method":"post"},{"path":"/panel/api/clients/bulkDel","method":"post"},{"path":"/panel/api/clients/bulkCreate","method":"post"},{"path":"/panel/api/clients/groups/bulkAdd","method":"post"},{"path":"/panel/api/clients/groups/bulkRemove","method":"post"},{"path":"/panel/api/clients/bulkAttach","method":"post"},{"path":"/panel/api/clients/bulkAttach/{id}","method":"get"},{"path":"/panel/api/clients/bulkDetach","method":"post"},{"path":"/panel/api/clients/bulkResetTraffic","method":"post"},{"path":"/panel/api/clients/groups","method":"get"},{"path":"/panel/api/clients/groups/{name}/hosts","method":"post"},{"path":"/panel/api/clients/groups/clientPage","method":"get"},{"path":"/panel/api/clients/groups/subLinks/export","method":"get"},{"path":"/panel/api/clients/groups/{name}/emails","method":"get"},{"path":"/panel/api/clients/groups/create","method":"post"},{"path":"/panel/api/clients/groups/rename","method":"post"},{"path":"/panel/api/clients/groups/delete","method":"post"},{"path":"/panel/api/clients/groups/resetTraffic","method":"post"},{"path":"/panel/api/clients/resetTraffic/{email}","method":"post"},{"path":"/panel/api/clients/updateTraffic/{email}","method":"post"},{"path":"/panel/api/clients/ips/{email}","method":"post"},{"path":"/panel/api/clients/clearIps/{email}","method":"post"},{"path":"/panel/api/clients/hwids/{email}","method":"post"},{"path":"/panel/api/clients/hwids/{email}","method":"delete"},{"path":"/panel/api/clients/hwids/{email}/{id}","method":"delete"},{"path":"/panel/api/clients/hwids/{email}/{id}/block","method":"post"},{"path":"/panel/api/clients/onlines","method":"post"},{"path":"/panel/api/clients/onlinesByGuid","method":"post"},{"path":"/panel/api/clients/clientIpsByGuid","method":"post"},{"path":"/panel/api/clients/activeInbounds","method":"post"},{"path":"/panel/api/clients/lastOnline","method":"post"},{"path":"/panel/api/clients/traffic/{email}","method":"get"},{"path":"/panel/api/clients/usageHistory/{email}","method":"get"},{"path":"/panel/api/clients/subLinks/{subId}","method":"get"},{"path":"/panel/api/clients/happLink/{id}","method":"post"},{"path":"/panel/api/clients/links/{email}","method":"get"}]} showTitle />
|
||||
</>
|
||||
);
|
||||
}
|
||||
+434
-19
@@ -2120,6 +2120,10 @@
|
||||
"$ref": "#/components/schemas/BulkAdjustReport"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"skippedCount": {
|
||||
"example": 0,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -2127,6 +2131,43 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"BulkDeleteReport": {
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"email",
|
||||
"reason"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"BulkDeleteResult": {
|
||||
"description": "BulkDeleteResult mirrors BulkAdjustResult: total deleted plus per-email\nskip reasons when an email could not be processed.",
|
||||
"properties": {
|
||||
"deleted": {
|
||||
"type": "integer"
|
||||
},
|
||||
"skipped": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/BulkDeleteReport"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"skippedCount": {
|
||||
"example": 0,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"deleted"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"BulkExternalLinksResult": {
|
||||
"properties": {
|
||||
"added": {
|
||||
@@ -3354,6 +3395,104 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GroupClientPage": {
|
||||
"properties": {
|
||||
"items": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/GroupClientRow"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"maxId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"scopeToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"total": {
|
||||
"example": 120,
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"items",
|
||||
"total"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GroupClientRow": {
|
||||
"properties": {
|
||||
"comment": {
|
||||
"example": "Example client",
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"example": "alice",
|
||||
"type": "string"
|
||||
},
|
||||
"enable": {
|
||||
"example": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"group": {
|
||||
"example": "staff",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"example": 1,
|
||||
"type": "integer"
|
||||
},
|
||||
"inScope": {
|
||||
"example": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"subId": {
|
||||
"example": "example-sub-id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"comment",
|
||||
"email",
|
||||
"enable",
|
||||
"group",
|
||||
"id",
|
||||
"inScope",
|
||||
"subId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GroupClientSelection": {
|
||||
"properties": {
|
||||
"clientIds": {
|
||||
"items": {
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"excludedClientIds": {
|
||||
"items": {
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"mode": {
|
||||
"example": "allMatching",
|
||||
"type": "string"
|
||||
},
|
||||
"scopeToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"search": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"HappLinkResult": {
|
||||
"properties": {
|
||||
"encryptedLink": {
|
||||
@@ -11862,14 +12001,24 @@
|
||||
],
|
||||
"summary": "Shift expiry and/or traffic quota for many clients in one call. addDays/addBytes may be negative. Clients with unlimited expiry (expiryTime=0) or unlimited traffic (totalGB=0) are skipped for the corresponding field — bulk extend never converts unlimited to limited. A client that was auto-disabled solely because it was depleted (expired or over quota) is automatically re-enabled — locally and on its node — when the adjustment lifts it out of depletion; a manually-disabled or still-depleted client is left disabled. The optional flow directive sets the XTLS flow on every client: \"none\" clears it, \"xtls-rprx-vision\"/\"xtls-rprx-vision-udp443\" set it where the inbound supports it (omit or \"\" to leave it unchanged). The optional limitHwid sets maximum registered devices (0 = unlimited). The optional adTag sets MTProto Telegram sponsor channel (\"none\" clears). Alternatively, send externalLinks to append external share links and http(s) subscriptions to each selected client in one transaction. This mode cannot be combined with other adjustments. Existing entries, metadata, and ordering are preserved. Duplicates match (kind, value) per client, including repeated input rows; the first entry wins. Missing clients are not written and appear in skipped. externalLinks.added counts inserted rows, externalLinks.skipped counts duplicate rows across found clients, externalLinks.errors counts missing clients, and adjusted counts clients receiving at least one new row. Validation or database failure aborts the whole append without writes. Repeating an append is idempotent and does not restart Xray.",
|
||||
"operationId": "post_panel_api_clients_bulkAdjust",
|
||||
"description": "Send emails for explicit clients or group for server-resolved members. Optionally send an unfiltered remove scopeToken from clientPage to reject stale membership while excluding clients created after the scope was frozen. Group responses include skippedCount when clients are skipped and at most 20 representative skip records.",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"emails"
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"emails"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"group"
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"emails": {
|
||||
@@ -11879,6 +12028,13 @@
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"scopeToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"addDays": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -11953,7 +12109,8 @@
|
||||
"obj": {
|
||||
"adjusted": 2,
|
||||
"externalLinks": null,
|
||||
"skipped": []
|
||||
"skipped": [],
|
||||
"skippedCount": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12083,14 +12240,45 @@
|
||||
"tags": [
|
||||
"Clients"
|
||||
],
|
||||
"summary": "Delete many clients in one call. The server processes the list sequentially so each delete sees the committed state of the previous one — avoids the race the per-email fan-out had on the panel side. Pass keepTraffic=true to retain the xray_client_traffic rows after deletion.",
|
||||
"summary": "Delete clients identified by emails or by a server-resolved group. Set keepTraffic to retain client counters.",
|
||||
"operationId": "post_panel_api_clients_bulkDel",
|
||||
"description": "For group deletion, optionally send an unfiltered remove scopeToken from clientPage to reject stale membership before deletion. Newer clients outside the frozen scope are excluded. Group responses include skippedCount when clients are skipped and at most 20 representative skip records.",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"emails"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"group"
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"emails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"scopeToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"keepTraffic": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"emails": [
|
||||
@@ -12116,19 +12304,22 @@
|
||||
"msg": {
|
||||
"type": "string"
|
||||
},
|
||||
"obj": {}
|
||||
"obj": {
|
||||
"$ref": "#/components/schemas/BulkDeleteResult"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"success": true,
|
||||
"obj": {
|
||||
"deleted": 2,
|
||||
"deleted": 0,
|
||||
"skipped": [
|
||||
{
|
||||
"email": "carol",
|
||||
"reason": "client not found"
|
||||
"email": "",
|
||||
"reason": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"skippedCount": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12221,21 +12412,58 @@
|
||||
"tags": [
|
||||
"Clients"
|
||||
],
|
||||
"summary": "Add many clients to a group in one call. Updates clients.group_name and patches the matching client entry inside every owning inbound's settings JSON in a single transaction. If the group name does not yet exist (in client_groups or as a derived label), it is auto-created as a persistent group. To clear the group label, use /groups/bulkRemove instead.",
|
||||
"summary": "Move clients into a group and update every owning inbound's settings in the same transaction.",
|
||||
"operationId": "post_panel_api_clients_groups_bulkAdd",
|
||||
"description": "Send one of emails, inboundId, or selection with the target group. Emails and inboundId can create the group. A picker selection targets an existing group and excludes current members. Explicit selections use clientIds. Frozen selections use scopeToken, the original search and up to 1,000 excludedClientIds. A stale selection makes no changes.",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"required": [
|
||||
"group"
|
||||
],
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"emails"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"inboundId"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"selection"
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"group": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"emails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"inboundId": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"selection": {
|
||||
"$ref": "#/components/schemas/GroupClientSelection"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"emails": [
|
||||
"alice",
|
||||
"bob"
|
||||
],
|
||||
"group": "customer-a"
|
||||
"group": "customer-a",
|
||||
"inboundId": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12274,14 +12502,43 @@
|
||||
"tags": [
|
||||
"Clients"
|
||||
],
|
||||
"summary": "Clear the group label on many clients in one call. Inverse of /groups/bulkAdd. Clients themselves are kept — only the group label is cleared from clients.group_name and from each owning inbound's settings JSON. Groups become empty if all their members are removed.",
|
||||
"summary": "Clear group membership and preserve the clients. Use either emails or a selection scoped to the named group.",
|
||||
"operationId": "post_panel_api_clients_groups_bulkRemove",
|
||||
"description": "Explicit selections use clientIds. Frozen selections use scopeToken, the original search and up to 1,000 excludedClientIds. Only members of the selected group are eligible. A stale selection makes no changes.",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"emails"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"group",
|
||||
"selection"
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"group": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"emails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"selection": {
|
||||
"$ref": "#/components/schemas/GroupClientSelection"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"emails": [
|
||||
@@ -12705,6 +12962,164 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/panel/api/clients/groups/clientPage": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Clients"
|
||||
],
|
||||
"summary": "Page through group candidates, members or subscription IDs. Pages are one-based with a fixed size of 100 and an exact total.",
|
||||
"operationId": "get_panel_api_clients_groups_clientPage",
|
||||
"description": "Add mode excludes current members. Remove mode selects current members. Links mode selects members with a subscription ID. Search matches email, comment and group. freeze=true returns only the matching count, a scope token and the maximum ID for an add or remove selection. For subsequent pages, send maxId and scopeSearch to mark rows inside the frozen filter.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "group",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "Group name.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mode",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"add",
|
||||
"remove",
|
||||
"links"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "search",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "freeze",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "scopeSearch",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "maxId",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"msg": {
|
||||
"type": "string"
|
||||
},
|
||||
"obj": {
|
||||
"$ref": "#/components/schemas/GroupClientPage"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"success": true,
|
||||
"obj": {
|
||||
"items": [
|
||||
{
|
||||
"comment": "Example client",
|
||||
"email": "alice",
|
||||
"enable": true,
|
||||
"group": "staff",
|
||||
"id": 1,
|
||||
"inScope": true,
|
||||
"subId": "example-sub-id"
|
||||
}
|
||||
],
|
||||
"maxId": 0,
|
||||
"scopeToken": "",
|
||||
"total": 120
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/panel/api/clients/groups/subLinks/export": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Clients"
|
||||
],
|
||||
"summary": "Stream all subscription links for a group as tab-separated text. Each row has an email and regular link, followed by a JSON link when enabled.",
|
||||
"operationId": "get_panel_api_clients_groups_subLinks_export",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "group",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "Group name.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Complete subscription link export.",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Missing group or subscriptions disabled."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/panel/api/clients/groups/{name}/emails": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
||||
Reference in New Issue
Block a user