HTTP API (scripts & AI agents)

Everything the dashboard does goes through this JSON API on the local web port, so anything else can drive Starship the same way: a shell script, a notebook, a home-automation box, or an AI agent. This page is generated from the server's route table at release time, so it lists the routes of this build.

Basics

it from another machine set [web] host = "0.0.0.0" and restart; keep the port off the public internet.

failure, an "error" string. Send Content-Type: application/json.

Basic Auth for every route except /api/version, /api/help and the login page.

/api/version and the /api/license/* routes until it is activated.

job_id immediately. Poll GET /api/console/jobs (or /api/console/jobs/<id>) until the job is succeeded, failed or cancelled; a capture's result carries fits_path and rel_path, and rel_path is what the frame routes take.

POST /api/sequencer/plans/validate -> POST /api/sequencer/plans/save -> POST /api/sequencer/start -> poll GET /api/sequencer/state.

phases, the park and roof interlocks and the health monitor act regardless of who is calling. An agent cannot bypass them and should not try; it reads state and asks for actions, and the rig says no when it must.

Playbook for an automation agent

What worked on real nights, in order:

  1. GET /api/version, GET /api/state, GET /api/health/status - know the build,

the safety verdict and the memory headroom before touching anything.

  1. POST /api/equipment/connect_all, then GET /api/ascom until every role you

need reports connected: true. PHD2 must be running for guided plans.

  1. Write the plan as TOML, validate, then save with a dated id, then start.

Author the make-safe phases in the plan (on_error, on_suspend, on_end: close the cover, park) - that is what protects the rig when you are not looking.

  1. Poll GET /api/sequencer/state every 15-30 s: watch current_step, the tail of

the journal, error and outcome. Poll GET /api/health/status for memory and GET /api/phd2 for guiding. Read the log only for diagnosis.

  1. When a run ends, decide from state and outcome: succeeded -> start the next

plan; failed / stopped -> read the journal, fix, retry. Never start a plan on a mount that a safety layer just parked without understanding why.

  1. At the end: verify at_park and the cover on /api/ascom, then, if your site

has one, POST /api/console/roof_close.

Things an agent should not do: analyse full-resolution frames on a small PC while a capture is downloading (before v22.2.3 that alone could trip the memory floor), issue mount commands while a job is moving the mount, or change config.toml on an operator's rig without being asked.

Routes

GET routes read; POST routes act. Body keys are listed where the handler reads them; a key in brackets is optional. Routes are grouped by area.

alerts

allsky

alpaca

ascom

audit

blockscript

cctv

config

console

diagnostics

equipment

equipment profiles

filters

fits

framing

guardian

health

help

license

night report

pete

phd2

planetarium

platesolve

profiles

scheduler

sequencer

skyhunter

solo

state

system

version

Notes

Astroworx Starship v22.2.10 · this page is the in-app help of that buildDownload · HTTP API