مرجع عام
Sessions
كل نقاط النهاية في هذه المجموعة. افتح أي واحدة لعرض معاملاتها ومثال عملي عليها.
Sessions
11GET /api/v1/admin/sessions List live sessions
Sessions with no stop time, paginated with the standard list parameters. A non-admin caller sees only sessions belonging to their own manager subtree, injected server-side.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_report_sessionsSessions report
user_id is null for a session this instance cannot tie to a subscriber row, such as an anonymous voucher or an orphan left by a NAS restart. status and usage are absent on those too. Do not assume every live session has an owner.
المعاملات
| المعامل | الوصف |
|---|---|
q
query · string
|
Searches username, first and last name, framed IP, device MAC and NAS name. |
filter[nas_id]
query · integer
|
Sessions on one registered NAS. |
filter[kind]
query · enum
|
subscriber, guest, voucher or unknown. |
filter[has_ip]
query · boolean
|
Sessions that were assigned a framed IP. |
filter[duration_band]
query · string
|
Duration bucket. The value "stale" means no accounting update for longer than the tenant's idle window, which is the practical definition of a ghost session. |
filter[expired]
query · boolean
|
Sessions whose owner's subscription has run out but who are still connected. |
{
"data": [
{
"id": 8821904,
"acct_session_id": "81b0c4e2",
"username": "ahmed",
"user_id": 4711,
"kind": "subscriber",
"nas_ip": "10.20.0.1",
"nas_id": 3,
"nas_name": "cairo-edge-1",
"vendor": "mikrotik",
"framed_ip": "10.64.12.51",
"calling_station_id": "AA:BB:CC:DD:EE:FF",
"start_time": "2026-09-20 07:11:02",
"update_time": "2026-09-20 09:06:02",
"session_time": 6900,
"input_octets": 412000000,
"output_octets": 5100000000,
"profile_name": "Home 20M",
"usage": { "percent": 55.0, "dimension": "data" }
}
],
"meta": { "page": 1, "page_size": 50, "total": 318, "has_next": true }
}
POST /api/v1/admin/sessions/bulk-disconnect Disconnect many sessions
Sends a Disconnect-Request per session id and reports the per-id outcome. One request against the write budget rather than one per session.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_live_trafficLive traffic / disconnect - حد المعدل
t_mutate
The same NAS-accepted-it caveat as the single disconnect applies to every id in the report, and the partial-failure envelope means a 200 does not mean all of them were sent.
المعاملات
| المعامل | الوصف |
|---|---|
idsمطلوب
body · array
|
Session ids. |
POST /api/v1/admin/sessions/bulk-lock-mac Lock user MAC
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_mac_lockLock user MAC - حد المعدل
t_mutate
مقروء مباشرة من الموجّه الذي يخدم هذه النسخة. لم يُضَف بعد وصف مكتوب لنقطة النهاية هذه.
POST /api/v1/admin/sessions/bulk-ping Ping user
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_pingPing user - حد المعدل
t_mutate
مقروء مباشرة من الموجّه الذي يخدم هذه النسخة. لم يُضَف بعد وصف مكتوب لنقطة النهاية هذه.
GET /api/v1/admin/sessions/{id} Fetch one live session
One session with the full projection, including the joined subscriber attributes.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_report_sessionsSessions report
المعاملات
| المعامل | الوصف |
|---|---|
idمطلوب
path · integer
|
The accounting row id, not the subscriber id. |
POST /api/v1/admin/sessions/{id}/disconnect Disconnect a session
Sends an RFC 5176 Disconnect-Request straight from this platform to the NAS that owns the session. The packet goes out over UDP to the device, not through the RADIUS server.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_live_trafficLive traffic / disconnect - حد المعدل
t_mutate
ok true means the NAS ACCEPTED the packet, not that the subscriber is off the network. Whether the session actually ends is up to the device, and it will be reflected in accounting a moment later. nak true is also a success from your point of view: the NAS replied "no such session", so it is already gone. Only a 502 means the disconnect did not happen.
المعاملات
| المعامل | الوصف |
|---|---|
idمطلوب
path · integer
|
Session id. |
{
"data": { "ok": true, "nak": false, "message": "disconnected" }
}
GET /api/v1/admin/sessions/{id}/live-traffic Read near-real-time throughput
Returns bits per second when the session's NAS has SNMP management credentials with an interface selector configured, by polling the device twice about a second apart. Without them it degrades to the accounting counters.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_live_trafficLive traffic / disconnect
Check the source field before trusting the numbers. source "snmp" is a real measurement; source "interim" means there were no SNMP credentials, the device was unreachable, or the sampler is not wired — the counters are the last accounting values and bps is 0, and your client has to derive the rate from successive polls itself.
المعاملات
| المعامل | الوصف |
|---|---|
idمطلوب
path · integer
|
Session id. |
GET /api/v1/admin/sessions/{id}/live-traffic/stream Live traffic / disconnect
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_live_trafficLive traffic / disconnect
مقروء مباشرة من الموجّه الذي يخدم هذه النسخة. لم يُضَف بعد وصف مكتوب لنقطة النهاية هذه.
POST /api/v1/admin/sessions/{id}/lock-mac Bind the subscriber to this session's device
Writes the session's calling-station MAC into the subscriber's locked-MAC list. From the next authentication onward only that device may connect. The current session is left up, since it already uses the locked MAC.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_mac_lockLock user MAC - حد المعدل
t_mutate
This endpoint also turns the lock ON, which the subscriber PATCH does not. Writing mac_locked_addrs through PATCH /users/{id} without setting mac_lock_enabled stores a list that enforces nothing.
المعاملات
| المعامل | الوصف |
|---|---|
idمطلوب
path · integer
|
Session id. |
{
"data": {
"user_id": 4711,
"mac": "AA:BB:CC:DD:EE:FF",
"locked_macs": ["AA:BB:CC:DD:EE:FF"]
}
}
POST /api/v1/admin/sessions/{id}/ping Ping the subscriber's device
Sends ICMP echo to the session's framed IP from the platform. An operator diagnostic, not a monitoring feed.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_users_pingPing user - حد المعدل
t_mutate
On the per-tenant probe budget, which is 10 a minute on a standard licence. It is sized for an operator clicking a button; a polling loop will exhaust it in six seconds and take every other probe endpoint down with it.
المعاملات
| المعامل | الوصف |
|---|---|
idمطلوب
path · integer
|
Session id. |
GET /api/v1/admin/sessions/{id}/traffic Poll a session's counters
The lightweight counter snapshot behind a live traffic graph. It is a snapshot, not a rate — derive throughput from the difference between two polls and the difference between their sampled_at stamps.
- المصادقة
- رمز موظّف أو جلسة
- تتطلب صلاحية
-
prm_report_sessionsSessions report
update_time is when the NAS last reported, and sampled_at is when this server read it. They differ by up to one accounting interval, so two polls closer together than that interval return identical counters and a throughput of zero. That is the NAS being quiet, not the subscriber.
المعاملات
| المعامل | الوصف |
|---|---|
idمطلوب
path · integer
|
Session id. |
{
"data": {
"id": 8821904,
"session_time": 6900,
"input_octets": 412000000,
"output_octets": 5100000000,
"update_time": "2026-09-20 09:06:02",
"sampled_at": "2026-09-20 09:08:31"
}
}
لا توجد نقطة نهاية تطابق هذا البحث.
مكتوب لتقرأه الأدوات الآلية أيضًا
المرجع عام ولا يتطلب حسابًا، فتستطيع أداة لم تَرَ X-Radius من قبل أن تصل إلى أول استدعاء صحيح بنفسها.
- /llms.txt
- فهرس لكل صفحة، مع ملخّص من سطر واحد.
- /llms-full.txt
- المرجع كاملًا في ملف Markdown واحد، دون تنقّل يحتاج إلى زحف.
- /openapi.json
- OpenAPI 3.1، مُولَّد من الموجّه الذي يخدم هذه النسخة.
- /skill.md
- ملف مهارة جاهز لمساعد آلي: المصادقة وشكل الاستجابة ورموز الأخطاء في صفحة واحدة.
<page-url>.md- أضف .md إلى رابط أي صفحة في المرجع لتحصل على الصفحة نفسها بصيغة Markdown.
Accept: text/markdown- أرسل هذه الترويسة على الرابط المعتاد فتصلك الإجابة بصيغة Markdown بدلًا من الصفحة.
اقرأ https://x-radius.com/llms.txt، ثم اجلب نقطة النهاية التي تحتاجها بصيغة Markdown بإضافة .md إلى رابطها.