update api creation and unit tests