Management API Documentation - Go SDK Documentation

This document covers the management API capabilities available in the Go SDK, which correspond to the features available in the backend management UI.

Note: All management API operations require superuser authentication (🔐).

Table of Contents

Settings Service

The Settings Service provides comprehensive management of application settings, matching the capabilities available in the backend management UI.

Get Application Settings

settings, err := client.Settings.GetApplicationSettings(nil, nil)
if err != nil {
    log.Fatal(err)
}

meta, _ := settings["meta"].(map[string]interface{})
appName, _ := meta["appName"].(string)
fmt.Printf("App name: %s\n", appName)

Update Application Settings

_, err := client.Settings.UpdateApplicationSettings(map[string]interface{}{
    "meta": map[string]interface{}{
        "appName":    "My App",
        "appURL":     "https://example.com",
        "hideControls": false,
    },
    "trustedProxy": map[string]interface{}{
        "headers":      []string{"X-Forwarded-For"},
        "useLeftmostIP": true,
    },
}, nil, nil)

Update Meta Settings

_, err := client.Settings.UpdateMeta(map[string]interface{}{
    "appName":       "My App",
    "appURL":        "https://example.com",
    "senderName":    "My App",
    "senderAddress": "noreply@example.com",
    "hideControls":  false,
}, nil, nil)

Update Trusted Proxy

_, err := client.Settings.UpdateTrustedProxy(map[string]interface{}{
    "headers":       []string{"X-Forwarded-For", "X-Real-IP"},
    "useLeftmostIP": true,
}, nil, nil)

Update Rate Limits

_, err := client.Settings.UpdateRateLimits(map[string]interface{}{
    "enabled": true,
    "rules": []map[string]interface{}{
        {
            "label":       "api/users",
            "duration":    3600,
            "maxRequests": 100,
        },
    },
}, nil, nil)

Backup Service

See Backups API for detailed documentation.

Log Service

See Logs API for detailed documentation.

Cron Service

See Crons API for detailed documentation.

Health Service

See Health API for detailed documentation.

Collection Service

See Collection API for detailed documentation.

SQL Service

Execute management SQL with SQL API (superuser-only).