Searching H5P Content In Pressbooks (Wordpress)

Hi Everyone.

Our video streaming service has changed and now we need to remap all of the H5P interactive video content that we have in our Pressbooks publishing tool (which is built on WordPress MultiSite).  We have the H5P WP plugin installed.

I'm able to use the WP H5P api to get some info about H5P, for example calling:

https://pressbooks.wpmultisite.com/book-title/wp-json/h5p/v1/all/

returns a JSON list of the URL to every H5P file in the site. For example:

https://pressbooks.wpmultisite.com/book-title/wp-content/uploads/sites/1...

I'd like to be able to do a more sophisticated 'search' to make tracking down all the video references more efficient.  Here are my hopes and dreams in priority order:

  1. Find only the "Interactive Video" H5P activities
  2. #1 and search across all of the sites (in WP MultiSite)
  3. #2 and find only those that link to our specific video streaming service (i.e., the ones that need to be remapped)

Any thoughts?

Thanks!

Dave

otacke's picture

Hi!

For each site, you could join the two database tables that hold the content data and the libraries data on the library id of H5P.InteractiveVideo and match the parameters of the contents against a regular expression that describes your video service.

Best,

Oliver