API: /api/admin

Admin REST API & Headless CMS

The BOW engine includes a comprehensive Headless Content Management System. Using standards-compliant OAuth 2.0 and RFC 7519 JWT authentication, it empowers external admin dashboards, mobile clients, and AI agents (via MCP) to control website configuration, page texts, and business modules remotely.

1. Standard OAuth 2.0 Authentication

Accessing admin endpoints requires a Bearer JWT access token obtained via the /api/oauth/token endpoint:

curl -X POST http://localhost:8600/api/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id=admin&client_secret=YOUR_TOKEN"

2. Remote Configuration Management (/api/admin/config)

JSON configuration files can be updated remotely or patched partially with dot-notation. Automatic .bak backups are created before modifications:

# Partial configuration update using dot-notation (PATCH)
curl -X PATCH http://localhost:8600/api/admin/config/renderer \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{"site.name": "New Business Name", "site.phone": "+36 30 123 4567"}'

3. Modifying Pages & Text ("oldalban szöveget átírni")

Page content and metadata are directly editable via REST API. The dedicated text search and replace endpoint enables targeted text edits across all page content files atomically:

# Search and replace text on a specific page
curl -X POST http://localhost:8600/api/admin/cms/pages/contact/text/replace \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{
    "search": "Monday - Friday: 8:00 - 16:00",
    "replace": "Monday - Friday: 8:00 - 18:00",
    "lang": "en"
  }'

4. Primary Admin Endpoints

Method & Endpoint MCP Tool Description
GET /api/admin/config admin_config_list Lists all config files with sizes and modification dates
GET /api/admin/cms/pages admin_cms_list_pages Recursive page tree listing (all 26+ pages)
PUT /api/admin/cms/pages/{slug}/content admin_cms_write_content Direct HTML / PHP content writing for specific language
POST /api/admin/shop/throttle/toggle admin_shop_toggle_throttle Emergency rush-hour ordering pause
GET /api/admin/shop/stats admin_shop_get_stats Live shop statistics, orders today, revenue

Privacy & Cookies

This website uses essential technical cookies and Google Calendar integration to ensure a seamless experience.

Preferences