跳转到内容

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.

FieldTypeDescription
apiVersion (required)integerVersion of this HTTP API, currently 1.
backend (required)stringBackend in use, normally native.
capabilities (required)array of stringNames of the features this daemon supports, such as text-send and events.
product (required)stringProduct name, agent-wechat.
target (required)string, nullablePlatform the daemon was built for, as a Rust target triple such as x86_64-unknown-linux-gnu.
version (required)stringVersion of the daemon.

NativeStatus

Identity and state of the running daemon.

FieldTypeDescription
dataDir (required)stringPath of the data directory on the daemon’s host.
ownershipGeneration (required)stringRandom ID created each time the daemon starts. A shutdown request must repeat it.
pid (required)integerProcess ID of the daemon.
serverId (required)stringID of this daemon’s data directory. It is created once and kept across restarts.
state (required)stringDaemon state. It is ready while the daemon is serving requests.
version (required)NativeIdentityIdentity and build of the daemon.