Need help creating a custom API endpoint

I’ve followed this tutorial on how to create my custom API endpoint, but I’ve ran into a problem, which is that I keep getting the following error:

Error: Cannot instantiate interface DevRestApiApiProductRepositoryInterface in /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 

I’ve ensured the namespace and Classname are correct and I’ve executed bin/magento setup:upgrade, bin/magento cache:flush, and bin/magento setup:di:compile multiple times. What else can I do to try and fix this error? Any pointers would be greatly appreciated.

submitted by /u/Your_Friendly_Nerd
[link] [comments]