How to call default API endpoint in custom plugin?

The right solution for now is the one @jarmo advised above.