Monitoring
Get usage analytics (time series)
Aggregates UsageStat by day/week/month. Optional **projectId** scopes to one project. Query **days** (1–90) for a rolling window (e.g. **days=14**); when set, overrides **period**.
GET
/api/monitoring/analyticsSDK setup
Create a client and set credentials (JWT and/or API key) before calling the API. Match the authentication type shown above.
import { Configuration, MonitoringApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const monitoring = new MonitoringApi(configuration);import { Configuration, MonitoringApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const monitoring = new MonitoringApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await monitoring.getMonitoringAnalytics();const { data: result } = await monitoring.getMonitoringAnalytics();Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
Use the auth endpoints to obtain a JWT.
No Request Yet
Send a request to see the full inspector
Authentication
Requires JWT
Note
Include your JWT in the
Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | No | — |
period | string | No | — |
granularity | string | No | — |
days | integer | No | Rolling window in days (1–90); when set, period becomes last_N_days |
Responses
200Stats series and totals
json
{
"period": "matrix program",
"granularity": "transmitter bypass",
"days": 4,
"stats": [
{
"date": "program generate",
"apiCalls": 33882,
"dbReads": 74005,
"dbWrites": 91312,
"storage": 8,
"bandwidth": 12372
}
],
"totals": {
"totalApiCalls": 128,
"totalDbReads": 218,
"totalDbWrites": 168,
"totalStorage": 72,
"totalBandwidth": 155
}
}{
"period": "matrix program",
"granularity": "transmitter bypass",
"days": 4,
"stats": [
{
"date": "program generate",
"apiCalls": 33882,
"dbReads": 74005,
"dbWrites": 91312,
"storage": 8,
"bandwidth": 12372
}
],
"totals": {
"totalApiCalls": 128,
"totalDbReads": 218,
"totalDbWrites": 168,
"totalStorage": 72,
"totalBandwidth": 155
}
}401—
404Project not found
Errors
| Code | Meaning |
|---|---|
401 | — |
404 | Project not found |