add rest api for pages