Updating the API to the new API

JAVA-1325
This has been moved to a ticket - so done.