Appearance
staff.network
6 methods on staff.network. Each returns the answer's data and throws NoviqaError on a failed answer.
servers
GET
/admin/v1/network/serversList logical servers and observed process instances
Requires config.servers. Stable logical IDs trade (execution), api (gateway), quote (marketdata), with immutable numeric internal_id values 1, 2, 3 respectively. Individual process boots have independent instance IDs. Observed readiness includes dependency and leader checks; a heartbeat older than 20 seconds is stale. Main Trade Server includes measured database allocation spans (decimal strings), actual execution lease ownership and the latest retained maintenance outcome. Used spans are not allocated ranges; accounts/clients use database sequences while orders/deals share the durable execution counter. No instance means unknown; only stale instances means offline; fresh but unready instances means unready (standby, loading or unhealthy), not offline. Offline instances expire after 24 hours. Capabilities explicitly identify unsupported settings; no process lifecycle operations are exposed.
More details
Rights: the staff member needs every one of: config.servers.
Returns
Promise<NetworkServerView[]>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.network.servers()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/network/servers" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": [
{
"access": {
"allow_administrators": true,
"allow_api": true,
"allow_clients": true,
"allow_managers": true,
"antiflood_connections": 1,
"antiflood_enabled": true,
"antiflood_errors": 1
},
"allocations": {
"accounts": {},
"clients": {},
"deals": {},
"orders": {}
},
"capabilities": {
"access_policy": true,
"demo": true,
"edit_metadata": true,
"failover": true,
"history_timeout": true,
"network_adapter": true,
"optimization": true,
"provision": true,
"ranges": true,
"transport": true
},
"demo": {
"mode": 1,
"period_days": 1
},
"history": {
"datafeeds_timeout_sec": 1
},
"id": "string",
"instances": [
{}
],
"internal_id": 1,
"latitude": "string",
"longitude": "string",
"maintenance": {
"config_version": 1,
"error": "string",
"expired": 1,
"finished_at": "2026-09-25T10:15:00Z",
"scheduled_at": "2026-09-25T10:15:00Z",
"skipped_busy": 1,
"started_at": "2026-09-25T10:15:00Z",
"status": "active"
},
"network_adapter": "string"
}
],
"request_id": "5b7f2c1e"
}ts
staff.network.servers(options?: RequestOptions): Promise<models.NetworkServerView[]>retrieveServers
GET
/admin/v1/network/servers/{id}Get a logical server
Rights: the staff member needs every one of: config.servers.
Parameters
idstring · pathrequiredtrade api quoteReturns
Promise<NetworkServerView>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.network.retrieveServers("trade")bash
curl -X GET "$NOVIQA_API_URL/admin/v1/network/servers/trade" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"access": {
"allow_administrators": true,
"allow_api": true,
"allow_clients": true,
"allow_managers": true,
"antiflood_connections": 1,
"antiflood_enabled": true,
"antiflood_errors": 1
},
"allocations": {
"accounts": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
},
"clients": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
},
"deals": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
},
"orders": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
}
},
"capabilities": {
"access_policy": true,
"demo": true,
"edit_metadata": true,
"failover": true,
"history_timeout": true,
"network_adapter": true,
"optimization": true,
"provision": true,
"ranges": true,
"transport": true
},
"demo": {
"mode": 1,
"period_days": 1
},
"history": {
"datafeeds_timeout_sec": 1
},
"id": "string",
"instances": [
{
"applied_version": 1,
"architecture": "string",
"cpu_cores": 1,
"goroutines": 1,
"heap_bytes": 1,
"host_boot_id": "string",
"hostname": "string",
"instance_id": "string",
"internal_id": 1,
"last_seen_at": "2026-09-25T10:15:00Z",
"monitor": {},
"os": "string"
}
],
"internal_id": 1,
"latitude": "string",
"longitude": "string",
"maintenance": {
"config_version": 1,
"error": "string",
"expired": 1,
"finished_at": "2026-09-25T10:15:00Z",
"scheduled_at": "2026-09-25T10:15:00Z",
"skipped_busy": 1,
"started_at": "2026-09-25T10:15:00Z",
"status": "active"
},
"network_adapter": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.network.retrieveServers(id: string, options?: RequestOptions): Promise<models.NetworkServerView>updateServers
PATCH
/admin/v1/network/servers/{id}Change enforceable server configuration
Requires config.servers and the last-read positive version. Sparse update of title, latitude, longitude, network_adapter, access (api only), history (quote only), optimization_time and demo (trade only). internal_id and measured allocations are read-only. Unknown fields and null are rejected. Coordinates are decimal strings, latitude -90..90, longitude -180..180, at most 8 decimal places; title 1..128 characters. Access classes apply to new sign-ins, refresh, existing REST sessions and socket revalidation. Each process refreshes configuration every 5 seconds and sockets revalidate every 2 seconds. Administrator access must remain enabled for recovery. Antiflood counts sign-in and WebSocket upgrade attempts per IP while consecutive attempts remain within 3 seconds (connections 1..100000), and failed credentials/OTP while failures remain within 5 minutes (errors 1..10000). Reaching either configured threshold starts the block, blocking for 5 minutes and doubling up to 1 hour. Existing account/device authentication limits remain independent. History datafeeds_timeout_sec (1..3600) controls stale-feed takeover and gap state in the live pricer. All writes are versioned, journaled and emit config_changed kind network. optimization_time is HH:MM in server wall time, or empty to disable scheduled maintenance. Main Trade Server maintenance runs on Sunday at optimization_time plus 10 minutes; restart catches up only the current weekly slot after the saved configuration became effective. This Linux adaptation retains and disables expired demo accounts, preserving financial history, and skips open exposure, pending orders and in-flight/dealer requests. Candidate scanning uses 500-row keyset batches and persists its cursor after each account so bounded passes and restarts resume beyond a busy prefix; busy accounts are counted and retained. Every archival commits its scoped journal event in the same database transaction; a durable outbox retries delivery even after restart or disabling the schedule. Archived accounts cannot be re-enabled, and delayed account notifications cannot revive them. It does not restart processes, compact databases or update binaries. demo is nullable on reads: null preserves legacy creation and unlimited lifetime. A configured demo object requires mode 0 (disable new demo account creation; preserve existing accounts), 1 (expire after period_days since the latest successful connection), or 2 (fixed period_days since creation), with period_days 1..36500. Mode 0 is enforced at registration and database creation; existing expired sessions lose HTTP/WebSocket access. With legacy NULL policy, gateways cache the singleton decision for five seconds and do not query each trader account. First opt-in is observed within five seconds, after which every trader session checks authoritative expiry and sockets revalidate every two seconds; the opt-in decision stays latched for the process lifetime. A failed singleton refresh fails closed. Disabling optimization leaves configured creation policy active but disables expiry runs. Transport, provisioning, credential changes, failover changes and allocated range editing are deployment-managed or unavailable; title and coordinates are display metadata. network_adapter is an observation-only selection available on all three logical servers: empty aggregates non-loopback interfaces; a nonempty Linux interface name is at most 15 bytes and cannot contain slash, colon, whitespace or control characters. It may name an adapter absent from the gateway or a service replica: absent selected adapters report null with an explicit reason and never fall back. Each replica applies the selector within five seconds; network rate baselines reset on changes. Sampled byte/packet counters carry their selected source; TCP retransmission counters are namespace-wide and therefore unavailable for a selected adapter. No transport binding or operating-system network configuration changes occur. No operating-system clock or process changes occur.
More details
Rights: the staff member needs every one of: config.servers.
Parameters
idstring · pathrequiredtrade api quoteRequest body
accessanydemoanyhistoryanylatitudestringlongitudestringnetwork_adapterstringoptimization_timestringtitlestringversionintegerReturns
Promise<NetworkServerView>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.network.updateServers("trade", {
access: {
allow_administrators: true,
allow_api: true,
allow_clients: true,
allow_managers: true,
antiflood_connections: 1,
antiflood_enabled: true,
antiflood_errors: 1
},
demo: {
mode: 1,
period_days: 1
},
history: {
datafeeds_timeout_sec: 1
},
latitude: "string",
longitude: "string",
network_adapter: "string",
optimization_time: "string",
title: "string",
version: 1
})bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/network/servers/trade" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"access": {
"allow_administrators": true,
"allow_api": true,
"allow_clients": true,
"allow_managers": true,
"antiflood_connections": 1,
"antiflood_enabled": true,
"antiflood_errors": 1
},
"demo": {
"mode": 1,
"period_days": 1
},
"history": {
"datafeeds_timeout_sec": 1
},
"latitude": "string",
"longitude": "string",
"network_adapter": "string",
"optimization_time": "string",
"title": "string",
"version": 1
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"access": {
"allow_administrators": true,
"allow_api": true,
"allow_clients": true,
"allow_managers": true,
"antiflood_connections": 1,
"antiflood_enabled": true,
"antiflood_errors": 1
},
"allocations": {
"accounts": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
},
"clients": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
},
"deals": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
},
"orders": {
"allocator": "string",
"total": "string",
"used_from": "string",
"used_to": "string"
}
},
"capabilities": {
"access_policy": true,
"demo": true,
"edit_metadata": true,
"failover": true,
"history_timeout": true,
"network_adapter": true,
"optimization": true,
"provision": true,
"ranges": true,
"transport": true
},
"demo": {
"mode": 1,
"period_days": 1
},
"history": {
"datafeeds_timeout_sec": 1
},
"id": "string",
"instances": [
{
"applied_version": 1,
"architecture": "string",
"cpu_cores": 1,
"goroutines": 1,
"heap_bytes": 1,
"host_boot_id": "string",
"hostname": "string",
"instance_id": "string",
"internal_id": 1,
"last_seen_at": "2026-09-25T10:15:00Z",
"monitor": {},
"os": "string"
}
],
"internal_id": 1,
"latitude": "string",
"longitude": "string",
"maintenance": {
"config_version": 1,
"error": "string",
"expired": 1,
"finished_at": "2026-09-25T10:15:00Z",
"scheduled_at": "2026-09-25T10:15:00Z",
"skipped_busy": 1,
"started_at": "2026-09-25T10:15:00Z",
"status": "active"
},
"network_adapter": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.network.updateServers(id: string, body: http.docNetworkUpdate, options?: RequestOptions): Promise<models.NetworkServerView>serversInstancesFirewall
GET
/admin/v1/network/servers/{id}/instances/{instance}/firewallRead observed Linux firewall rules
Requires terminal.admin, config.servers and server.machines. Host-matched read-only nftables snapshot of input, ingress, prerouting and forwarding chains, their policies and reachable rule chains. Forward rules include Docker-published services. Up to 1000 rules and 2 MiB; whole rows are omitted with truncated=true when either limit is reached. Expressions preserve complete Linux matches without inventing Windows profiles. No firewall mutations or shell commands are exposed. Missing or mismatched collectors report available=false; stale observations are explicit. Not broadcast on WebSocket.
More details
Rights: the staff member needs every one of: terminal.admin, server.machines; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
instancestring · pathrequiredReturns
Promise<HostFirewall>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.network.serversInstancesFirewall(1, "string")bash
curl -X GET "$NOVIQA_API_URL/admin/v1/network/servers/1/instances/string/firewall" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"available": true,
"backend": "string",
"host": "string",
"read_only": true,
"reason": "string",
"rows": [
{
"action": "string",
"address": "1 High St",
"chain": "string",
"expression": "string",
"family": "string",
"hook": "string",
"interface": "string",
"name": "Ann Smith",
"port": "string",
"protocol": "string",
"table": "string"
}
],
"sampled_at": "2026-09-25T10:15:00Z",
"stale": true,
"truncated": true
},
"request_id": "5b7f2c1e"
}ts
staff.network.serversInstancesFirewall(id: number, instance: string, options?: RequestOptions): Promise<models.HostFirewall>serversInstancesMonitor
GET
/admin/v1/network/servers/{id}/instances/{instance}/monitorRead measured per-instance Linux monitoring history
Requires config.servers on every request. Instance identity must belong to the requested logical server. Samples are measured every 5 seconds, with 1 hour of recent samples and up to 24 hours of minute extrema retained across gateway restarts. Maximum.from/to describe actual retained observation coverage, not guaranteed full-day coverage. Free capacity uses minima; other gauges/rates use maxima. A process restart has a new instance ID; rates are null until two valid readings, and reset counters are null for that interval. Metric value null and reason explicitly indicate unavailable evidence, including Windows-only DPC or unavailable kernel/cgroup files. Linux host-kernel CPU/RAM/block counters are distinct from process, cgroup, filesystem and network-namespace counters; a container reading must not be presented as isolated physical host attribution. Filesystem free space is available-to-process space for the reported filesystem. Thread CPU values are Linux USER_HZ ticks, not CPU cycles. Hardware describes only kernel-visible devices; no benchmark is run. Stale after 20 seconds without a fresh heartbeat or sample. Monitoring payloads are not published to general WebSockets.
More details
Rights: the staff member needs every one of: config.servers.
Parameters
idstring · pathrequiredtrade api quoteinstancestring · pathrequiredReturns
Promise<NetworkMonitorHistory>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.network.serversInstancesMonitor("trade", "string")bash
curl -X GET "$NOVIQA_API_URL/admin/v1/network/servers/trade/instances/string/monitor" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"instance_id": "string",
"latest": {
"capabilities": {},
"hardware": [
{}
],
"interval_ms": 1,
"listen_bindings": [
{}
],
"metrics": {},
"network_adapter": "string",
"reset": true,
"sampled_at": "2026-09-25T10:15:00Z",
"samples": 1,
"scope": "string",
"threads": [
{}
],
"threads_limit": 1
},
"maximum": {
"from": "2026-09-25T10:15:00Z",
"metrics": {},
"samples": 1,
"to": "2026-09-25T10:15:00Z"
},
"minutes": [
{
"interval_ms": 1,
"metrics": {},
"network_adapter": "string",
"reset": true,
"sampled_at": "2026-09-25T10:15:00Z",
"samples": 1,
"trade": {}
}
],
"observed_at": "2026-09-25T10:15:00Z",
"recent": [
{
"interval_ms": 1,
"metrics": {},
"network_adapter": "string",
"reset": true,
"sampled_at": "2026-09-25T10:15:00Z",
"samples": 1,
"trade": {}
}
],
"recent_sec": 1,
"retention_sec": 1,
"sample_every_sec": 1,
"server_id": "string",
"stale": true,
"stale_after_sec": 1
},
"request_id": "5b7f2c1e"
}ts
staff.network.serversInstancesMonitor(id: string, instance: string, options?: RequestOptions): Promise<models.NetworkMonitorHistory>serversInstancesOsEvents
GET
/admin/v1/network/servers/{id}/instances/{instance}/os-eventsRead observed Linux operating-system events
Requires terminal.admin, config.servers and server.logs. Reads the optional host collector snapshot only when its Linux boot ID matches the selected registered instance. No host commands are executed by the gateway. Last 500 systemd events within 24 hours; from/to in the response describe coverage, truncated indicates the cap. Optional search (256 chars), channel (all/system/application/security), level (all/critical/error/warning/information/details), and RFC3339 from/to filters; to is exclusive. Unknown/missing collectors report available=false; observations older than 90 seconds or stale instance heartbeats report stale=true. Not broadcast on WebSocket.
More details
Rights: the staff member needs every one of: terminal.admin, server.logs; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
instancestring · pathrequiredReturns
Promise<HostEvents>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.network.serversInstancesOsEvents(1, "string")bash
curl -X GET "$NOVIQA_API_URL/admin/v1/network/servers/1/instances/string/os-events" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"available": true,
"from": "2026-09-25T10:15:00Z",
"host": "string",
"limit": 1,
"reason": "string",
"rows": [
{
"address": "1 High St",
"channel": "string",
"id": "string",
"level": "string",
"message": "string",
"source": "string",
"time": "2026-09-25T10:15:00Z",
"user": "string"
}
],
"sampled_at": "2026-09-25T10:15:00Z",
"stale": true,
"to": "2026-09-25T10:15:00Z",
"truncated": true
},
"request_id": "5b7f2c1e"
}ts
staff.network.serversInstancesOsEvents(id: number, instance: string, options?: RequestOptions): Promise<models.HostEvents>