add rest api polling support

consider add simple text about when it si thrown