Started the code for the public retrieve API