System
此内容尚不支持你的语言。
GET /health
Report that the daemon is running. This is the only route that needs no token.
Scope: none (no token needed)
POST /v1/daemon/shutdown
Stop the daemon. The body repeats the process ID, server ID and ownership generation from the status route, so a stale caller cannot stop a newer daemon.
Scope: owner
Request body: any
GET /v1/status
Show the daemon identity, version, data directory and state.
Scope: read
Response: NativeStatus
Types
NativeIdentity
Which daemon is running and what it supports.
| Field | Type | Description |
|---|---|---|
apiVersion (required) | integer | Version of this HTTP API, currently 1. |
backend (required) | string | Backend in use, normally native. |
capabilities (required) | array of string | Names of the features this daemon supports, such as text-send and events. |
product (required) | string | Product name, agent-wechat. |
target (required) | string, nullable | Platform the daemon was built for, as a Rust target triple such as x86_64-unknown-linux-gnu. |
version (required) | string | Version of the daemon. |
NativeStatus
Identity and state of the running daemon.
| Field | Type | Description |
|---|---|---|
dataDir (required) | string | Path of the data directory on the daemon’s host. |
ownershipGeneration (required) | string | Random ID created each time the daemon starts. A shutdown request must repeat it. |
pid (required) | integer | Process ID of the daemon. |
serverId (required) | string | ID of this daemon’s data directory. It is created once and kept across restarts. |
state (required) | string | Daemon state. It is ready while the daemon is serving requests. |
version (required) | NativeIdentity | Identity and build of the daemon. |