updated api resource and models