Moving to /api endpoints

Updated get_post
Updated list_posts