Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ManiFed/TTN/llms.txt

Use this file to discover all available pages before exploring further.

Admin endpoints give operators direct control over the scheduling pipeline, node onboarding, and science configuration. They are protected by a single shared X-Admin-Key header configured in cloud/config.yaml. These endpoints are not intended for node agents or member apps — they are designed for cron jobs, deployment scripts, and manual operator intervention. All of them require the admin key to be present and correct on every call; there is no admin session or token.
Always change server.admin_key in cloud/config.yaml from any default value before deploying to a public network. Admin endpoints have no rate limiting and grant full control over ingestion, scheduling, activation code issuance, and scoring weights. Treat the admin key with the same care as a root database password.

POST /api/v1/admin/ingest

Trigger alert ingestion from all configured broker sources followed immediately by a full rescoring pass. This is normally called on a cron schedule, but can be triggered manually to pick up a breaking transient alert outside the regular cadence.
Auth: X-Admin-KeyNo request body required.

POST /api/v1/admin/replan

Trigger a full network rescore followed by fresh observation plan generation for all active nodes. Use after changing scoring weights, adding new targets, or whenever you want plans to reflect the current network state immediately rather than waiting for the scheduled nightly run.
Auth: X-Admin-KeyNo request body required.

POST /api/v1/admin/activation-codes

Generate one or more activation codes in bulk. Codes are written to the database immediately and can be distributed to new members or embedded in installer packages. Optionally link generated codes to a specific member account.
Auth: X-Admin-Key
count
integer
Number of codes to generate. Range 1–100. Default 1.
expires_days
integer
Number of days until the codes expire. Default 90.
user_id
string
Optional. Link all generated codes to a specific member account (e.g. "u_4a8b1c2d"). When a code linked to an account is used at registration, the node is automatically added to that member’s node list.

POST /api/v1/interrupts

Broadcast a high-priority target interrupt to nodes. The server selects eligible nodes based on their current observability score for the target (requiring a minimum score of 0.35 by default) unless an explicit node list is provided. Nodes poll GET /api/v1/interrupts regularly and will see the interrupt on their next poll cycle.
This endpoint uses X-Admin-Key authentication rather than node or member credentials. It shares the /api/v1/interrupts path with the node’s GET poll endpoint — the HTTP method determines which handler is invoked.
Auth: X-Admin-Key
name
string
required
Target name, e.g. "SN2026abc".
ra_deg
float
required
Right ascension in decimal degrees.
dec_deg
float
required
Declination in decimal degrees.
mag
float
Estimated target magnitude. Used for exposure time planning on the node.
reason
string
Human-readable reason for the interrupt, e.g. "Type Ia SN candidate — early follow-up".
expires_hours
float
Interrupt lifetime in hours. Default 12.0. Nodes that have not acted before expiry will not see the interrupt on subsequent polls.
node_ids
array
Optional list of specific node IDs to target. When omitted and escalate is true, the server automatically selects eligible nodes by observability score.
escalate
boolean
When true (default) and no node_ids are given, automatically select up to 50 nodes with score ≥ min_score for the target.
min_score
float
Minimum composite score threshold for automatic node selection. Default 0.35.
replan
boolean
When true, immediately regenerate observation plans for all notified nodes so the interrupt target appears in tonight’s schedule without waiting for the next plan cycle.

GET /api/v1/admin/tuning

Retrieve the currently active observability scoring weights and the last 20 entries from the weight audit log. Use this to inspect what the CHORUS scheduler is using and to understand the history of any automated or manual weight adjustments.
Auth: X-Admin-KeyNo request body or query parameters.

POST /api/v1/admin/tuning/rollback

Restore the previous scoring weights from the audit log. This is the manual safety valve for cases where an automated tuning run produced unexpected results.
Auth: X-Admin-KeyNo request body required. The server automatically uses the most recent old_weights entry from the weight_history table.

GET /api/v1/admin/sky-quality

Retrieve measured sky brightness statistics per node for a rolling time window, derived from actual sky_mag values uploaded with photometry measurements. Useful for detecting cloud, smoke, or lunar contamination that the node’s declared light_pollution_mpsas does not capture.
Auth: X-Admin-Key
days
float
Look-back window in days. Default 30.

GET /api/v1/admin/patrol

Retrieve recent photometric patrol detections — potential transient events flagged by the data pipeline during flux-differential analysis of photometry submissions.
Auth: X-Admin-KeyNo request body or query parameters.

GET /api/v1/admin/incidents

List structured reliability incidents reported by nodes and the cloud pipeline. Incidents are automatically created for hardware faults, photometry quality failures, emergency parks, and cross-validation outlier clusters.
Auth: X-Admin-Key
status
string
Filter by incident status. Options: "active" (open + investigating, default), "resolved", "all".

PATCH /api/v1/admin/incidents/

Update a structured incident’s status, root cause, resolution note, or resolver. Setting status to "resolved" automatically stamps resolved_at if not already set.
Auth: X-Admin-Key
incident_id
integer
required
Incident ID from the incidents list.
status
string
New status: "open", "investigating", or "resolved".
root_cause
string
Root cause classification: "weather", "hardware", "software", "optics", or "unknown".
resolution_note
string
Free-text description of what was found and how it was fixed.
resolver
string
Name or email of the person resolving the incident.

GET /api/v1/admin/subscribers

List all waitlist subscribers, including their email, referral source, equipment, subscription timestamp, assigned activation code, and current status.
Auth: X-Admin-KeyNo request body or query parameters.

PATCH /api/v1/admin/subscribers//status

Update the status of a waitlist subscriber, e.g. to mark them as "invited" or "active" after sending their welcome email.
Auth: X-Admin-Key
sub_id
integer
required
Subscriber ID from the subscribers list.
status
string
required
New subscriber status string (e.g. "pending", "invited", "active").

GET /api/v1/admin/science-program-suggestions

List all member-submitted science program ideas, ordered by submission date descending.
Auth: X-Admin-KeyNo request body or query parameters.

PATCH /api/v1/admin/science-program-suggestions//status

Update the review status of a member-submitted science program suggestion.
Auth: X-Admin-Key
suggestion_id
integer
required
Suggestion ID from the suggestions list.
status
string
required
New status. Must be one of: "pending", "reviewed", "accepted", or "declined".

PATCH /api/v1/site/config

Update public site configuration. Currently supports updating the displayed member count on the tour page.
Auth: X-Admin-Key
member_count
integer
New value for the publicly displayed member count.

Build docs developers (and LLMs) love