Migrating api functionality