QuestionI want a script or health check that tells whether an installation is still waiting for the first-run wizard. I call
GET /api/Meta/FirstRunStatus, but on a configured install fields like
connection and
DataDBName come back as
null. Is something broken, and can I still call the wizard methods such as
configure_wuic afterwards?
AnswerNothing is broken:
FirstRunStatus is public (no login needed) and deliberately returns less once
AppSettings.firstRun is
false. Use the
firstRun boolean as your check.
What the endpoint returnsfirstRun, dbms and tutorialAvailable are always present.- While
firstRun is true you also get DataDBName, projectDataFolder, projectAssemblyName, connection, machineFingerprint, pythonInstalled, pythonVersion and pythonSupported. The wizard uses them to pre-fill its form. - After the setup those fields are
null on purpose: the endpoint is anonymous, so it must not expose a connection string or server paths on a running system.
curl -s https://your-host/api/Meta/FirstRunStatus
# configured install
{ "firstRun": false, "dbms": "mssql", "DataDBName": null, "connection": null, "tutorialAvailable": true, ... }
Who can call the wizard methodsMethods such as
MetaService.configure_wuic and
MetaService.get_database_names are open to anonymous callers only while
firstRun is
true. Once it is
false they require a valid session of an administrator; anyone else gets a 401. So on a configured system you can still run them, but logged in as admin.
PitfallThe flag is read with a strict boolean parse. A value other than
true or
false in
appsettings.{Environment}.json is treated as
false, and the install will not enter the wizard. Also, the response is sent with
Cache-Control: no-store, so don't put a cache in front of it expecting to reuse the answer.
Documentation: Initial Scaffolding