PHPackages                             puerari/moodle\_rest\_api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. puerari/moodle\_rest\_api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

puerari/moodle\_rest\_api
=========================

MOODLE\_REST\_API is a PHP package that abstracts the interaction with Moodle through its REST API

1.1.0(4y ago)017MITPHPPHP ^5.6

Since Dec 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/puerari/moodle_rest_api)[ Packagist](https://packagist.org/packages/puerari/moodle_rest_api)[ Docs](https://www.linkedin.com/in/leandropuerari)[ RSS](/packages/puerari-moodle-rest-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Moodle REST API, by @puerari
============================

[](#moodle-rest-api-by-puerari)

[![Maintainer](https://camo.githubusercontent.com/b8bce3ba09e24a164377d4380b77eecad2e0e91b54acc19d901327e7794939d0/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65722d406c65616e64726f707565726172692d626c75652e7376673f7374796c653d666c61742d737175617265)](https://www.linkedin.com/in/leandropuerari)[![Source Code](https://camo.githubusercontent.com/a322bc7d2a60d82ebabaf5f4deddb6b4038cbc5cc0986922814fddf3a625c049/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d707565726172692f6d6f6f646c655f726573745f6170692d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/puerari/moodle_rest_api)[![PHP from Packagist](https://camo.githubusercontent.com/d198c9c1f52e73fa61aefe27c092d9024f89398b46525889145417eb0424195a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f707565726172692f6d6f6f646c655f726573745f6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/puerari/moodle_rest_api)[![Latest Version](https://camo.githubusercontent.com/4cb1d93fdd93ac7395319e4f024185aad05cd1c6ef98f3b2809f5a1065d5126c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f707565726172692f6d6f6f646c655f726573745f6170692e7376673f7374796c653d666c61742d737175617265)](https://github.com/puerari/moodle_rest_api/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build](https://camo.githubusercontent.com/61f5ea2c927acc0f868ce34c7946a11821b830a9df3572e55de5b090e48a99e6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f707565726172692f6d6f6f646c655f726573745f6170692e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/puerari/moodle_rest_api)[![Quality Score](https://camo.githubusercontent.com/f6507378a320dc3234a6e8b5915a28a8b8925eedd9aec94011913c2506a28278/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f707565726172692f6d6f6f646c655f726573745f6170692e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/puerari/moodle_rest_api)[![Total Downloads](https://camo.githubusercontent.com/d0be1a16ffe0169bd58715d21cf17fa9a646846f2bd8135f0305aa4afa849f0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f707565726172692f6d6f6f646c655f726573745f6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/puerari/moodle_rest_api)

About Moodle REST API
---------------------

[](#about-moodle-rest-api)

###### Moodle REST API is a PHP package that abstracts the interaction with Moodle through its REST API

[](#moodle-rest-api-is-a-php-package-that-abstracts-the-interaction-with-moodle-through-its-rest-api)

Moodle REST API é um pacote PHP que abstrai a interação com o Moodle através de sua API.

About Moodle
------------

[](#about-moodle)

###### [Moodle](https://moodle.org/) Moodle is the world's most popular learning management system. Start creating your online learning site in minutes!

[](#moodle-moodle-is-the-worlds-most-popular-learning-management-system-start-creating-your-online-learning-site-in-minutes)

O Moodle é o sistema de gestão da aprendizagem mais popular do mundo. Comece a criar seu site de aprendizado online em minutos!

### Highlights

[](#highlights)

- Easy to set up (Fácil de configurar)
- Composer ready (Pronto para o composer)
- PSR-2 compliant (Compatível com PSR-2)

Installation
------------

[](#installation)

MOODLE\_REST\_API is available via Composer:

add the following line on your composer.json file

```
"puerari/moodle_rest_api": "^1.0"
```

or run

```
composer require puerari/moodle_rest_api
```

Usage
-----

[](#usage)

Follow the Moodle documentation to enable API on your server:

[https://docs.moodle.org/dev/Creating\_a\_web\_service\_client](https://docs.moodle.org/dev/Creating_a_web_service_client)

Include the Composer autoloader file;

```
require_once 'vendor/autoload.php';
```

Instantiate the MoodleRestApi class

```
$api = new MoodleRestApi('https://yourmoodledomain.com', 'YourAccessTokenGeneratedOnYouMoodleServer');
```

Call the methods that solve your necessities. Example: how to get all courses by a field.

```
$response = $cwpApi->getCoursesByField('category', '1');
exit(json_decode($response));
```

Support
-------

[](#support)

###### Security: If you discover any security related issues, please use the issue tracker on [GitHub](https://github.com/puerari/moodle_rest_api/issues).

[](#security-if-you-discover-any-security-related-issues-please-use-the-issue-tracker-on-github)

Se você descobrir algum problema relacionado à segurança, por favor utilize o rastreador de problemas do [GitHub](https://github.com/puerari/moodle_rest_api/issues).

Credits
-------

[](#credits)

- [Leandro Puerari](https://github.com/puerari) (Developer)
- [Contributors](https://github.com/puerari/moodle_rest_api/contributors)
- [Moodle](https://moodle.org/)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/puerari/moodle_rest_api/blob/master/LICENSE) for more information.

Contributing
------------

[](#contributing)

Please see [contributing page](https://github.com/puerari/moodle_rest_api/blob/master/CONTRIBUTING.md) for details.

Thank You
---------

[](#thank-you)

**Let's Code...**

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

1600d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e496a1b1aa0e94d0ea49dbed6096200acc4b9fe2d5481fcd6e0033e9a7eff0de?d=identicon)[puerari](/maintainers/puerari)

---

Top Contributors

[![puerari](https://avatars.githubusercontent.com/u/702157?v=4)](https://github.com/puerari "puerari (7 commits)")

---

Tags

apirestmoodlePuerari

### Embed Badge

![Health badge](/badges/puerari-moodle-rest-api/health.svg)

```
[![Health](https://phpackages.com/badges/puerari-moodle-rest-api/health.svg)](https://phpackages.com/packages/puerari-moodle-rest-api)
```

###  Alternatives

[xendit/xendit-php

Xendit PHP SDK

189730.6k6](/packages/xendit-xendit-php)[angelleye/paypal-php-library

PHP wrapper for PayPal APIs

243440.9k](/packages/angelleye-paypal-php-library)[infobip/infobip-api-php-client

PHP library for consuming Infobip's API

921.8M10](/packages/infobip-infobip-api-php-client)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[mediamonks/rest-api-bundle

MediaMonks Rest API Symfony Bundle

1656.2k1](/packages/mediamonks-rest-api-bundle)[phrest/api

REST API Package for Phalcon PHP

304.2k](/packages/phrest-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
