work with rails-api