Added wait REST API method