Added retry count to REST API