REST: Admin, System, and Observability
POST /api/saveSettings (admin)
Requires admin role. Persists global configuration.
Request body is the full config.Config object (see Configuration).
Possible blocked-website response (400):
{
"error": "One or more URLs are blocked by website blacklist",
"blocked_websites": {
"judges": ["https://..."],
"scrape_sites": ["https://..."],
"blacklist_sources": ["https://..."],
"ip_lookup": ["https://..."]
},
"website_blacklist": ["example.com"]
}
Success (200):
{"message": "Configuration updated successfully"}
Side effects when config changes:
- Website blacklist cleanup across workspace judges/sources
- Queue cleanup for removed scrape sources
- GeoLite update job trigger when API key is set
- Blacklist refresh trigger when new blacklist source URLs are added
GET /api/global/settings (admin)
Requires admin role. Returns full current global config.
GET /api/plugins/ipgeolocation/status (admin)
Returns used_credits, daily_credit_limit, reset_at, next_request_at,
last_checked_at, and last_error. Usage is Maglane's local credit budget,
not the provider account balance. This endpoint reads local state and does not
perform a provider lookup. Configure the plugin through the full global settings
object's plugins.ipgeolocation field. See IPGeolocation.io.
SearXNG plugin (admin)
Configure the plugin through the global settings object's plugins.searxng
field. A save that omits the field keeps the current plugin settings. Turning
the plugin on, or changing its target workspace or tags, validates that the
workspace is admin-only and owns the tags; failures return 400. A blacklisted
base URL is reported under blocked_websites.searxng_base_url. See
SearXNG.
GET /api/plugins/searxng/status
Returns the saved configuration summary (enabled, active, base_url,
target_workspace_id, interval_minutes, max_active_sources), the target
workspace's active_discovered_sources, pruned_discovered_sources, and
in_cooldown_sources, and the last run: last_status (idle, success,
partial, capped, or error), last_error, last_run_at, next_run_at,
last_queries_run, last_candidates_found, last_sources_added,
last_sources_pruned, total_sources_added, and total_sources_pruned. It
reads local state and does not contact SearXNG.
POST /api/plugins/searxng/run
Starts a discovery run in the background with the saved settings and returns
202 with {"status": "started"}. Read the outcome from the status endpoint;
last_run_at changes when the run finishes. Returns 400 when the plugin is
not active, 409 when a run is already in progress on any backend, and 503
when the plugin service is not running.
GET /api/plugins/searxng/workspaces
Lists the workspaces that qualify as a target, each with id, name,
personal, and its proxy tags (id, name, color). A workspace qualifies
when every member is an instance administrator and no unexpired invitation
names a non-admin account. The requesting administrator does not need to be a
member.
POST /api/global/proxies/requeue (admin)
Requires admin role. Makes every waiting proxy route due for a worker visit within the fastest workspace check cadence, but no less than 15 minutes and no more than 6 hours. A visit checks a route only for workspaces that have reached their next scheduled check. Otherwise the route goes back to its workspaces' schedules without a check. The action therefore realigns the queue with the current cadences. It does not check every route and uses no workspace's allowance early. Checks already in progress retain their leases and finish normally. Expired leases remain available for workers to recover.
Success (200):
{
"message": "All queued proxies were requeued successfully",
"proxy_count": 42
}
proxy_count is the number of waiting queue members actually rescheduled.
It excludes leased members, including leases claimed during the operation.
PUT /api/global/workspaces/{id}/allowances (admin)
Requires the global admin role. Sets one workspace's own monthly check and
scrape allowances. 0 makes the workspace use the instance default again.
unlimited_checks or unlimited_scrapes removes the limit and ignores the
matching monthly value. The workspace must then choose a fixed interval and
runs hourly until it does. Cadence follows within about a minute.
{"monthly_checks": 8000000, "monthly_scrapes": 0, "unlimited_checks": false, "unlimited_scrapes": true}
Success (200) echoes the four fields and workspace_id.
An unknown workspace returns 404.
Requeue one proxy
POST /api/global/proxies/{id}/requeue requires the global admin role and
access to the selected workspace. It reloads the managed route and queues it
for an immediate worker visit. It does not run the check synchronously or
wait for statistics to commit. The visit checks the route for every workspace
that manages it and has allowance left, ahead of their check cadences, and
each of those workspaces is charged for the check. Afterwards the route
returns to its workspaces' schedules. If a worker is checking the route when
the request arrives, that check no longer reschedules the route, and the
route is checked again at once.
Send your bearer token and, when needed, X-Workspace-ID. No body is required.
For example, with your own token, workspace ID, and route ID:
POST /api/global/proxies/123/requeue
Authorization: Bearer <token>
X-Workspace-ID: 42
Success is 200 with {"message":"Proxy queued successfully","proxy_id":123}.
Invalid IDs return 400, a missing managed route returns 404, and queue
synchronization failures return 503. A successful request still requires
active workspace management, eligible settings, judges, and functioning
statistics ingestion for a new result to become visible.
GET /api/releases
Public endpoint (no auth required).
Response:
{
"releases": [
{
"id": 1,
"tagName": "v1.2.3",
"title": "Release title",
"body": "...",
"htmlUrl": "https://github.com/...",
"publishedAt": "2026-02-01T12:00:00Z",
"prerelease": false
}
],
"build": {
"buildVersion": "abcdef1",
"builtAt": "2026-02-01T10:00:00Z"
}
}
Observability endpoints
GET /healthz: process liveness and build metadata.GET /readyz: dependency readiness (database,redis,startup_queue_bootstrap) withready,degraded, ornot_readystatus.GET /metrics: Prometheus metrics endpoint.
These routes are wrapped by observability protection:
- In non-production mode, public access is allowed by default.
- In production mode, public access is denied by default unless:
- caller is loopback, or
X-Observability-TokenmatchesOBSERVABILITY_TOKEN, orALLOW_PUBLIC_OBSERVABILITY_ENDPOINTS=true.
Example metrics families exposed by /metrics:
maglane_http_requests_totalmaglane_http_request_duration_secondsmaglane_auth_failures_totalmaglane_rate_limit_blocks_totalmaglane_rotating_proxy_errors_total