api to expose a list of posts