task rest call cleanup