Flexible api root

Adds a single point for setting up the API root.