Skip to content

Commit 57bc9a5

Browse files
committed
Add doc for status API
1 parent 90a8f88 commit 57bc9a5

2 files changed

Lines changed: 85 additions & 0 deletions

File tree

docs/pages/sdk/core-api/status.mdx

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Status API
2+
3+
ZeroDev provides a status API for monitoring uptime and performance metrics of RPC endpoints across different chains.
4+
5+
## API Documentation
6+
7+
### 1. Get Uptime & Chain List
8+
**Endpoint**: `GET /uptime`
9+
10+
Returns the service's overall uptime status and a list of supported chains. This is the primary endpoint for checking general service health.
11+
This returns uptime as a list of boolean values indicating health status for last 24 hours per minute.
12+
Additionally this returns a list of chains supported by our bundler service.
13+
14+
**Response Format**:
15+
```json
16+
{
17+
"uptime": {
18+
"uptimePercent": 99.9,
19+
"perMinute": [
20+
{
21+
"tsIso": "2023-10-27T10:00:00.000Z",
22+
"ts": 1698400800,
23+
"up": true
24+
}
25+
// ... list of boolean status per minute (last 24h window)
26+
]
27+
},
28+
"chains": [
29+
{
30+
"networkId": "42161",
31+
"networkName": "Arbitrum One"
32+
}
33+
// ... list of all supported chains
34+
]
35+
}
36+
```
37+
38+
---
39+
40+
### 2. Get Chain Performance
41+
**Endpoint**: `GET /performance/:chainId`
42+
43+
Returns detailed performance metrics for a specific chain. (for last 6 hours)
44+
This endpoint gives the error rate, and latency performance data for the specific chain for every minute, and also for major RPC methods
45+
46+
**Parameters**:
47+
- `chainId` (path parameter): The numeric ID of the network (e.g., `42161`).
48+
49+
**Response Format**:
50+
```json
51+
{
52+
"networkName": "Arbitrum One",
53+
"networkId": "42161",
54+
"perMinute": [
55+
{
56+
"minuteTs": 1698400800,
57+
"minuteISO": "2023-10-27T10:00:00.000Z",
58+
"requestCount": 1500,
59+
"errorCount": 5,
60+
"errorRatePercent": 0.33,
61+
"p95Ms": 120,
62+
"maxMs": 450,
63+
"p99Ms": 200,
64+
"perRPC": {
65+
"eth_call": {
66+
"requestCount": 1000,
67+
"errorCount": 2,
68+
"errorRatePercent": 0.2,
69+
"p95Ms": 110,
70+
"maxMs": 300,
71+
"p99Ms": 150
72+
}
73+
// ... metrics breakdown by RPC method
74+
}
75+
}
76+
]
77+
}
78+
```
79+
80+
**Errors**:
81+
- `400 Bad Request`: If `chainId` is not a number.

vocs.config.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ export default defineConfig({
172172
text: "Sign and Verify Messages",
173173
link: "/sdk/core-api/sign-and-verify",
174174
},
175+
{
176+
text: "Status & Uptime API",
177+
link: "/sdk/core-api/status",
178+
},
175179
],
176180
},
177181
{

0 commit comments

Comments
 (0)