Accidentally created an API

It started out by thinking about how a delete link should work, and ended up by cleaning up a lot of code and making things both simpler and more useful.

We probably won’t tout the API itself, but we will use it for the front end of Kwoosh and in theory a user could use it to create their own apps.

Once we decided to do a RESTFUL delete request, the easiest way to handle it was to create a method for each allowed HTTP method per view. This then soon grew to remove the non-RESTFUL endpoints we had and merge them into a REST friendly environment.

It then turns out that the rest of the work we have been doing to move to Vue.js, allows us to easily select just the response data to return. And with that we have an accidental JSON API.