following web api tutorial

I am following this tutorial and wrote the code in the tutorial to create a html page that interacts with my API. When I run the code the debug for the javascript says that if failed to load resource the server responded with error 404. I am unsure how to resolve this issue as I am quite new to APIs as a programming concept.

This is how my script is defined in the html file.

 <script src="js/site.js" asp-append-version="true"> </script>
        <script type="text/javascript">

I also get an error message from the debug saying that my getItems method is not defined.Again I have followed the tutorial and I am unsure of why this isn't working. The image shows how the the getItems method is written in my code.