API started

Here's a basis for an API. Just implemented some components-related endpoints for now, but it's a start on #3 :)