copied from `v1/api_controller.rb`, but i'll remove