Api should be rewritten