List blocks created by a specific block plugin

So I had to extend the wordpress rest api by adding a custom endpoint that filtered all the posts using has_block
and return the results.