Webapp Setting API Endpoints

Category: webapp (catalog read) Entity: Setting (structs.setting) Base URL: ${webappBaseUrl} (default: http://localhost:8080, public guild webapp: http://crew.oh.energy) Last Updated: May 13, 2026


Overview

Live tunables that control chain economy and gameplay constants. The table is (name, value) keyed on name and seeded with the values listed in knowledge/infrastructure/database-schema.md. Clients read this once at startup to pick up the current REACTOR_RATIO, PLAYER_RESUME_CHARGE, PLANETARY_SHIELD_BASE, PLAYER_PASSIVE_DRAW, PLANET_STARTING_ORE, PLANET_STARTING_SLOTS, etc.


Endpoint Summary

Method Path Description Auth Required
GET /api/setting Return every setting row No (public)

/api/setting is one of the four public routes (/api/auth/*, /api/guild/this, /api/timestamp, /api/setting); no session cookie required.


Endpoint Details

GET /api/setting

Return every setting in a single payload. There are no path or query parameters.

Example

Request: GET http://localhost:8080/api/setting

Response (shape) — queryAll returns the setting rows directly in data as a flat array (SELECT * so each row carries the SQL columns, e.g. name, value, plus any timestamps):

{
  "success": true,
  "errors": {},
  "data": [
    { "name": "REACTOR_RATIO", "value": "..." },
    { "name": "PLAYER_RESUME_CHARGE", "value": "..." },
    { "name": "PLANETARY_SHIELD_BASE", "value": "..." },
    { "name": "PLAYER_PASSIVE_DRAW", "value": "..." },
    { "name": "PLANET_STARTING_ORE", "value": "..." },
    { "name": "PLANET_STARTING_SLOTS", "value": "..." }
  ]
}

The exact key list grows over time — treat data as an open list of name/value rows and match by name.


The response uses the standard envelope (see protocols/webapp-api-protocol.md).