Replace old api implementation with grape