Skip to content

staff.online ​

4 methods on staff.online. Each returns the answer's data and throws NoviqaError on a failed answer.

list ​

GET/admin/v1/online

List online sessions

The sessions in use (a request or an open socket in the last 90 seconds; staff and trading accounts) whose group is in the caller's group scope, oldest first, with terminal, address and when they signed in. Trading account sessions also carry name and live equity (0 when execution does not answer); os is read from the terminal's User-Agent (empty if unrecognized). sockets counts only the live sockets on the gateway copy that answered. No paging.

More details

Rights: the staff member needs every one of: accounts.online.

Returns
Promise<onlineRow[]>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.online.list()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/online" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "equity": "1012.40",
      "group": "real\\standard",
      "ip": "string",
      "last_name": "Smith",
      "login": 1001,
      "name": "Ann Smith",
      "os": "string",
      "read_only": true,
      "session": "string",
      "since": "2026-09-25T10:15:00Z",
      "sockets": 1,
      "staff": true
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.online.list(options?: RequestOptions): Promise<http.onlineRow[]>

kick ​

POST/admin/v1/online/kick

Disconnect every session of a login

Closes every open session of the login at once (every terminal and tab): tokens stop working and live sockets close on every gateway copy. The login's group must be in the caller's scope (forbidden otherwise); no open session for it is not_found. Journaled.

More details

Rights: the staff member needs every one of: accounts.online, accounts.edit.

Request body
logininteger
Login is the numeric identity of every account, trader or staff.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.online.kick({
  login: 1001
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/online/kick" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "login": 1001
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.online.kick(body: http.kickBody, options?: RequestOptions): Promise<null>

window ​

GET/admin/v1/online/window

Read a bounded online-session window

At most 100 currently authorized sessions, ordered by creation time then opaque session identity. Current group, hidden-account and staff visibility checks run for every page; only the selected sessions receive permitted name and trading-equity hydration. Login and equity are exact strings. Staff equity stays zero, and unavailable execution retains the legacy zero-equity behavior. Sockets count only the responding gateway. Each request still scans and authorizes all live session metadata (O(N)); total is the unique authorized count from that scan and can change between pages. This is live membership, not a durable projection snapshot. Strict first/after/before/around navigation rejects unknown, duplicate, empty, oversized or conflicting query parameters. Cursors are untrusted hints bound to the current session, grants and scope; changed authority invalidates them. Around reports anchor_found=false when the authorized anchor vanished, using the supplied cursor or first page. No global search/filter/sort is accepted. observed_at describes the membership read, not calculation age or current P/L. The legacy unpaged /online array remains unchanged. Native socket snapshot reads use the same registered route and guards.

More details

Rights: the staff member needs every one of: accounts.online.

Parameters
limitinteger · query
default 100; from 1 through 100 sessions
edgestring · query
first (default), after, before or around
cursorstring · query
query-bound navigation hint; required for after/before, optional for around
anchor_idstring · query
opaque session identity, required only for around
Returns
Promise<onlineWindowPage>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.online.window({
  limit: 1,
  edge: "string",
  anchor_id: "string"
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/online/window?limit=1&edge=string&anchor_id=string" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "after": "string",
    "anchor_found": true,
    "before": "string",
    "has_after": true,
    "has_before": true,
    "items": [
      {
        "equity": "1012.40",
        "group": "real\\standard",
        "ip": "string",
        "last_name": "Smith",
        "login": 1001,
        "name": "Ann Smith",
        "os": "string",
        "read_only": true,
        "session": "string",
        "since": "2026-09-25T10:15:00Z",
        "sockets": 1,
        "staff": true
      }
    ],
    "observed_at": "2026-09-25T10:15:00Z",
    "query_id": "string",
    "total": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.online.window(query?: { limit?, edge?, cursor?, anchor_id? }, options?: RequestOptions): Promise<http.onlineWindowPage>

kickBySession ​

POST/admin/v1/online/{session}/kick

Disconnect a session

Closes the session: its tokens stop working and its live sockets close on every gateway copy. The session's group must be in the caller's scope (forbidden otherwise); an unknown or already closed session is not_found. Journaled. No body.

More details

Rights: the staff member needs every one of: accounts.online, accounts.edit.

Parameters
sessionstring · pathrequired
Session id, as listed by GET /admin/v1/online.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.online.kickBySession("string")
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/online/string/kick" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.online.kickBySession(session: string, options?: RequestOptions): Promise<null>