
Moodle External Api Development
If you need to expose Moodle LMS functionality through REST or AJAX endpoints, this walks you through the framework's strict three-method pattern: define your input parameters with proper validation types, implement the business logic with capability checks and database operations, then define your return structure. It covers the full registration process in services.php and includes practical error handling with file-based logging. The parameter validation and context checking here are non-negotiable in Moodle development, so following this pattern saves you from security headaches. Most useful when building custom plugin APIs, mobile app backends, or external integrations that need to pull course data, manage users, or handle quiz operations while respecting Moodle's permission system.
- skills.sh installs
- 177
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill moodle-external-api-development --agent claude-codeInstalls into .claude/skills of the current project.
Files
Moodle External API Development
This skill guides you through creating custom external web service APIs for Moodle LMS, following Moodle's external API framework and coding standards.
When to Use This Skill
- Creating custom web services for Moodle plugins
- Implementing REST/AJAX endpoints for course management
- Building APIs for quiz operations, user tracking, or reporting
- Exposing Moodle functionality to external applications
- Developing mobile app backends using Moodle
Core Architecture Pattern
Moodle external APIs follow a strict three-method pattern:
execute_parameters()- Defines input parameter structureexecute()- Contains business logicexecute_returns()- Defines return structure
Step-by-Step Implementation
Step 1: Create the External API Class File
Location: /local/yourplugin/classes/external/your_api_name.php
<?php
namespace local_yourplugin\external;
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/externallib.php");
use external_api;
use external_function_parameters;
use external_single_structure;
use external_value;
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Categories
- Backend & APIs, Debugging, Databases
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Blockrun176
- Busybox On Windows172
- Inngest168
- Zapier Make Patterns166
- Trigger Dev164
- Segment Cdp162
- Upstash Qstash162
- Fastmcp Server154
- Memory Search139
- Design To Code135
- Accessibility Auditor
- Active Directory Attacks
- Agent Development
- API Fuzzing For Bug Bounty
- API Integration Specialist
- AWS Penetration Testing
- Broken Authentication Testing
- Burp Suite Web Application Testing
- Claude Code Guide
- Cloud Penetration Testing
- Command Development
- Cross Site Scripting And HTML Injection Testing
- Data Privacy Compliance
- Email Composer