[MokoCBRegGuard] [FEATURE] Joomla Web Services API for registration logs #17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature Description
Add a Joomla Web Services API plugin that exposes the
#__cbregguard_logtable via RESTful endpoints, enabling external tools and moderators to query, filter, and action flagged registrations programmatically.Problem or Use Case
Moderators and external systems (dashboards, Slack bots, monitoring tools) have no programmatic access to registration guard data. All interaction requires direct database access or the Joomla admin UI.
Proposed Solution
Create a separate Joomla webservices plugin that registers API routes via
onBeforeApiRoute:Endpoints:
GET /api/v1/cbregguard/logs- List logs with filtering (risk_level, date range, IP, user_id) and paginationGET /api/v1/cbregguard/logs/{id}- Get single log entryPATCH /api/v1/cbregguard/logs/{id}- Update moderator_action (approved, blocked, watching)DELETE /api/v1/cbregguard/logs/{id}- Delete a log entryGET /api/v1/cbregguard/stats- Summary statistics (counts by risk level, recent activity)Authentication: Joomla API tokens (X-Joomla-Token header), requiring core.manage permission.
Alternative Solutions
Benefits
Implementation Details (Optional)
plugins/webservices/cbregguard/api/components/com_cbregguard/Joomla\CMS\MVC\Controller\ApiControllerJoomla\CMS\MVC\View\JsonApiView(JSON:API v1.0 spec)ApiRouter::createCRUDRoutes()core.managefor write operationsRelevant Standards
Checklist
Duplicate of #16 — both covered by the REST API plugin (plg_webservices_mokojoomcommunity)