Browse Source

docs: new `/global/health` API (#6006)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
opencode-agent[bot] 3 months ago
parent
commit
968543af39
2 changed files with 22 additions and 4 deletions
  1. 17 0
      packages/web/src/content/docs/sdk.mdx
  2. 5 4
      packages/web/src/content/docs/server.mdx

+ 17 - 0
packages/web/src/content/docs/sdk.mdx

@@ -123,6 +123,23 @@ The SDK exposes all server APIs through a type-safe client.
 
 ---
 
+### Global
+
+| Method            | Description                     | Response                             |
+| ----------------- | ------------------------------- | ------------------------------------ |
+| `global.health()` | Check server health and version | `{ healthy: true, version: string }` |
+
+---
+
+#### Examples
+
+```javascript
+const health = await client.global.health()
+console.log(health.data.version)
+```
+
+---
+
 ### App
 
 | Method         | Description               | Response                                    |

+ 5 - 4
packages/web/src/content/docs/server.mdx

@@ -68,11 +68,12 @@ The opencode server exposes the following APIs.
 
 ---
 
-### Global Events
+### Global
 
-| Method | Path            | Description                    | Response     |
-| ------ | --------------- | ------------------------------ | ------------ |
-| `GET`  | `/global/event` | Get global events (SSE stream) | Event stream |
+| Method | Path             | Description                    | Response                             |
+| ------ | ---------------- | ------------------------------ | ------------------------------------ |
+| `GET`  | `/global/health` | Get server health and version  | `{ healthy: true, version: string }` |
+| `GET`  | `/global/event`  | Get global events (SSE stream) | Event stream                         |
 
 ---