Initial commit of API code