docstr: Restart all of the replicas for a Realtime API without downtime.
  
  Args:
      api_name: Name of the API to refresh.
      force: Override an already in-progress API update.
docstr_tok: ["Restart","all","of","the","replicas","for","a","Realtime","API","without","downtime",".","Args",":","api_name",":","Name","of","the","API","to","refresh",".","force",":","Override","an","already","in-progress","API","update","."]
code: def refresh(self, api_name: str, force: bool = False):
      """
      Restart all of the replicas for a Realtime API without downtime.
  
      Args:
          api_name: Name of the API to refresh.
          force: Override an already in-progress API update.
      """
      args = ["refresh", api_name, "--env", self.env_name, "-o", "json"]
  
      if force:
          args.append("--force")
  
      run_cli(args, hide_output=True)
  
file_path: cortex/python/client/cortex/client.py
imports: import json
  import os
  import shutil
  import time
  import yaml
  from typing import List, Dict, Any
  from cortex import util
  from cortex.binary import run_cli
  from cortex.telemetry import sentry_wrapper
label_desc: Use image node_id 7 for calling the Client obj's underlying member method code with example usage: obj.refresh(api_name, force) without return types