Skip to content

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.

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).

  • H5PServiceClient calls the service with the shared X-Internal-Token (server-to-server calls act as the system user).
  • H5PContentService lists 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/*.
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).

Operator documentation: front/docs-site/src/content/docs/operators/h5p.mdx.

Method Path Auth Action
GET /api/admin/h5p/contents yes H5PContentAdminApiController@index
DELETE /api/admin/h5p/unused yes H5PContentAdminApiController@deleteUnused
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

Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).

None.

None.

None.

None.

H5P_INTERNAL_TOKEN, H5P_SERVICE_TIMEOUT, H5P_SERVICE_URL