Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API リファレンス

wpg-server は /api 以下で REST (JSON) API を提供し、リアルタイム統計・ジョブの状態変化・ログを WebSocket (GET /api/ws) で配信します。このページはサーバの OpenAPI ドキュメント (utoipa) から自動生成しています。起動中のサーバは同じドキュメントを /api/openapi.json で、Swagger UI を /api/docs/ で提供し、写しを docs/schema/openapi.json に置いています。POST /api/auth/login (初回は POST /api/auth/setup) でログインすると、以降は wpg_session クッキーで認証されます。POST / PUT / DELETE では GET /api/auth/status の CSRF トークンを X-CSRF-Token ヘッダでも送ってください。エラーは JSON オブジェクト error で、code、message (Accept-Language の言語)、details を持ちます。以下のエンドポイントとスキーマの説明はコード由来 (英語) です。

エンドポイント

タグエンドポイント概要
authPOST /api/auth/loginLogs in (rate limited per client address: 5 failures a minute, then an exponentially growing lock-out up to 15 minutes). Requires Content-Type: application/json.
authPOST /api/auth/logoutLogs out (needs X-CSRF-Token when the session is live) and clears the cookies.
authPOST /api/auth/setupFirst-run setup: sets the admin password and logs in. Only while no password is configured, and only from a loopback client unless the server runs with --allow-insecure. Requires Content-Type: application/json.
authGET /api/auth/statusAuthentication state of the caller (never requires a session).
authGET /api/tokensAPI tokens (admins: all; others: their own), oldest first.
authPOST /api/tokensCreates a token for the logged-in user, with that user’s role. The response is the only place the secret appears.
authDELETE /api/tokens/{id}Revokes (deletes) a token; requests with it fail from now on.
systemGET /api/healthLiveness probe.
systemGET /api/system/backendsTransmit backends of this build.
systemGET /api/system/doctorSelf-diagnosis (wpg doctor --json), with localised summary / fix.
systemGET /api/system/ifacesNetwork interfaces with usable (up, running, not loopback) and allowed (by tx.allowed_ifaces).
systemGET /api/versionBuild information.
protocolsGET /api/protocolsThe catalog in palette order.
protocolsGET /api/protocols/extensionsThe user-defined protocol files in use ([protocols] dirs, --protocols-dir; loaded at startup or by POST /api/protocols/reload): their definitions and bindings, so that the web UI can add them to its in-browser catalog. Empty without extensions.
protocolsPOST /api/protocols/reloadReads the user-defined protocol directories of the server again ([protocols] dirs, --protocols-dir) and switches the catalog to what they hold now; WebSocket clients get a protocols_changed event. Jobs that are already running keep the catalog they started with. On an error nothing changes. Admin only.
protocolsGET /api/protocols/{id}The full definition (wpg_core::ProtocolDef): fields with types, defaults, auto computations and bindings. Every description_key gets a localised description next to it.
packetsPOST /api/lintChecks a template (wpg template lint). A template that does not even parse is reported as a single error at path "".
packetsPOST /api/parseDecodes raw bytes into layers (Hex paste import).
packetsPOST /api/renderRenders packets of a template (preview).
templatesGET /api/templatesLists / searches templates.
templatesPOST /api/templatesCreates a template in the user directory (file name from meta.name).
templatesPOST /api/templates/importImports a .wpg.yaml (or JSON) document into the user directory.
templatesGET /api/templates/{id}One template (also marks it as recently used).
templatesPUT /api/templates/{id}Replaces a user template.
templatesDELETE /api/templates/{id}Deletes a user template.
templatesPOST /api/templates/{id}/duplicateCopies a template (library or user) into the user directory.
templatesGET /api/templates/{id}/exportDownloads a template as .wpg.yaml (the file itself, comments included).
templatesPOST /api/templates/{id}/favoriteSets (or, without a body, toggles) the favourite flag.
jobsGET /api/jobsAll live jobs (created, running and recently finished), newest first.
jobsPOST /api/jobsCreates (and by default starts) a job.
jobsGET /api/jobs/historyFinished jobs (last 100), newest first.
jobsGET /api/jobs/{id}One job (live or from the history).
jobsDELETE /api/jobs/{id}Removes a job (a running one is stopped first and recorded in the history).
jobsPOST /api/jobs/{id}/pausePauses a running job.
jobsPOST /api/jobs/{id}/resumeResumes a paused job.
jobsPOST /api/jobs/{id}/startStarts a job created with start: false.
jobsGET /api/jobs/{id}/statsLatest statistics snapshot of a job.
jobsPOST /api/jobs/{id}/stopStops a job (asynchronously; watch job_state or poll the job).
jobsGET /api/stats/overviewDashboard summary.
capturesGET /api/capturesAll captures (running and the last finished ones), newest first.
capturesPOST /api/capturesStarts a capture.
capturesGET /api/captures/backendsReceive backend availability on this build / OS.
capturesPOST /api/captures/filterChecks a capture filter without starting a capture.
capturesGET /api/captures/{id}One capture.
capturesDELETE /api/captures/{id}Removes a capture (a running one is stopped first; a saved pcapng file stays on disk).
capturesGET /api/captures/{id}/packetsThe first N matching frames of a capture (live while it runs).
capturesGET /api/captures/{id}/pcapngThe pcapng file of a finished capture started with save.
capturesPOST /api/captures/{id}/stopStops a running capture (asynchronously; watch capture_state).
eventsGET /api/wsWebSocket upgrade.
terminalGET /api/terminal/known-hostsTrusted SSH host keys (<data_dir>/terminal/known_hosts).
terminalDELETE /api/terminal/known-hosts/{host}/{port}Forgets the host key(s) of host:port (after a legitimate key change).
terminalGET /api/terminal/logsSession logs, newest first.
terminalGET /api/terminal/logs/{name}Downloads a session log (text/plain, also while it is being written).
terminalDELETE /api/terminal/logs/{name}Deletes a session log (not one that is being written).
terminalGET /api/terminal/statusConfiguration and running sessions (also when the terminal is disabled, so the UI can explain how to enable it).
terminalGET /api/terminal/wsOpens a terminal session (WebSocket). Send connect first; see TerminalClientMessage / TerminalServerMessage. Remote output arrives as binary frames, keystrokes may be sent as binary frames or input messages.
snmpGET /api/snmp/captureRecording state.
snmpPOST /api/snmp/captureStarts / stops the recording of every SNMP datagram this server sends or receives (requests, responses, traps), or clears it.
snmpGET /api/snmp/capture/downloadThe recorded frames as a pcap / pcapng file (Ethernet / IP / UDP synthesised around the real datagrams; placeholder MAC addresses).
snmpPOST /api/snmp/getGetRequest.
snmpPOST /api/snmp/getbulkGetBulkRequest (v2c / v3).
snmpPOST /api/snmp/getnextGetNextRequest.
snmpPOST /api/snmp/informSends an InformRequest (v2c / v3) and waits for the acknowledgement.
snmpGET /api/snmp/mibsLoaded MIB modules with their load state.
snmpPOST /api/snmp/mibsUploads MIB files (stored under <data_dir>/mibs, loaded at once).
snmpGET /api/snmp/mibs/nodeDetails of a MIB node (longest-prefix match for instances).
snmpGET /api/snmp/mibs/searchFinds MIB objects by name (for OID autocompletion).
snmpGET /api/snmp/mibs/treeOne level of the MIB tree.
snmpDELETE /api/snmp/mibs/{module}Deletes an uploaded module (its whole file). Bundled modules cannot be deleted.
snmpGET /api/snmp/receiverReceiver state.
snmpPOST /api/snmp/receiver/startStarts (or restarts) the trap / inform receiver.
snmpPOST /api/snmp/receiver/stopStops the receiver.
snmpPOST /api/snmp/setSetRequest.
snmpGET /api/snmp/statusWhether the SNMP tool is enabled, with MIB / receiver / recording summaries.
snmpPOST /api/snmp/trapSends a trap (v1 Trap-PDU, SNMPv2-Trap, or a v3 trap with this server as the authoritative engine). The result lists the bindings sent.
snmpGET /api/snmp/trapsReceived notifications, newest first (also pushed as snmp_trap events on the WebSocket).
snmpDELETE /api/snmp/trapsForgets the received notifications.
snmpPOST /api/snmp/walkWalks one or more subtrees (GetBulk on v2c / v3, GetNext on v1); conceptual tables in the result are also returned as rows × columns.
dhcpGET /api/dhcpState, settings and counters.
dhcpPUT /api/dhcpSaves the settings; a running server restarts with them.
dhcpGET /api/dhcp/activityRecent requests and replies, newest first (wpg_dhcp::Activity).
dhcpDELETE /api/dhcp/activityClears the activity log.
dhcpGET /api/dhcp/leasesLeases (wpg_dhcp::Lease: kind v4 / na / pd, addr, plen, client, iaid, mac, hostname, state, expires, updated).
dhcpDELETE /api/dhcp/leasesDeletes one lease (key) or all of them. The client keeps using the address until it renews.
dhcpPOST /api/dhcp/startStarts (or restarts) the server; it also starts at boot until stopped.
dhcpPOST /api/dhcp/stopStops the server (and its start at boot).

auth

ログイン、ログアウト、初回セットアップ。

POST /api/auth/login

Logs in (rate limited per client address: 5 failures a minute, then an exponentially growing lock-out up to 15 minutes). Requires Content-Type: application/json.

リクエスト本文: application/json LoginRequest

レスポンス

ステータス説明本文
204Logged in; Set-Cookie: wpg_session, wpg_csrf
401unauthorized / setup_requiredapplication/json ErrorBody
415Not JSONapplication/json ErrorBody
429rate_limited: details.retry_after_secs, Retry-Afterapplication/json ErrorBody

POST /api/auth/logout

Logs out (needs X-CSRF-Token when the session is live) and clears the cookies.

レスポンス

ステータス説明本文
204Logged out
403csrf_failedapplication/json ErrorBody

POST /api/auth/setup

First-run setup: sets the admin password and logs in. Only while no password is configured, and only from a loopback client unless the server runs with --allow-insecure. Requires Content-Type: application/json.

リクエスト本文: application/json SetupRequest

レスポンス

ステータス説明本文
204Password set; Set-Cookie: wpg_session, wpg_csrf
400Passwords differ / too shortapplication/json ErrorBody
403forbidden: remote clientapplication/json ErrorBody
409already_configuredapplication/json ErrorBody
415Not JSONapplication/json ErrorBody

GET /api/auth/status

Authentication state of the caller (never requires a session).

レスポンス

ステータス説明本文
200Stateapplication/json AuthStatus

GET /api/tokens

API tokens (admins: all; others: their own), oldest first.

レスポンス

ステータス説明本文
200Tokens (without secrets)application/json TokenInfo[]
403forbidden: bearer requests cannot manage tokensapplication/json ErrorBody

POST /api/tokens

Creates a token for the logged-in user, with that user’s role. The response is the only place the secret appears.

リクエスト本文: application/json CreateToken

レスポンス

ステータス説明本文
201Createdapplication/json CreatedToken
400Invalid name or expiryapplication/json ErrorBody
403forbidden: bearer requests cannot manage tokensapplication/json ErrorBody

DELETE /api/tokens/{id}

Revokes (deletes) a token; requests with it fail from now on.

パラメータ

名前位置型必須説明
idpathintegerはいToken id

レスポンス

ステータス説明本文
204Revoked
403forbidden: bearer requests cannot manage tokensapplication/json ErrorBody
404Unknown idapplication/json ErrorBody

system

ヘルスチェック、バージョン、インタフェース、自己診断、送出バックエンド。

GET /api/health

Liveness probe.

レスポンス

ステータス説明本文
200The server is upapplication/json Health

GET /api/system/backends

Transmit backends of this build.

レスポンス

ステータス説明本文
200Backendsapplication/json Backends

GET /api/system/doctor

Self-diagnosis (wpg doctor --json), with localised summary / fix.

レスポンス

ステータス説明本文
200{ ok, locale, checks: [...] }application/json object

GET /api/system/ifaces

Network interfaces with usable (up, running, not loopback) and allowed (by tx.allowed_ifaces).

パラメータ

名前位置型必須説明
refreshquerybooleanRe-read the interfaces instead of using the few-seconds cache.

レスポンス

ステータス説明本文
200Interfaces (wpg ifaces --json plus usable / allowed)application/json object``[]
500Enumeration failedapplication/json ErrorBody

GET /api/version

Build information.

レスポンス

ステータス説明本文
200Version and build infoapplication/json VersionInfo

protocols

プロトコルカタログ (プロトコルリファレンス参照)。

GET /api/protocols

The catalog in palette order.

レスポンス

ステータス説明本文
200Catalog summaryapplication/json ProtocolSummary[]

GET /api/protocols/extensions

The user-defined protocol files in use ([protocols] dirs, --protocols-dir; loaded at startup or by POST /api/protocols/reload): their definitions and bindings, so that the web UI can add them to its in-browser catalog. Empty without extensions.

レスポンス

ステータス説明本文
200Extension files (protocols, bind, source)application/json object``[]

POST /api/protocols/reload

Reads the user-defined protocol directories of the server again ([protocols] dirs, --protocols-dir) and switches the catalog to what they hold now; WebSocket clients get a protocols_changed event. Jobs that are already running keep the catalog they started with. On an error nothing changes. Admin only.

レスポンス

ステータス説明本文
200Loaded filesapplication/json ReloadResult
403forbidden: not an adminapplication/json ErrorBody
422invalid_protocols: a file does not load (details.file, details.reason)application/json ErrorBody

GET /api/protocols/{id}

The full definition (wpg_core::ProtocolDef): fields with types, defaults, auto computations and bindings. Every description_key gets a localised description next to it.

パラメータ

名前位置型必須説明
idpathstringはいProtocol id

レスポンス

ステータス説明本文
200Protocol definition IRapplication/json object
404Unknown protocolapplication/json ErrorBody

packets

パケットの合成、デコード、lint。

POST /api/lint

Checks a template (wpg template lint). A template that does not even parse is reported as a single error at path "".

リクエスト本文: application/json LintRequest

レスポンス

ステータス説明本文
200Lint resultapplication/json LintResponse
400Bad requestapplication/json ErrorBody

POST /api/parse

Decodes raw bytes into layers (Hex paste import).

リクエスト本文: application/json ParseRequest

レスポンス

ステータス説明本文
200Decoded packetapplication/json ParseResponse
400Invalid hexapplication/json ErrorBody
422Cannot be decodedapplication/json ErrorBody

POST /api/render

Renders packets of a template (preview).

リクエスト本文: application/json RenderRequest

レスポンス

ステータス説明本文
200Rendered packetsapplication/json RenderResponse
400Bad requestapplication/json ErrorBody
422Invalid template (details: lint issues)application/json ErrorBody

templates

テンプレートライブラリ。

GET /api/templates

Lists / searches templates.

パラメータ

名前位置型必須説明
qquerystringCase-insensitive search in id, name, descriptions, tags and protocols.
tagquerystringRequired tag(s), comma separated.
favoritequerybooleanOnly favourites (true) / non-favourites (false).
sourcequeryTemplateSourceOnly user or library templates.

レスポンス

ステータス説明本文
200Templatesapplication/json TemplateList

POST /api/templates

Creates a template in the user directory (file name from meta.name).

リクエスト本文: application/json object — Template (JSON form of .wpg.yaml)

レスポンス

ステータス説明本文
201Createdapplication/json TemplateDetail
422Invalid templateapplication/json ErrorBody

POST /api/templates/import

Imports a .wpg.yaml (or JSON) document into the user directory.

リクエスト本文: text/yaml string — Template YAML

レスポンス

ステータス説明本文
201Importedapplication/json TemplateDetail
422Invalid templateapplication/json ErrorBody

GET /api/templates/{id}

One template (also marks it as recently used).

パラメータ

名前位置型必須説明
idpathstringはいTemplate id

レスポンス

ステータス説明本文
200Templateapplication/json TemplateDetail
404Unknown idapplication/json ErrorBody
422The file does not parseapplication/json ErrorBody

PUT /api/templates/{id}

Replaces a user template.

パラメータ

名前位置型必須説明
idpathstringはいTemplate id

リクエスト本文: application/json object — Template (JSON form of .wpg.yaml)

レスポンス

ステータス説明本文
200Updatedapplication/json TemplateDetail
403Read-only library templateapplication/json ErrorBody
404Unknown idapplication/json ErrorBody
422Invalid templateapplication/json ErrorBody

DELETE /api/templates/{id}

Deletes a user template.

パラメータ

名前位置型必須説明
idpathstringはいTemplate id

レスポンス

ステータス説明本文
204Deleted
403Read-only library templateapplication/json ErrorBody
404Unknown idapplication/json ErrorBody

POST /api/templates/{id}/duplicate

Copies a template (library or user) into the user directory.

パラメータ

名前位置型必須説明
idpathstringはいTemplate id

レスポンス

ステータス説明本文
201The copyapplication/json TemplateDetail
404Unknown idapplication/json ErrorBody

GET /api/templates/{id}/export

Downloads a template as .wpg.yaml (the file itself, comments included).

パラメータ

名前位置型必須説明
idpathstringはいTemplate id

レスポンス

ステータス説明本文
200YAMLtext/yaml string
404Unknown idapplication/json ErrorBody

POST /api/templates/{id}/favorite

Sets (or, without a body, toggles) the favourite flag.

パラメータ

名前位置型必須説明
idpathstringはいTemplate id

リクエスト本文: application/json Favorite | null — {"favorite": bool}; empty or null = toggle

レスポンス

ステータス説明本文
200New stateapplication/json FavoriteState
404Unknown idapplication/json ErrorBody

jobs

送出ジョブと統計。

GET /api/jobs

All live jobs (created, running and recently finished), newest first.

レスポンス

ステータス説明本文
200Jobsapplication/json JobInfo[]

POST /api/jobs

Creates (and by default starts) a job.

リクエスト本文: application/json CreateJob

レスポンス

ステータス説明本文
201Createdapplication/json JobInfo
400Invalid jobapplication/json ErrorBody
403policy_violation: interface or rate not allowedapplication/json ErrorBody
404Unknown template idapplication/json ErrorBody
422Invalid templateapplication/json ErrorBody
502backend_error: the backend could not be openedapplication/json ErrorBody

GET /api/jobs/history

Finished jobs (last 100), newest first.

レスポンス

ステータス説明本文
200Finished jobsapplication/json JobInfo[]

GET /api/jobs/{id}

One job (live or from the history).

パラメータ

名前位置型必須説明
idpathstringはいJob id

レスポンス

ステータス説明本文
200Jobapplication/json JobInfo
404Unknown idapplication/json ErrorBody

DELETE /api/jobs/{id}

Removes a job (a running one is stopped first and recorded in the history).

パラメータ

名前位置型必須説明
idpathstringはいJob id

レスポンス

ステータス説明本文
204Deleted
404Unknown idapplication/json ErrorBody

POST /api/jobs/{id}/pause

Pauses a running job.

パラメータ

名前位置型必須説明
idpathstringはいJob id

レスポンス

ステータス説明本文
200Pausingapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Not runningapplication/json ErrorBody

POST /api/jobs/{id}/resume

Resumes a paused job.

パラメータ

名前位置型必須説明
idpathstringはいJob id

レスポンス

ステータス説明本文
200Resumingapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Not runningapplication/json ErrorBody

POST /api/jobs/{id}/start

Starts a job created with start: false.

パラメータ

名前位置型必須説明
idpathstringはいJob id

レスポンス

ステータス説明本文
200Startedapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Not in state createdapplication/json ErrorBody
502Backend errorapplication/json ErrorBody

GET /api/jobs/{id}/stats

Latest statistics snapshot of a job.

パラメータ

名前位置型必須説明
idpathstringはいJob id

レスポンス

ステータス説明本文
200wpg_tx::job::StatsSnapshotapplication/json object
404Unknown idapplication/json ErrorBody
409Never startedapplication/json ErrorBody

POST /api/jobs/{id}/stop

Stops a job (asynchronously; watch job_state or poll the job).

パラメータ

名前位置型必須説明
idpathstringはいJob id

レスポンス

ステータス説明本文
200Stoppingapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Already endedapplication/json ErrorBody

GET /api/stats/overview

Dashboard summary.

レスポンス

ステータス説明本文
200Dashboard dataapplication/json Overview

captures

Receive counters, captured frames and signature verification

GET /api/captures

All captures (running and the last finished ones), newest first.

レスポンス

ステータス説明本文
200Capturesapplication/json CaptureInfo[]

POST /api/captures

Starts a capture.

リクエスト本文: application/json CaptureSpec

レスポンス

ステータス説明本文
201Startedapplication/json CaptureInfo
400Invalid spec or filterapplication/json ErrorBody
404Unknown interface / input fileapplication/json ErrorBody
502backend_error: the backend could not be openedapplication/json ErrorBody

GET /api/captures/backends

Receive backend availability on this build / OS.

レスポンス

ステータス説明本文
200Backends (name, available, reason)application/json object``[]

POST /api/captures/filter

Checks a capture filter without starting a capture.

リクエスト本文: application/json FilterCheck

レスポンス

ステータス説明本文
200Resultapplication/json FilterCheckResult

GET /api/captures/{id}

One capture.

パラメータ

名前位置型必須説明
idpathstringはいCapture id

レスポンス

ステータス説明本文
200Captureapplication/json CaptureInfo
404Unknown idapplication/json ErrorBody

DELETE /api/captures/{id}

Removes a capture (a running one is stopped first; a saved pcapng file stays on disk).

パラメータ

名前位置型必須説明
idpathstringはいCapture id

レスポンス

ステータス説明本文
204Deleted
404Unknown idapplication/json ErrorBody

GET /api/captures/{id}/packets

The first N matching frames of a capture (live while it runs).

パラメータ

名前位置型必須説明
idpathstringはいCapture id

レスポンス

ステータス説明本文
200Kept framesapplication/json CapturedFrame[]
404Unknown idapplication/json ErrorBody

GET /api/captures/{id}/pcapng

The pcapng file of a finished capture started with save.

パラメータ

名前位置型必須説明
idpathstringはいCapture id

レスポンス

ステータス説明本文
200pcapng fileapplication/octet-stream
404Unknown id or nothing savedapplication/json ErrorBody
409Still runningapplication/json ErrorBody

POST /api/captures/{id}/stop

Stops a running capture (asynchronously; watch capture_state).

パラメータ

名前位置型必須説明
idpathstringはいCapture id

レスポンス

ステータス説明本文
200Stoppingapplication/json CaptureInfo
404Unknown idapplication/json ErrorBody
409Already endedapplication/json ErrorBody

events

WebSocket のイベント配信。

GET /api/ws

WebSocket upgrade.

レスポンス

ステータス説明本文
101WebSocket: JSON ServerEvent messagesapplication/json ServerEvent

terminal

Web terminal: SSH / Telnet sessions, session logs, host keys

GET /api/terminal/known-hosts

Trusted SSH host keys (<data_dir>/terminal/known_hosts).

レスポンス

ステータス説明本文
200Host keysapplication/json KnownHost[]

DELETE /api/terminal/known-hosts/{host}/{port}

Forgets the host key(s) of host:port (after a legitimate key change).

パラメータ

名前位置型必須説明
hostpathstringはいHost as stored
portpathintegerはいPort

レスポンス

ステータス説明本文
204Removed
404No key storedapplication/json ErrorBody

GET /api/terminal/logs

Session logs, newest first.

レスポンス

ステータス説明本文
200Logsapplication/json LogInfo[]

GET /api/terminal/logs/{name}

Downloads a session log (text/plain, also while it is being written).

パラメータ

名前位置型必須説明
namepathstringはいLog file name

レスポンス

ステータス説明本文
200The logtext/plain
404Unknown logapplication/json ErrorBody

DELETE /api/terminal/logs/{name}

Deletes a session log (not one that is being written).

パラメータ

名前位置型必須説明
namepathstringはいLog file name

レスポンス

ステータス説明本文
204Deleted
404Unknown logapplication/json ErrorBody
409invalid_state: the session is still recordingapplication/json ErrorBody

GET /api/terminal/status

Configuration and running sessions (also when the terminal is disabled, so the UI can explain how to enable it).

レスポンス

ステータス説明本文
200Terminal statusapplication/json TerminalStatus

GET /api/terminal/ws

Opens a terminal session (WebSocket). Send connect first; see TerminalClientMessage / TerminalServerMessage. Remote output arrives as binary frames, keystrokes may be sent as binary frames or input messages.

レスポンス

ステータス説明本文
101WebSocket: TerminalServerMessage JSON + binary outputapplication/json TerminalServerMessage
403terminal_disabled (terminal.enabled = false) or forbidden (viewer role)application/json ErrorBody

snmp

SNMP manager tool: Get / Walk / Set / traps, MIBs, trap receiver, pcap recording

GET /api/snmp/capture

Recording state.

レスポンス

ステータス説明本文
200Stateapplication/json CaptureStatus

POST /api/snmp/capture

Starts / stops the recording of every SNMP datagram this server sends or receives (requests, responses, traps), or clears it.

リクエスト本文: application/json CaptureControl

レスポンス

ステータス説明本文
200Stateapplication/json CaptureStatus

GET /api/snmp/capture/download

The recorded frames as a pcap / pcapng file (Ethernet / IP / UDP synthesised around the real datagrams; placeholder MAC addresses).

パラメータ

名前位置型必須説明
formatpathstring | nullはいpcap (default) or pcapng.

レスポンス

ステータス説明本文
200pcap / pcapng fileapplication/octet-stream
400Unknown formatapplication/json ErrorBody

POST /api/snmp/get

GetRequest.

リクエスト本文: application/json SnmpOidsRequest

レスポンス

ステータス説明本文
200Response (check error_status)application/json SnmpResult
400Bad target / OID / v3 settingsapplication/json ErrorBody
502snmp_error: Report PDU, authentication or decoding failureapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

POST /api/snmp/getbulk

GetBulkRequest (v2c / v3).

リクエスト本文: application/json SnmpBulkRequest

レスポンス

ステータス説明本文
200Responseapplication/json SnmpResult
400Bad request (also: GetBulk on v1)application/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

POST /api/snmp/getnext

GetNextRequest.

リクエスト本文: application/json SnmpOidsRequest

レスポンス

ステータス説明本文
200Responseapplication/json SnmpResult
400Bad requestapplication/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

POST /api/snmp/inform

Sends an InformRequest (v2c / v3) and waits for the acknowledgement.

リクエスト本文: application/json SnmpNotifyRequest

レスポンス

ステータス説明本文
200Acknowledged (the Response’s bindings)application/json SnmpResult
400Bad request (also: inform on v1)application/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: not acknowledgedapplication/json ErrorBody

GET /api/snmp/mibs

Loaded MIB modules with their load state.

レスポンス

ステータス説明本文
200Modulesapplication/json MibModuleOut[]

POST /api/snmp/mibs

Uploads MIB files (stored under <data_dir>/mibs, loaded at once).

リクエスト本文: application/json MibUpload

レスポンス

ステータス説明本文
200Per-file result and module stateapplication/json MibUploadResult
400Bad file name / too largeapplication/json ErrorBody

GET /api/snmp/mibs/node

Details of a MIB node (longest-prefix match for instances).

パラメータ

名前位置型必須説明
idpathstringはいName (ifOperStatus, IF-MIB::ifOperStatus, ifOperStatus.3) or dotted OID.

レスポンス

ステータス説明本文
200Nodeapplication/json NodeOut
400Unparsable idapplication/json ErrorBody
404No MIB defines itapplication/json ErrorBody

GET /api/snmp/mibs/search

Finds MIB objects by name (for OID autocompletion).

パラメータ

名前位置型必須説明
qpathstringはいPart of a descriptor (ifOper, IF-MIB::ifH).
limitpathinteger | nullはいMost hits (default 20, at most 200).

レスポンス

ステータス説明本文
200Hits, prefix matches firstapplication/json SearchHit[]

GET /api/snmp/mibs/tree

One level of the MIB tree.

パラメータ

名前位置型必須説明
oidpathstring | nullはいParent (name or dotted OID; empty = the roots).
modulepathstring | nullはいOnly the branches leading to definitions of this module; without oid, the module’s top nodes.

レスポンス

ステータス説明本文
200Childrenapplication/json TreeChildOut[]
400Unknown name or moduleapplication/json ErrorBody

DELETE /api/snmp/mibs/{module}

Deletes an uploaded module (its whole file). Bundled modules cannot be deleted.

パラメータ

名前位置型必須説明
modulepathstringはいModule name

レスポンス

ステータス説明本文
200Deletedapplication/json MibDeleted
404Unknown moduleapplication/json ErrorBody
409read_only: bundled moduleapplication/json ErrorBody

GET /api/snmp/receiver

Receiver state.

レスポンス

ステータス説明本文
200Stateapplication/json ReceiverStatus

POST /api/snmp/receiver/start

Starts (or restarts) the trap / inform receiver.

リクエスト本文: application/json ReceiverStart

レスポンス

ステータス説明本文
200Listeningapplication/json ReceiverStatus
400Bad address / usersapplication/json ErrorBody
502backend_error: cannot bind (privileged port, in use)application/json ErrorBody

POST /api/snmp/receiver/stop

Stops the receiver.

レスポンス

ステータス説明本文
200Stoppedapplication/json ReceiverStatus

POST /api/snmp/set

SetRequest.

リクエスト本文: application/json SnmpSetRequest

レスポンス

ステータス説明本文
200Response (check error_status: notWritable, wrongType, …)application/json SnmpResult
400Bad target / OID / valueapplication/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

GET /api/snmp/status

Whether the SNMP tool is enabled, with MIB / receiver / recording summaries.

レスポンス

ステータス説明本文
200Statusapplication/json SnmpStatus

POST /api/snmp/trap

Sends a trap (v1 Trap-PDU, SNMPv2-Trap, or a v3 trap with this server as the authoritative engine). The result lists the bindings sent.

リクエスト本文: application/json SnmpNotifyRequest

レスポンス

ステータス説明本文
200Sentapplication/json SnmpResult
400Bad requestapplication/json ErrorBody

GET /api/snmp/traps

Received notifications, newest first (also pushed as snmp_trap events on the WebSocket).

パラメータ

名前位置型必須説明
limitpathinteger | nullはいMost notifications (default 200, at most 1000).

レスポンス

ステータス説明本文
200Notificationsapplication/json TrapOut[]

DELETE /api/snmp/traps

Forgets the received notifications.

レスポンス

ステータス説明本文
204Cleared

POST /api/snmp/walk

Walks one or more subtrees (GetBulk on v2c / v3, GetNext on v1); conceptual tables in the result are also returned as rows × columns.

リクエスト本文: application/json SnmpWalkRequest

レスポンス

ステータス説明本文
200Bindings and tablesapplication/json SnmpResult
400Bad requestapplication/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

dhcp

DHCP server tool: DHCPv4 / DHCPv6 (IA_NA, IA_PD) pools and options, router advertisements, leases, activity

GET /api/dhcp

State, settings and counters.

レスポンス

ステータス説明本文
200Stateapplication/json DhcpStatus
404dhcp.enabled = falseapplication/json ErrorBody

PUT /api/dhcp

Saves the settings; a running server restarts with them.

リクエスト本文: application/json DhcpUpdate

レスポンス

ステータス説明本文
200Savedapplication/json DhcpStatus
400Invalid settings (details: [{ field, message }])application/json ErrorBody
403policy_violation: interface not in tx.allowed_ifacesapplication/json ErrorBody
502backend_error: the restart failedapplication/json ErrorBody

GET /api/dhcp/activity

Recent requests and replies, newest first (wpg_dhcp::Activity).

パラメータ

名前位置型必須説明
limitpathinteger | nullはいMost entries returned (newest first; default 200).

レスポンス

ステータス説明本文
200Activityapplication/json object``[]

DELETE /api/dhcp/activity

Clears the activity log.

レスポンス

ステータス説明本文
204Cleared

GET /api/dhcp/leases

Leases (wpg_dhcp::Lease: kind v4 / na / pd, addr, plen, client, iaid, mac, hostname, state, expires, updated).

レスポンス

ステータス説明本文
200Leasesapplication/json object``[]

DELETE /api/dhcp/leases

Deletes one lease (key) or all of them. The client keeps using the address until it renews.

パラメータ

名前位置型必須説明
keypathstring | nullはいThe lease (192.168.100.10, 2001:db8::10, 2001:db8:100::/56); absent: every lease.

レスポンス

ステータス説明本文
204Deleted
404No such leaseapplication/json ErrorBody

POST /api/dhcp/start

Starts (or restarts) the server; it also starts at boot until stopped.

レスポンス

ステータス説明本文
200Runningapplication/json DhcpStatus
400No / unknown interface, invalid settingsapplication/json ErrorBody
502backend_error: sockets (ports 67 / 547 need CAP_NET_BIND_SERVICE, RA CAP_NET_RAW; Linux only)application/json ErrorBody

POST /api/dhcp/stop

Stops the server (and its start at boot).

レスポンス

ステータス説明本文
200Stoppedapplication/json DhcpStatus

スキーマ

上記で参照しているリクエスト・レスポンス本文の型です。

ActiveSession

A running session (GET /api/terminal/status).

キー型必須説明
hoststringはいTarget host as entered.
idstringはいSession id.
logstring | nullLog file being written, if recording.
portintegerはいTarget port.
protocolProtocolはいProtocol.
startedintegerはいStart (Unix seconds).
userstringはいwpg user who opened it.
viastring``[]SSH jump hosts in order (user@host:port), empty for a direct session.

AuthStatus

GET /api/auth/status.

キー型必須説明
authenticatedbooleanはいThe request carries a valid session.
configuredbooleanはいA password exists (configured or set on the setup screen).
csrf_tokenstring | nullCSRF token to send as X-CSRF-Token on POST / PUT / DELETE (also in the wpg_csrf cookie); null when not logged in.
setup_requiredbooleanはいNo password yet: show the setup screen (POST /api/auth/setup).
userUserInfo | null

BackendItem

One transmit backend.

キー型必須説明
availablebooleanはいCompiled in and supported on this OS (privileges not checked).
multi_workerbooleanはいSeveral TX workers per job.
namestringはいName (null, pcapfile, afpacket, pcap, afxdp, dpdk).
reasonstring | nullWhy it is unavailable / requirements.

Backends

GET /api/system/backends response body.

キー型必須説明
backendsBackendItem[]はいAll backends.
defaultstringはいBackend used when a job names none.

CaptureControl

POST /api/snmp/capture body.

キー型必須説明
clearbooleanDiscard the recorded frames first.
enabledboolean | nullStart (true) / stop (false) recording.

CaptureInfo

A capture as returned by the API.

キー型必須説明
backendstringはいResolved backend.
filterstringはいNormalised filter text (empty = every frame).
finishedinteger | nullEnd time, Unix milliseconds.
idstringはいCapture id.
ifacestringはいResolved interface (input path for pcapfile).
namestringはいDisplay name (spec.name, else <backend>:<iface>).
savedbooleanはいWhether a pcapng file was written (download with GET /api/captures/{id}/pcapng).
specCaptureSpecはいThe request.
startedintegerはいStart time, Unix milliseconds.
statsobject | nullLatest statistics (wpg_rx::RxSnapshot).
statusobjectはい{ "state": "running" }, { "state": "finished", "detail": "count_reached" | "duration_elapsed" | "end_of_input" | "stopped" }, { "state": "failed", "detail": "<error>" }.

CaptureSpec

What to capture (all fields are optional).

キー型必須説明
backendstring | nullBackend: afpacket, pcap, pcapfile, null (default: afpacket on Linux, else pcap).
countinteger | nullStop after this many matching frames.
durationstring | nullStop after this long, e.g. 10s, 2m.
filterstring | nulltcpdump-style filter (udp port 5001 and wpg); empty = every frame.
ifacestring | nullInterface (any = every interface with afpacket); for pcapfile the name of a capture file under <data_dir>/captures (e.g. a dry-run output).
include_outgoingbooleanAlso count frames this host transmits.
keepintegerMatching frames kept for display (default 100, at most 10000).
namestring | nullDisplay name.
promiscbooleanPromiscuous mode.
savestring | nullSave the matching frames as a pcapng file of this name under <data_dir>/captures.
verifybooleanCheck the signatures of matching frames (loss / order / latency).

CaptureStatus

pcap recording state.

キー型必須説明
droppedintegerはいFrames dropped because the buffer was full.
enabledbooleanはいRecording.
framesintegerはいKept frames.

CapturedFrame

One kept frame.

キー型必須説明
hexstringはいCaptured octets as lower-case hex (decode with POST /api/parse).
indexintegerはいPosition among the matching frames (0-based).
lenintegerはいOriginal length.
signatureobject | nullThe frame’s signature (stream_id, seq, ts_ns), if any.
ts_nsintegerはいCapture time, nanoseconds since the Unix epoch.

ClientMessage

Client → server message.

type: "subscribe"

Selects the jobs whose stats / job_state events are sent.

キー型必須説明
jobsobject"all" or a list of job ids.
logsboolean | nullReceive log events (default true).
type"subscribe"はい

CreateJob

POST /api/jobs body: a [JobSpec] plus start.

キー型必須説明
startbooleanStart immediately (default true); false leaves it in state created.

CreateToken

POST /api/tokens body.

キー型必須説明
expires_in_daysinteger | nullExpiry in days (1 to 3650); omitted or null: never expires.
namestringはいName, to recognise the token later (1 to 100 characters).

CreatedToken

POST /api/tokens response.

キー型必須説明
secretstringはいThe secret to send as Authorization: Bearer <secret>. Only this response contains it.
tokenTokenInfoはいThe stored token.

DhcpStatus

GET /api/dhcp.

キー型必須説明
added_addressesstring``[]Addresses this server put on the interface (removed when it stops).
enabledbooleanはいdhcp.enabled.
errorstring | nullWhy the last start (at boot) failed.
ifacestringはいInterface used (pinned or chosen; empty: none chosen yet).
leasesintegerはいLeases in the table.
pinned_ifacestring | nulldhcp.iface (fixed at deploy time); the screen cannot change it.
runningbooleanはいAnswering.
server_duidstring | nullDHCPv6 server DUID in use.
server_ipstring | nullDHCPv4 server identifier in use.
settingsobjectはいPools and options (wpg_dhcp::Settings).
started_msinteger | nullStart time (milliseconds since the Unix epoch).
statsobjectはいPacket counters of the running server.
supportedbooleanはいBuilt for Linux (elsewhere the server cannot start).

DhcpUpdate

PUT /api/dhcp body.

キー型必須説明
ifacestring | nullInterface to answer on (ignored when dhcp.iface pins one; must be allowed by tx.allowed_ifaces).
settingsobjectはいPools and options (wpg_dhcp::Settings: v4, v6).

EndReason

Why a job ended normally (mirrors wpg_tx::job::FinishReason).

型: "count_reached" | "duration_elapsed" | "source_exhausted" | "stopped"

ErrorBody

{ "error": ... } body (OpenAPI schema of every error response).

キー型必須説明
errorErrorInfoはいThe error.

ErrorInfo

Error object.

キー型必須説明
codestringはいStable machine code: not_found, bad_request, invalid_template, policy_violation, read_only, invalid_state, backend_error, unauthorized, setup_required, rate_limited, csrf_failed, forbidden, already_configured, terminal_disabled, snmp_error, internal.
detailsanyExtra data, e.g. the lint issues of an invalid template.
messagestringはいHuman readable message in the language of Accept-Language.

ExtensionFile

One loaded extension file.

キー型必須説明
bindingsintegerはいNumber of its bind entries.
protocolsstring``[]はいIds of the protocols it defines.
sourcestringはいThe file.

Favorite

Body of POST /api/templates/{id}/favorite (empty body = toggle).

キー型必須説明
favoritebooleanはいNew value.

FavoriteState

POST /api/templates/{id}/favorite response.

キー型必須説明
favoritebooleanはいCurrent value.
idstringはいTemplate id.

FilterCheck

POST /api/captures/filter request.

キー型必須説明
filterstringはいFilter text.

FilterCheckResult

POST /api/captures/filter response.

キー型必須説明
errorstring | nullWhat is wrong (when invalid).
normalizedstring | nullNormalised filter text (when valid).
okbooleanはいThe filter is valid.
posinteger | nullByte offset of the error (when invalid).

Health

GET /api/health response body.

キー型必須説明
localestringはいNegotiated locale.
messagestringはいLocalised human-readable status.
statusstringはいAlways "ok" when the server answers.
uptime_secsintegerはいSeconds since the server started.
versionstringはいServer version.

IfaceBrief

An interface on the dashboard.

キー型必須説明
allowedbooleanはいAllowed by the transmit policy.
loopbackbooleanはいLoopback.
namestringはいName.
runningbooleanはいCarrier / running.
speed_mbpsinteger | nullLink speed.
upbooleanはいAdministratively up.

JobBrief

A running job on the dashboard.

キー型必須説明
backendstringはいBackend.
bpsnumberはいL2 bits per second.
idstringはいJob id.
ifacestringはいInterface.
namestringはいName.
packetsintegerはいPackets sent.
ppsnumberはいPackets per second.
statusJobStatusはいState.

JobInfo

A job as returned by the API (also the persisted history record).

キー型必須説明
backendstringはいResolved backend.
createdintegerはいCreation time, Unix milliseconds.
finishedinteger | nullEnd time, Unix milliseconds.
idstringはいJob id.
ifacestringはいResolved interface (output path for pcapfile).
namestringはいDisplay name (spec.name, else the first template’s name).
plansobject``[]はいExpansion plan of each stream.
ratestringはいResolved rate.
reportobject | nullFinal report (after the job ended).
specJobSpecはいThe request.
startedinteger | nullStart time, Unix milliseconds.
statsobject | nullLatest statistics.
statusJobStatusはいCurrent state.
workersintegerはいTX workers.

JobSpec

What to send, where and how (all fields but streams are optional).

キー型必須説明
backendstring | nullBackend: null, pcapfile, afpacket, pcap, … (default: tx.default_backend).
batchinteger | nullFrames per send_batch call.
burstinteger | nullFrames per rate-control grant.
countinteger | nullTotal packets (default: the template’s tx.count for a single stream).
dry_runstring | nullDry run: write a pcapng file of this name under <data_dir>/captures instead of sending (forces the pcapfile backend).
durationstring | nullDuration limit, e.g. 10s, 2m.
ifacestring | nullInterface (not needed for null; the output file name for pcapfile).
mixMixInterleaving of several streams.
namestring | nullDisplay name.
pin_coresinteger``[]Core per worker (Linux).
planstring | nullExpansion strategy: auto, prerender, onthefly.
ramp_upstring | nullLinear rate ramp-up time, e.g. 5s.
ratestring | nullRate: 1000pps, 1Mpps, 10Gbps, 50%, ifg=10us, unlimited (default: the first template’s tx.rate, then tx.max_rate, else unlimited).
signaturebooleanStamp every frame with a receive-verification signature (magic + stream id + sequence number + TX time over the last 24 payload octets; see /api/captures with verify).
start_atstring | nullScheduled start: RFC 3339 or +10s.
stream_idinteger | nullSignature stream id of the first stream (stream i gets stream_id + i; default 0).
streamsJobStream[]Streams (at least one). Several streams are mixed into one TX worker.
workersinteger | nullTX worker threads (single stream only).

JobStatus

Job lifecycle state: { "state": "running" }, { "state": "finished", "detail": "count_reached" }, { "state": "failed", "detail": "<error>" }.

state: "created"

Created with start: false, not started yet.

キー型必須説明
state"created"はい

state: "scheduled"

Waiting for start_at.

キー型必須説明
state"scheduled"はい

state: "running"

Sending.

キー型必須説明
state"running"はい

state: "paused"

Paused.

キー型必須説明
state"paused"はい

state: "finished"

Ended normally (count_reached, duration_elapsed, source_exhausted, stopped).

キー型必須説明
detailEndReasonはいEnded normally (count_reached, duration_elapsed, source_exhausted, stopped).
state"finished"はい

state: "failed"

Ended with an error.

キー型必須説明
detailstringはいEnded with an error.
state"failed"はい

JobStream

One stream of a job: a stored template (template_id) or an inline one.

キー型必須説明
templateobject | nullInline template (takes precedence over template_id).
template_idstring | nullId of a stored template.
varsmap<string, ``string``>Template variable values (name → human notation).
weightintegerWeight for mix: weighted (0 counts as 1).

JobTotals

Dashboard aggregate of the running jobs.

キー型必須説明
activeintegerはいJobs that are scheduled, running or paused.
bpsnumberはいSum of the jobs’ L2 bits per second.
l1_bpsnumberはいSum of the jobs’ L1 bits per second.
ppsnumberはいSum of the jobs’ packets per second.
runningintegerはいJobs currently sending.

JumpHost

One SSH jump host of a [ConnectRequest].

キー型必須説明
hoststringはいHost name or address (resolved by the previous hop, or by the server for the first one).
passphrasestring | nullPassphrase of private_key.
passwordstring | nullPassword (also answers a single keyboard-interactive password prompt); empty: the server’s prompts are shown.
portinteger | nullSSH port (default 22).
private_keystring | nullPrivate key (OpenSSH / PEM / PuTTY .ppk text).
usernamestringはいUser name on the jump host.

KnownHost

A stored host key (GET /api/terminal/known-hosts).

キー型必須説明
algorithmstringはいKey algorithm (ssh-ed25519, rsa-sha2-512, …).
commentstringはいThe entry’s comment (who accepted it and when).
fingerprintstringはいSHA256:... fingerprint.
hoststringはいHost as typed by the user who accepted the key (lower case).
portintegerはいTCP port.

LintRequest

POST /api/lint request.

キー型必須説明
templateobjectはいTemplate: object or YAML text.

LintResponse

POST /api/lint response.

キー型必須説明
errorsintegerはいNumber of errors.
issuesobject``[]はいFindings (level, path, key, args, localised message).
okbooleanはいNo errors (warnings allowed).
warningsintegerはいNumber of warnings.

LogInfo

A past or running session log (GET /api/terminal/logs).

キー型必須説明
activebooleanはいStill being written by a live session.
modifiedintegerはいLast modification (Unix seconds).
namestringはいFile name (the id in /api/terminal/logs/{name}).
sizeintegerはいSize in bytes.

LoginRequest

POST /api/auth/login body.

キー型必須説明
passwordstringはいPassword.
usernamestring | nullUser name (default admin).

MibDeleted

Removed modules.

キー型必須説明
removedstring``[]はいModules removed with the file.

MibFileIn

One file of an upload.

キー型必須説明
contentstringはいFile content (text).
namestringはいFile name (CISCO-SMI.my; .mib, .txt, .my, .smi, .asn, .asn1 or none).

MibModuleOut

A loaded MIB module.

キー型必須説明
bundledbooleanはいBundled with wpg (cannot be deleted).
errorsstring``[]はいProblems: parse warnings, unresolved definitions.
filestring | nullUploaded file it came from.
missing_importsstring``[]はいModules named in IMPORTS that are not loaded (upload them).
namestringはいModule name.
nodesintegerはいResolved definitions.
statusstringはいok, partial (loaded with problems) or error.

MibUpload

POST /api/snmp/mibs body.

キー型必須説明
filesMibFileIn[]はいFiles.

MibUploadResult

POST /api/snmp/mibs result.

キー型必須説明
filesUploadedFile[]はいPer file.
modulesMibModuleOut[]はいThe state of the uploaded modules after loading (missing imports are named here).

Mix

How several streams are interleaved.

型: "weighted" | "sequential" | "round_robin"

NamedNumber

An enumeration value / BITS position.

キー型必須説明
labelstringはいLabel.
valueintegerはいNumber.

NodeOut

MIB node details.

キー型必須説明
accessstring | nullMAX-ACCESS.
augmentsstring | nullAUGMENTS.
base_typestring | nullBase type.
defvalstring | nullDEFVAL.
descriptionstring | nullDESCRIPTION.
display_hintstring | nullDISPLAY-HINT.
enumsNamedNumber[]はいEnumeration / BITS names.
indexstring``[]はいINDEX (of a row; AUGMENTS followed).
instancestringはいInstance part of the requested id (3 of ifDescr.3).
kindstringはいobject_type, object_identifier, …
modulestringはいModule.
namestringはいDescriptor.
objectsstring``[]はいOBJECTS / VARIABLES (notifications).
oidstringはいOID of the definition.
pathPathElem[]はいPath from the root.
referencestring | nullREFERENCE.
rolestring | nullTable / row / column / scalar.
statusstring | nullSTATUS.
syntaxstring | nullSYNTAX text.
type_namestring | nullTextual convention.
unitsstring | nullUNITS.

Overview

GET /api/stats/overview response.

キー型必須説明
historyintegerはいJobs in the history.
ifacesIfaceBrief[]はいInterfaces.
jobsJobBrief[]はいActive jobs.
templatesintegerはいTemplates in the library.
totalsJobTotalsはいTotals over the active jobs.
uptime_secsintegerはいSeconds since the server started.

ParseRequest

POST /api/parse request.

キー型必須説明
bytes_hexstringはいFrame bytes as hex (whitespace, : / - separators and 0x allowed).
fcsbooleanThe frame ends with a 4-octet FCS.
first_protocolstring | nullProtocol of the first octet (default ethernet2).

ParseResponse

POST /api/parse response.

キー型必須説明
bytes_hexstringはいNormalised hex of the input.
diagnosticsobject``[]はいParse and build findings with localised message.
layoutobject``[]はいLayer / field positions.
lenintegerはいFrame length in octets.
packetobjectはいDecoded packet (wpg_core::Packet: layers with Manual field values).
trailersobject``[]はいPadding / FCS.

PathElem

Breadcrumb element.

キー型必須説明
namestringはいName (or the number).
oidstringはいOID.

PromptItem

One keyboard-interactive prompt.

キー型必須説明
echobooleanはいWhether the answer may be shown while typed.
promptstringはいPrompt text from the server.

Protocol

Remote protocol.

型: "ssh" | "telnet"

ProtocolSummary

Catalog entry.

キー型必須説明
fieldsstring``[]はいField names in wire order.
idstringはいStable id (ethernet2, ipv4, …).
layerobjectはいPalette classification (l2, l3, l4, payload, …).
namestringはいDisplay name.
nextstring``[]はいProtocols this one can carry (its next-layer binding table).
synthbooleanはいContent generator instead of wire fields (payload).

ReceiverStart

POST /api/snmp/receiver/start body.

キー型必須説明
communitiesstring``[]Accepted communities (empty = any; others are listed with an error).
listenstringはいListen address (0.0.0.0:162, [::]:1162).
usersReceiverUserIn[]v3 users (kept in memory while the receiver runs).

ReceiverStatus

Trap receiver state.

キー型必須説明
communitiesstring``[]はいAccepted communities (empty = any).
engine_idstringはいThis receiver’s engine id (hex), for v3 informs.
from_configbooleanはいStarted at boot from snmp.trap_listen.
listenstring | nullBound address.
receivedintegerはいNotifications received since the start.
runningbooleanはいListening.
usersstring``[]はいConfigured v3 user names.

ReceiverUserIn

A v3 user of the receiver.

キー型必須説明
auth_passwordstring | nullAuthentication pass phrase.
auth_protocolstring | nullAuthentication protocol (default SHA).
priv_passwordstring | nullPrivacy pass phrase.
priv_protocolstring | nullPrivacy protocol (default AES).
userstringはいUser name.

ReloadResult

Result of POST /api/protocols/reload.

キー型必須説明
dirsstring``[]はいDirectories that were read.
filesExtensionFile[]はいThe files now in use, in load order.

RenderRequest

POST /api/render request.

キー型必須説明
countinteger | nullPackets to render (1..=server.preview_max, default 1; 256 unless configured).
indexinteger | nullStream index of the first packet (default 0).
templateobjectはいTemplate: object (JSON form of .wpg.yaml) or YAML text.
varsmap<string, ``string``>Variable values.

RenderResponse

POST /api/render response.

キー型必須説明
cardinalityinteger | nullPackets in the whole stream (null = unbounded).
packetsRenderedPacket[]はいThe packets.
planobjectはいHow a job would expand the stream (pre-render vs on-the-fly).

RenderedPacket

One rendered packet.

キー型必須説明
bytes_hexstringはいFrame bytes as lower-case hex (without FCS unless the template asks for one).
diagnosticsobject``[]はいBuilder findings with localised message.
indexintegerはいStream index.
layoutobject``[]はいLayer / field positions (wpg_core::LayerLayout).
lenintegerはいLength in octets.
trailersobject``[]はいPadding / FCS after the layers.

Role

A user role (only admin is created for now; operator / viewer are P1).

型: "admin" | "operator" | "viewer"

SearchHit

A search hit.

キー型必須説明
kindstringはいKind.
modulestringはいModule.
namestringはいDescriptor.
oidstringはいOID.
rolestring | nullTable / row / column / scalar.
syntaxstring | nullSYNTAX text.

ServerEvent

One message from the server to WebSocket clients.

type: "stats"

Latest statistics of a running job (every 100 ms, one per job).

キー型必須説明
job_idstringはいJob id.
snapshotobjectはいCounters and rates (wpg_tx::job::StatsSnapshot).
type"stats"はい

type: "job_state"

A job changed state.

キー型必須説明
job_idstringはいJob id.
stateJobStatusはいNew state.
type"job_state"はい

type: "log"

A log line (ts, level, target, message, fields).

キー型必須説明
type"log"はい

type: "templates_changed"

The template index changed (file watcher or API write).

キー型必須説明
type"templates_changed"はい

type: "rx_stats"

Latest statistics of a capture (every 100 ms while it runs, once more at the end).

キー型必須説明
capture_idstringはいCapture id.
snapshotobjectはいCounters, rates and verification (wpg_rx::RxSnapshot).
type"rx_stats"はい

type: "capture_state"

A capture started or ended.

キー型必須説明
capture_idstringはいCapture id.
stateobjectはいNew state ({ "state": "running" | "finished" | "failed", "detail" }).
type"capture_state"はい

type: "snmp_trap"

The SNMP trap receiver got a notification (also listed by GET /api/snmp/traps).

キー型必須説明
trapTrapOutはいThe rendered notification.
type"snmp_trap"はい

type: "dhcp_activity"

The DHCP server handled a request or sent a router advertisement (also listed by GET /api/dhcp/activity).

キー型必須説明
activityobjectはいThe exchange (wpg_dhcp::Activity).
type"dhcp_activity"はい

type: "dhcp_state"

The DHCP server started / stopped, its settings changed or leases expired / were deleted: reload GET /api/dhcp.

キー型必須説明
type"dhcp_state"はい

type: "protocols_changed"

The user-defined protocols were reloaded (POST /api/protocols/reload): fetch GET /api/protocols and GET /api/protocols/extensions again.

キー型必須説明
type"protocols_changed"はい

SetupRequest

POST /api/auth/setup body.

キー型必須説明
confirmstringはいThe same password again.
passwordstringはいThe new admin password (at least 8 characters).

SnmpBulkRequest

GetBulk request body.

キー型必須説明
max_repetitionsinteger | nullmax-repetitions (default 10).
non_repeatersinteger | nullnon-repeaters (default 0).
oidsstring``[]はいObjects (the first non_repeaters are fetched once).
targetSnmpTargetはいThe agent.

SnmpNotifyRequest

Trap / Inform request body.

キー型必須説明
targetSnmpTargetはいThe receiver (port default 162).
trap_oidstringはいsnmpTrapOID (linkDown, IF-MIB::linkUp, 1.3.6.1.6.3.1.1.5.1). v1 traps are converted per RFC 3584.
uptimeinteger | nullsysUpTime in hundredths of a second (default: the server’s uptime).
varbindsVarBindIn[]Extra bindings.

SnmpOidsRequest

Get / GetNext request body.

キー型必須説明
oidsstring``[]はいObjects: names (sysDescr.0, IF-MIB::ifDescr.1) or dotted OIDs.
targetSnmpTargetはいThe agent.

SnmpResult

Result of an operation.

キー型必須説明
elapsed_msnumberはいRound trip(s) in milliseconds.
engine_idstring | nullThe agent’s engine id (v3, hex).
error_indexintegerはいerror-index (1-based binding, 0 = none).
error_statusintegerはいerror-status of the response (0 = noError).
error_status_namestring | nullIts name (noSuchName, notWritable, …), when not 0.
opstringはいget, getnext, getbulk, walk, set, trap, inform.
requestsintegerはいRequests sent.
tablesTableOut[]Conceptual tables found among the bindings (walks).
targetstringはいThe agent / receiver address.
truncatedbooleanThe walk stopped at its limit.
varbindsVarBindOut[]はいThe bindings (response, walk results, or the notification sent).
versionstringはいv1, v2c, v3.

SnmpSetRequest

Set request body.

キー型必須説明
targetSnmpTargetはいThe agent.
varbindsVarBindIn[]はいBindings to set.

SnmpStatus

GET /api/snmp/status.

キー型必須説明
captureCaptureStatus | null
enabledbooleanはいsnmp.enabled.
mib_dirstringはいDirectory of uploaded MIBs.
modulesintegerはいLoaded modules.
nodesintegerはいResolved MIB nodes.
receiverReceiverStatus | null

SnmpTarget

Where to send a request.

キー型必須説明
communitystring | nullCommunity for v1 / v2c (default public).
hoststringはいHost name or address.
portinteger | nullUDP port (default 161 for requests, 162 for notifications).
retriesinteger | nullExtra attempts (default 1, at most 10).
timeout_msinteger | nullWait per attempt in milliseconds (default 2000, at most 60000).
v3V3In | null
versionSnmpVersionVersion (default v2c).

SnmpVersion

SNMP protocol version.

型: "v1" | "v2c" | "v3"

SnmpWalkRequest

Walk request body.

キー型必須説明
limitinteger | nullMost bindings returned in all (default 10000, at most 100000).
max_repetitionsinteger | nullmax-repetitions per GetBulk (default 20; v1 walks with GetNext).
oidstringSubtree root: name (ifTable, system) or dotted OID.
oidsstring``[]More subtree roots, walked one after another after oid (either may be empty, not both).
targetSnmpTargetはいThe agent.

TableColumnOut

A table column.

キー型必須説明
counterbooleanはいCounter column (rates make sense).
namestringはいDescriptor.
oidstringはいColumn OID.
syntaxstringはいSyntax text.

TableOut

A conceptual table assembled from walk results.

キー型必須説明
columnsTableColumnOut[]はいColumns present, in OID order.
entrystringはいIF-MIB::ifEntry.
index_namesstring``[]はいINDEX objects.
rowsTableRowOut[]はいRows in instance order.
tablestring | nullIF-MIB::ifTable.

TableRowOut

A table row.

キー型必須説明
cells(string | null)[]はいReadable cells (one per column; null = absent).
indexstring``[]はいDecoded INDEX values (empty when not decodable).
instancestringはいInstance sub-identifiers.
numeric(integer | null)[]はいNumeric cells (integer types).

TemplateDetail

A template with its index entry and lint findings.

キー型必須説明
issuesobject``[]はいLint findings with localised message.
summaryTemplateSummaryはいIndex entry.
templateobjectはいThe template (JSON form of .wpg.yaml).

TemplateList

GET /api/templates response.

キー型必須説明
recentstring``[]はいRecently used template ids, most recent first.
templatesTemplateSummary[]はいMatching templates, sorted by name.

TemplateSource

Where a template comes from.

型: "user" | "library"

TemplateSummary

Index entry of a template.

キー型必須説明
authorstring | nullAuthor.
descriptionstring | nullDescription in the requested language (meta.descriptions[lang], else meta.description, else meta.descriptions.en).
descriptionsmap<string, ``string``>All localised descriptions (language tag → text, e.g. ja, en).
errorstring | nullLoad error when the file does not parse.
favoritebooleanはいMarked as favourite.
idstringはいStable id (slug of the relative path).
last_usedinteger | nullLast use (open in the GUI, job start), Unix milliseconds.
modifiedinteger | nullFile modification time, Unix milliseconds.
namestringはいmeta.name (the file stem when the file does not parse).
pathstringはいPath relative to its root directory.
protocolsstring``[]はいProtocol stack, outermost first.
rootstringはいThe root directory.
sourceTemplateSourceはいLibrary or user template.
tagsstring``[]はいTags.
writablebooleanはいWhether it can be updated / deleted through the API.

TerminalClientMessage

Client → server message on /api/terminal/ws. Keystrokes may also arrive as binary frames (raw bytes).

type: "connect"

First message: opens the session.

キー型必須説明
type"connect"はい

type: "input"

Keystrokes / pasted text (UTF-8).

キー型必須説明
datastringはいThe text.
type"input"はい

type: "resize"

The terminal was resized.

キー型必須説明
colsintegerはいColumns.
rowsintegerはいRows.
type"resize"はい

type: "host_key"

Answer to a host_key prompt.

キー型必須説明
acceptbooleanはいTrust the key.
savebooleanStore it in the known hosts (otherwise trust it for this session).
type"host_key"はい

type: "auth_response"

Answers to an auth_prompt (one per prompt).

キー型必須説明
responsesstring``[]はいThe answers.
type"auth_response"はい

type: "record"

Starts / stops the session log.

キー型必須説明
enabledbooleanはいRecord from now on.
strip_ansiboolean | nullRemove escape sequences (default true).
type"record"はい

type: "disconnect"

Ends the session.

キー型必須説明
type"disconnect"はい

TerminalConnectRequest

connect: where to and how to log in.

キー型必須説明
colsintegerTerminal width.
hoststringはいHost name or address.
jumpJumpHost[]SSH jump hosts (ProxyJump), nearest first: the server logs in to each in turn and reaches the next one (and finally host) through a direct-tcpip channel. Works for SSH and Telnet targets.
passphrasestring | nullPassphrase of private_key.
passwordstring | nullSSH password (also answers a single keyboard-interactive password prompt).
portinteger | nullPort (default 22 / 23).
private_keystring | nullSSH private key (OpenSSH / PEM / PuTTY .ppk text).
protocolProtocolはいssh or telnet.
recordboolean | nullRecord a session log (default: terminal.record_sessions).
rowsintegerTerminal height.
strip_ansiboolean | nullRemove escape sequences from the log (default true).
usernamestring | nullSSH user name.

TerminalServerMessage

Server → client message on /api/terminal/ws. Remote output travels as binary frames.

type: "state"

Progress: resolving, connecting, authenticating; with jump hosts, jumping (opening the tunnel from host onwards) and the other phases carry the host they concern.

キー型必須説明
hoststring | nullThe host of this phase (sessions with jump hosts).
statestringはいThe phase.
type"state"はい

type: "host_key"

An unknown SSH host key: confirm the fingerprint (host_key message).

キー型必須説明
algorithmstringはいKey algorithm.
fingerprintstringはいSHA256:....
hoststringはいHost.
portintegerはいPort.
type"host_key"はい

type: "auth_prompt"

The server asks questions (keyboard-interactive, or the password when none was given): answer with auth_response.

キー型必須説明
hoststringはいThe host asking (the target or a jump host).
instructionsstringはいInstructions from the server.
namestringはいRequest name from the server.
promptsPromptItem[]はいThe prompts.
type"auth_prompt"はい

type: "connected"

The session is up.

キー型必須説明
addressstringはいAddress actually connected to.
fingerprintstring | nullSSH host key fingerprint.
hoststringはいHost.
portintegerはいPort.
protocolProtocolはいProtocol.
session_idstringはいSession id.
type"connected"はい
viastring``[]Jump hosts the session goes through (user@host:port).

type: "record"

Log state after connected / record.

キー型必須説明
enabledbooleanはいRecording.
filestring | nullThe log file (GET /api/terminal/logs/{name}).
type"record"はい

type: "error"

A failure; fatal ones are followed by closed.

キー型必須説明
codestringはいtarget_not_allowed, too_many_sessions, resolve_failed, connect_failed, host_key_changed, host_key_rejected, auth_failed, key_invalid, ssh_error, timeout, bad_request, recording_disabled, log_failed.
detailstring | nullUntranslated detail (an OS / protocol error).
fatalbooleanはいThe session ends.
infoobject | nullhost_key_changed: {algorithm, fingerprint, known_algorithm, known_fingerprint}; a failure at a jump host adds {hop: "host:port"}.
type"error"はい

type: "closed"

The session ended.

キー型必須説明
bytes_inintegerはいBytes received from the host.
bytes_outintegerはいBytes sent to the host.
duration_secsintegerはいSession length in seconds.
reasonstringはいremote (the host closed it), client, idle, shutdown, error.
type"closed"はい

TerminalStatus

GET /api/terminal/status.

キー型必須説明
allowed_targetsstring``[]はいterminal.allowed_targets (empty = any target).
enabledbooleanはいterminal.enabled.
idle_timeout_secsintegerはいterminal.idle_timeout_secs.
max_sessionsintegerはいterminal.max_sessions.
record_sessionsbooleanはいterminal.record_sessions.
sessionsActiveSession[]はいRunning sessions (all users).

TokenInfo

An API token as listed (never the secret).

キー型必須説明
createdintegerはいCreation time (Unix seconds).
expiresinteger | nullExpiry (Unix seconds); null: never expires.
idintegerはいToken id (for revoking).
last_usedinteger | nullLast use (Unix seconds, updated at most once a minute).
namestringはいName given at creation.
prefixstringはいThe first characters of the secret (wpg_ + 8 hex digits), to recognise it.
userstringはいOwner: requests with the token act as this user, with its role.

TrapOut

A received notification.

キー型必須説明
acknowledgedbooleanはいAn inform that was acknowledged.
communitystring | nullCommunity (v1 / v2c).
errorstring | nullWhy the message was not accepted (wrong community, digest, …).
idintegerはいSequence number (increasing).
levelstring | nullv3 security level.
pdu_typestring | nulltrap_v1, trap_v2, inform (absent when undecodable).
received_msintegerはいArrival, milliseconds since the Unix epoch.
sourcestringはいSender address:port.
trap_namestring | nullThe trap OID’s name (IF-MIB::linkDown).
trap_oidstring | nullsnmpTrapOID.0 (dotted).
uptimeinteger | nullsysUpTime.0 / v1 time-stamp (hundredths of a second).
uptime_textstring | nullUptime as 1d 02:03:04.56.
userstring | nullUser (v3).
v1V1Out | null
varbindsVarBindOut[]はいBindings (without sysUpTime.0 / snmpTrapOID.0).
versionstringはいv1, v2c, v3.

TreeChildOut

A tree entry.

キー型必須説明
arcintegerはいLast sub-identifier.
has_childrenbooleanはいSomething is defined below.
kindstring | nullobject_type, object_identifier, notification_type, …
modulestring | nullModule.
namestring | nullDescriptor (absent for an undefined intermediate OID).
oidstringはいOID.
rolestring | nullTable / row / column / scalar for OBJECT-TYPEs.

UploadedFile

Result of one uploaded file.

キー型必須説明
errorsstring``[]はいProblems (no module found: the file was not stored).
filestringはいStored file name.
modulesstring``[]はいModules found in it.
storedbooleanはいWhether the file was stored.

UserInfo

user of [AuthStatus].

キー型必須説明
namestringはいUser name.
roleRoleはいadmin, operator or viewer.

V1Out

SNMPv1 trap header.

キー型必須説明
agent_addrstringはいagent-addr.
enterprisestringはいenterprise (name or dotted).
genericintegerはいgeneric-trap.
specificintegerはいspecific-trap.

V3In

SNMPv3 parameters. The level follows from the pass phrases given: none = noAuthNoPriv, auth_password = authNoPriv, both = authPriv.

キー型必須説明
auth_passwordstring | nullAuthentication pass phrase (at least 8 characters).
auth_protocolstring | nullMD5, SHA (SHA-1), SHA-224, SHA-256, SHA-384, SHA-512 (default SHA).
context_engine_idstring | nullcontextEngineID (hex; default: the agent’s engine id).
context_namestring | nullcontextName.
priv_passwordstring | nullPrivacy pass phrase (at least 8 characters).
priv_protocolstring | nullDES, AES (AES-128), AES-192, AES-256 (default AES).
userstringはいUser name.

VarBindIn

A variable binding to send (Set, notifications).

キー型必須説明
oidstringはいObject instance: name (sysName.0, IF-MIB::ifAdminStatus.2) or dotted OID.
typestring | nullauto (default: from the MIB), or i / integer, u / unsigned, c / counter32, C / counter64, t / timeticks, a / ipaddress, o / oid, s / string, x / hex, d / decimal, n / null, opaque.
valuestringValue text (enum labels such as down and object names are accepted).

VarBindOut

A rendered variable binding.

キー型必須説明
instancestringはいInstance sub-identifiers (3).
modulestring | nullDefining module.
namestringはいIF-MIB::ifDescr.3 (numeric when no MIB knows it).
numericinteger | nullNumeric value of integer types (rates, charts).
objectstring | nullObject descriptor (ifDescr).
oidstringはいOID (dotted decimal).
rawstringはいThe value without MIB knowledge.
syntaxstring | nullTextual convention of the object (DisplayString, InterfaceIndex).
typestringはいWire type (Counter32, OCTET STRING, noSuchInstance, …).
unitsstring | nullUNITS of the object.
valuestringはいReadable value (enum labels, display hints, units, names).

VersionInfo

GET /api/version response body.

キー型必須説明
api_versionintegerはいREST API version (bumped on incompatible changes).
archstringはいTarget CPU architecture.
featuresstring``[]はいOptional features compiled in (pcap, …).
localesstring``[]はいSupported UI / message languages.
osstringはいTarget OS.
versionstringはいServer version.