code: def which_api_version(self, api_call):
          
          # Leverage patterns of calls to API methods.
          if api_call.endswith('.php'):
              # API v1.
              return 1
          elif api_call.startswith('api/2.0/'):
              # API v2.
              return 2
          elif '/am/' in api_call:
              # Asset Management API.
              return 'am'
          elif '/was/' in api_call:
              # WAS API.
              return 'was'
          return False
docs: Return QualysGuard API version for api_call specified.