updated getPost api endpoint