Move api registration to endpoints.py