rename api param to :name, add more tests