We have this in a few controllers, maybe it needs to move to the API base controller?  @istrade?