split API into data and actions