Skip to content

Admin Endpoints

Administrative endpoints for managing the Fizzy MCP hosted service. These endpoints require admin-level authentication and are intended for service operators and organization administrators.

Admin endpoints require authentication via API key or admin session:

Terminal window
curl -H "X-API-Key: your-admin-api-key" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/settings

Alternatively, use an admin session cookie when accessing via browser.

MethodEndpointDescription
GET/api/admin/settingsGet all settings
PATCH/api/admin/settingsUpdate settings
POST/api/admin/settings/resetReset to defaults
GET/api/admin/stats/overviewGlobal usage stats
GET/api/admin/stats/toolsPer-tool statistics

GET /api/admin/settings Admin Only

Section titled “GET /api/admin/settings ”

Retrieves all current service configuration settings.

Terminal window
curl -H "X-API-Key: your-admin-api-key" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/settings
{
"data": {
"service": {
"name": "Fizzy MCP Hosted",
"environment": "production",
"debug": false,
"maintenanceMode": false
},
"rateLimits": {
"enabled": true,
"defaultTier": "free",
"tiers": {
"free": {
"requestsPerMinute": 60,
"dailyLimit": 1000,
"burstLimit": 10
},
"pro": {
"requestsPerMinute": 300,
"dailyLimit": 10000,
"burstLimit": 50
},
"enterprise": {
"requestsPerMinute": 1000,
"dailyLimit": -1,
"burstLimit": 100
}
}
},
"mcp": {
"toolsEnabled": true,
"maxConcurrentRequests": 10,
"timeoutMs": 30000,
"enabledTools": ["all"]
},
"logging": {
"level": "info",
"includeRequestBodies": false,
"retentionDays": 30
},
"security": {
"allowedOrigins": ["*"],
"requireHttps": true,
"tokenExpiry": "30d"
},
"features": {
"usageTracking": true,
"analyticsEnabled": true,
"webhooksEnabled": false
}
},
"meta": {
"lastModified": "2024-01-10T15:30:00.000Z",
"modifiedBy": "admin@example.com",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}
SettingTypeDescription
namestringService display name
environmentstringproduction, staging, or development
debugbooleanEnable debug logging
maintenanceModebooleanEnable maintenance mode
SettingTypeDescription
enabledbooleanEnable rate limiting
defaultTierstringDefault tier for new users
tiersobjectPer-tier limit configurations
SettingTypeDescription
toolsEnabledbooleanEnable MCP tools
maxConcurrentRequestsnumberMax concurrent requests per user
timeoutMsnumberRequest timeout in milliseconds
enabledToolsarrayList of enabled tools (["all"] or specific tool names)
SettingTypeDescription
levelstringLog level: debug, info, warn, error
includeRequestBodiesbooleanLog request bodies (privacy implications)
retentionDaysnumberDays to retain logs
Terminal window
curl -s -H "X-API-Key: your-admin-api-key" \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/settings" | \
jq '.data.rateLimits.tiers'

PATCH /api/admin/settings Admin Only

Section titled “PATCH /api/admin/settings ”

Updates service configuration settings. Only provided fields are updated; others remain unchanged.

Terminal window
curl -X PATCH \
-H "X-API-Key: your-admin-api-key" \
-H "Content-Type: application/json" \
-d '{
"rateLimits": {
"tiers": {
"free": {
"requestsPerMinute": 100
}
}
},
"logging": {
"level": "debug"
}
}' \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/settings

Provide only the settings you want to update. The structure mirrors the GET response:

{
"service": {
"maintenanceMode": true
},
"rateLimits": {
"tiers": {
"free": {
"dailyLimit": 2000
}
}
}
}

Returns the complete updated settings:

{
"data": {
"service": {
"name": "Fizzy MCP Hosted",
"environment": "production",
"debug": false,
"maintenanceMode": true
}
},
"meta": {
"lastModified": "2024-01-15T10:30:00.000Z",
"modifiedBy": "admin@example.com",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"changes": [
{
"path": "service.maintenanceMode",
"oldValue": false,
"newValue": true
},
{
"path": "rateLimits.tiers.free.dailyLimit",
"oldValue": 1000,
"newValue": 2000
}
]
}
}
Terminal window
# Enable maintenance mode
curl -X PATCH \
-H "X-API-Key: your-admin-api-key" \
-H "Content-Type: application/json" \
-d '{"service": {"maintenanceMode": true}}' \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/settings"
# Disable maintenance mode
curl -X PATCH \
-H "X-API-Key: your-admin-api-key" \
-H "Content-Type: application/json" \
-d '{"service": {"maintenanceMode": false}}' \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/settings"

POST /api/admin/settings/reset Admin Only

Section titled “POST /api/admin/settings/reset ”

Resets all settings to their default values. This is a destructive operation.

Terminal window
curl -X POST \
-H "X-API-Key: your-admin-api-key" \
-H "Content-Type: application/json" \
-d '{"confirm": true}' \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/settings/reset
FieldTypeRequiredDescription
confirmbooleanYesMust be true to confirm reset
preserveKeysarrayNoSettings paths to preserve
{
"confirm": true,
"preserveKeys": ["security.allowedOrigins", "rateLimits.tiers.enterprise"]
}
{
"data": {
"reset": true,
"preservedKeys": ["security.allowedOrigins", "rateLimits.tiers.enterprise"],
"settings": {
// Complete default settings
}
},
"meta": {
"resetAt": "2024-01-15T10:30:00.000Z",
"resetBy": "admin@example.com",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

GET /api/admin/stats/overview Admin Only

Section titled “GET /api/admin/stats/overview ”

Returns global usage statistics across all users and accounts.

Terminal window
curl -H "X-API-Key: your-admin-api-key" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/stats/overview
{
"data": {
"period": {
"start": "2024-01-01T00:00:00.000Z",
"end": "2024-01-15T23:59:59.999Z"
},
"totals": {
"requests": 1547832,
"reads": 1123456,
"writes": 424376,
"errors": 2341,
"uniqueUsers": 1234,
"activeAccounts": 89
},
"today": {
"requests": 45678,
"reads": 32456,
"writes": 13222,
"errors": 45,
"peakHour": 14,
"peakRpm": 523
},
"byTier": {
"free": {
"users": 1100,
"requests": 234567,
"percentage": 15.2
},
"pro": {
"users": 120,
"requests": 876543,
"percentage": 56.6
},
"enterprise": {
"users": 14,
"requests": 436722,
"percentage": 28.2
}
},
"topAccounts": [
{
"accountId": "acc_xyz789",
"name": "Acme Corp",
"requests": 123456,
"tier": "enterprise"
},
{
"accountId": "acc_abc123",
"name": "StartupCo",
"requests": 98765,
"tier": "pro"
}
],
"errorBreakdown": {
"AUTH_ERROR": 1234,
"RATE_LIMIT_ERROR": 567,
"VALIDATION_ERROR": 345,
"NOT_FOUND_ERROR": 123,
"API_ERROR": 72
},
"performance": {
"avgResponseMs": 45,
"p50ResponseMs": 32,
"p95ResponseMs": 89,
"p99ResponseMs": 156
}
},
"meta": {
"generatedAt": "2024-01-15T10:30:00.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}
FieldTypeDescription
requestsnumberTotal requests in period
readsnumberRead operations
writesnumberWrite operations
errorsnumberTotal errors
uniqueUsersnumberDistinct users
activeAccountsnumberActive accounts
FieldTypeDescription
avgResponseMsnumberAverage response time
p50ResponseMsnumber50th percentile response time
p95ResponseMsnumber95th percentile response time
p99ResponseMsnumber99th percentile response time
Terminal window
curl -s -H "X-API-Key: your-admin-api-key" \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/stats/overview" | \
jq '{
totalRequests: .data.totals.requests,
errorRate: ((.data.totals.errors / .data.totals.requests) * 100 | . * 100 | floor / 100 | tostring + "%"),
topTier: (.data.byTier | to_entries | max_by(.value.requests) | .key),
avgResponse: (.data.performance.avgResponseMs | tostring + "ms")
}'

GET /api/admin/stats/tools Admin Only

Section titled “GET /api/admin/stats/tools ”

Returns detailed per-tool usage statistics for all MCP tools.

Terminal window
curl -H "X-API-Key: your-admin-api-key" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/stats/tools
{
"data": {
"period": {
"start": "2024-01-01T00:00:00.000Z",
"end": "2024-01-15T23:59:59.999Z"
},
"summary": {
"totalTools": 40,
"totalCalls": 1547832,
"avgCallsPerTool": 38695
},
"tools": [
{
"name": "fizzy_list_cards",
"category": "cards",
"calls": 456789,
"percentage": 29.5,
"avgResponseMs": 45,
"errorRate": 0.12,
"trend": "+5.2%"
},
{
"name": "fizzy_get_card",
"category": "cards",
"calls": 234567,
"percentage": 15.2,
"avgResponseMs": 32,
"errorRate": 0.08,
"trend": "+2.1%"
},
{
"name": "fizzy_create_card",
"category": "cards",
"calls": 123456,
"percentage": 8.0,
"avgResponseMs": 89,
"errorRate": 0.45,
"trend": "+12.3%"
},
{
"name": "fizzy_list_boards",
"category": "boards",
"calls": 98765,
"percentage": 6.4,
"avgResponseMs": 28,
"errorRate": 0.05,
"trend": "-1.2%"
}
],
"byCategory": {
"cards": {
"tools": 18,
"calls": 876543,
"percentage": 56.6,
"avgResponseMs": 52
},
"boards": {
"tools": 7,
"calls": 234567,
"percentage": 15.2,
"avgResponseMs": 38
},
"comments": {
"tools": 5,
"calls": 123456,
"percentage": 8.0,
"avgResponseMs": 45
},
"columns": {
"tools": 5,
"calls": 98765,
"percentage": 6.4,
"avgResponseMs": 35
},
"identity": {
"tools": 2,
"calls": 87654,
"percentage": 5.7,
"avgResponseMs": 22
},
"users": {
"tools": 2,
"calls": 76543,
"percentage": 4.9,
"avgResponseMs": 25
},
"tags": {
"tools": 1,
"calls": 50304,
"percentage": 3.2,
"avgResponseMs": 18
}
},
"slowestTools": [
{
"name": "fizzy_list_cards",
"p99ResponseMs": 245,
"avgResponseMs": 45,
"calls": 456789
},
{
"name": "fizzy_create_card",
"p99ResponseMs": 198,
"avgResponseMs": 89,
"calls": 123456
}
],
"highestErrorRate": [
{
"name": "fizzy_delete_card",
"errorRate": 2.34,
"errors": 234,
"calls": 10000
},
{
"name": "fizzy_update_card",
"errorRate": 1.23,
"errors": 1234,
"calls": 100325
}
]
},
"meta": {
"generatedAt": "2024-01-15T10:30:00.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}
FieldTypeDescription
namestringTool name
categorystringTool category
callsnumberTotal invocations
percentagenumberPercentage of total calls
avgResponseMsnumberAverage response time
errorRatenumberError percentage
trendstringWeek-over-week change
FieldTypeDescription
toolsnumberNumber of tools in category
callsnumberTotal calls for category
percentagenumberPercentage of total
avgResponseMsnumberAverage response time
Terminal window
# Top 10 most-used tools
curl -s -H "X-API-Key: your-admin-api-key" \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/stats/tools" | \
jq '.data.tools[:10] | .[] | "\(.name): \(.calls) calls (\(.percentage)%)"'
# Tools with highest error rates
curl -s -H "X-API-Key: your-admin-api-key" \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/stats/tools" | \
jq '.data.highestErrorRate[] | "\(.name): \(.errorRate)% error rate"'

{
"error": "AUTH_ERROR",
"message": "Admin authentication required",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
{
"error": "FORBIDDEN_ERROR",
"message": "Insufficient permissions for admin operations",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
{
"error": "VALIDATION_ERROR",
"message": "Invalid settings value for 'rateLimits.tiers.free.dailyLimit': must be positive integer or -1",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}

  1. Rotate API keys regularly

    Generate new admin API keys every 90 days.

  2. Use separate keys for environments

    Never use production admin keys in development or staging.

  3. Audit admin actions

    Review the modifiedBy field in settings responses to track changes.

  4. Limit admin access

    Only grant admin API keys to team members who require them.

  5. Monitor for anomalies

    Set up alerts for unusual admin activity or setting changes.