Package: h5p
Generated from api/packages/h5p
Source: api/packages/h5p · imported version 1.0.0. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”Thin Laravel integration for the isolated H5P service in api/h5p (Lumi, GPL). The API never
imports H5P code: it only talks to the service over HTTP, so the GPL boundary stays intact
(see LICENSING.md and ADR 0015).
What it does
Section titled “What it does”H5PServiceClientcalls the service with the sharedX-Internal-Token(server-to-server calls act as the system user).H5PContentServicelists H5P contents and deletes the unused ones.- Admin endpoints (Swagger-documented):
GET /api/admin/h5p/contents,DELETE /api/admin/h5p/unused. Creating, editing, playing, uploading and downloading are served by the service itself at/h5p/*.
Configuration
Section titled “Configuration”| Variable | Default | Purpose |
|---|---|---|
H5P_SERVICE_URL |
http://h5p:8080 |
Base URL of the service, without the /h5p prefix |
H5P_INTERNAL_TOKEN |
none | Shared secret, must match the service |
H5P_SERVICE_TIMEOUT |
300 |
Request timeout in seconds |
./vendor/bin/phpunit --testsuite h5p (HTTP calls to the service are faked).
Further reading
Section titled “Further reading”Operator documentation: front/docs-site/src/content/docs/operators/h5p.mdx.
API endpoints
Section titled “API endpoints”| Method | Path | Auth | Action |
|---|---|---|---|
GET |
/api/admin/h5p/contents |
yes | H5PContentAdminApiController@index |
DELETE |
/api/admin/h5p/unused |
yes | H5PContentAdminApiController@deleteUnused |
Permissions
Section titled “Permissions”| Permission | Seeded for roles | Constant |
|---|---|---|
h5p_list |
admin | H5PPermissionsEnum::H5P_LIST |
h5p_read |
admin | H5PPermissionsEnum::H5P_READ |
h5p_create |
admin | H5PPermissionsEnum::H5P_CREATE |
h5p_delete |
admin | H5PPermissionsEnum::H5P_DELETE |
h5p_update |
admin | H5PPermissionsEnum::H5P_UPDATE |
h5p_author_list |
admin | H5PPermissionsEnum::H5P_AUTHOR_LIST |
h5p_author_update |
admin | H5PPermissionsEnum::H5P_AUTHOR_UPDATE |
h5p_author_delete |
admin | H5PPermissionsEnum::H5P_AUTHOR_DELETE |
h5p_library_list |
admin | H5PPermissionsEnum::H5P_LIBRARY_LIST |
h5p_library_read |
admin | H5PPermissionsEnum::H5P_LIBRARY_READ |
h5p_library_create |
admin | H5PPermissionsEnum::H5P_LIBRARY_CREATE |
h5p_library_delete |
admin | H5PPermissionsEnum::H5P_LIBRARY_DELETE |
h5p_library_update |
admin | H5PPermissionsEnum::H5P_LIBRARY_UPDATE |
h5p_library_install |
admin | H5PPermissionsEnum::H5P_LIBRARY_INSTALL |
h5p_library_upload |
admin | H5PPermissionsEnum::H5P_LIBRARY_UPLOAD |
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”H5P_INTERNAL_TOKEN, H5P_SERVICE_TIMEOUT, H5P_SERVICE_URL