Api Query

Local plugins ::: local_apiquery
Maintained by Cesar Machado
Api Query — A Moodle local plugin that lets administrators configure custom SQL queries through the admin UI and expose them as REST API endpoints. Each query supports typed parameters, optional defaults, and built-in SQL validation. Designed to reduce the load on Moodle's native web services by replacing multiple individual API calls with a single optimized query per sync cycle.
Latest release:
1 sites
8 downloads
Current versions available: 1

Api Query allows Moodle administrators to create and manage custom SQL SELECT queries directly from the admin UI, then expose them as secure REST API endpoints callable via Moodle's standard webservice protocol.

Key features:
- Create, edit, enable/disable queries from Site Administration > Plugins > Local plugins > Api Query
- Declare typed parameters (int, text, float, bool) with required/optional flags and default values
- Built-in SQL validator: only SELECT statements are allowed; any attempt to use INSERT/UPDATE/DELETE/REPLACE/DROP/TRUNCATE/ALTER or access sensitive tables (config, sessions, external_tokens) is blocked
- Automatic handling of duplicate :placeholders in SQL
- Interactive query tester with live results from the admin UI
- Execution logs with timing and row count per call
- Full Privacy API implementation (GDPR compliant)

Designed to reduce the load on Moodle's native web services by replacing multiple individual API calls with a single optimized query per sync cycle.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6

Contributors

Cesar Machado (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

Show comments
Please login to post comments