http handler on /api/ url