Admin Console
Restricted
System diagnostics and database management for APA Ocean OPS Finance backend.
Backend Health
Ping the API health endpoint (no auth required)
β
Database Connection
Verify PostgreSQL connectivity and return server version
β
Table Status
Row counts for all Bowler Chart tables
β
Initialize Database
Execute
init_extractor.sql β creates tables using IF NOT EXISTS (safe to re-run)
β This operation creates Bowler Chart tables if they do not exist. Existing tables and data are not affected.
β
Consumer Key Management
Generate and manage API keys for non-browser integrations (Custom Tools, scripts)
β
New API Key
β Copy your API key now β it will not be shown again
This key is stored hashed in the database. The raw value cannot be retrieved.
Integration Guide & Key Test
Complete request specification for configuring x-api-key in MDP Custom Tools
β MDP Custom Tool β Authentication Configuration
| Field in MDP UI | Value to enter | Notes |
|---|---|---|
| Auth Type | API Key | Select from the authentication dropdown |
| API Key Name (Header name) |
x-api-key | This is the exact HTTP header name sent to the backend |
| API Key Value | <your 64-char hex key> | Copy from Consumer Key Management panel above |
| Location | Header | Must be Header β not query string or body |
β‘ Request Specification by Method
| Request Field | GET request (read data) | POST / PATCH request (write data) |
|---|---|---|
| x-api-key | <64-char key> Required | <64-char key> Required |
| Authorization | Leave empty / omit Not needed | Leave empty / omit Not needed |
| Content-Type | Omit Not needed | application/json Required |
| Request Body | None (empty) | JSON β raw JSON object or array, not form-data |
β’ Complete Request Examples (copy-paste ready)
Example 1 Β· GET β Read Bowler Chart fact data
GET /api/bowler/fact-data ?period_type=Weekly &year=2025 ββ Headers ββββββββββββββββββββββββββββββ x-api-key: a3f8b2c1d4e56789abcdef01... ββ Body βββββββββββββββββββββββββββββββββ None
Example 2 Β· PATCH β Update a single fact record
PATCH /api/extractor/fact-data/{id} e.g. /api/extractor/fact-data/123 ββ Headers ββββββββββββββββββββββββββββββ x-api-key: a3f8b2c1d4e56789abcdef01... Content-Type: application/json ββ Body (JSON object) βββββββββββββββββββ Only include fields you want to change. { "target": 105.0, "actual_fcst": 98.0, "py": 90.0 } Available fields: target, actual_fcst, py, period_header, period_type
Example 3 Β· POST β Upsert fact data (insert or update, supports bulk)
POST /api/extractor/fact-data/upsert ββ Headers ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ x-api-key: a3f8b2c1d4e56789abcdef01234567890123456789abcdef0123456789abcdef Content-Type: application/json ββ Body (JSON array Β· include as many records as needed) ββββββββββββββββββββ [ { "kpi_id": 1, "period": "W01", "period_header": "Week 1", "period_type": "Weekly", "target": 100.0, "actual_fcst": 95.5, "py": 88.0 }, { "kpi_id": 2, "period": "W01", "period_header": "Week 1", "period_type": "Weekly", "target": 200.0, "actual_fcst": 210.0, "py": 195.0 } ] ββ Field reference βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Field | Type | Required | Notes |
|---|---|---|---|
| kpi_id | integer | β required | ID from bowler_kpi_dim table |
| period | string | β required | "W01"~"W52" for Weekly Β· "Jan"~"Dec" for Monthly |
| period_header | string | optional | Display label shown in chart column header |
| period_type | string | optional | "Weekly" or "Monthly" (default: "Weekly") |
| target | float | optional | Target / budget value |
| actual_fcst | float | optional | Actual result or forecast value |
| py | float | optional | Prior year comparison value |
β£ Commonly Used Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/bowler/fact-data | Read filtered fact data for Bowler Chart (params: period_type, year) |
| GET | /api/extractor/kpi-dim | Read all KPI dimension definitions |
| GET | /api/bowler/periods | Read available periods for dropdown |
| POST | /api/extractor/fact-data/upsert | Insert or update fact data records (body: JSON array) |
| PATCH | /api/extractor/fact-data/update | Update a single fact data record (body: JSON object) |
β€ Test Your API Key
Paste a key below to call
GET /api/admin/api-keys/verify using only x-api-key β no JWT. Confirms the key is active and shows its granted roles.
β