def export(self, category=None, from_name=None, to_name=None,
               pcapid=None, search_time=None, serialno=None,
               extra_qs=None):
        self.__set_api_key()
        self.__clear_response()

        query = {}
        query['type'] = 'export'
        query['key'] = self.api_key
        if category is not None:
            query['category'] = category
        if from_name is not None:
            query['from'] = from_name
        if to_name is not None:
            query['to'] = to_name
        if pcapid is not None:
            query['pcapid'] = pcapid
        if search_time is not None:
            query['search-time'] = search_time
        elif pcapid is not None:
            if isinstance(pcapid, str):
                try:
                    n = int(pcapid)
                except __HOLE__:
                    raise PanXapiError('Invalid pcapid: %s' % pcapid)
            pcap_time = self.pcapid_time(n)
            panos_time = self.panos_time(pcap_time)
            query['search-time'] = panos_time
            self._log(DEBUG1, 'pcapid time: %s %s', pcap_time,
                      panos_time)
        if serialno is not None:
            query['serialno'] = serialno
        if extra_qs is not None:
            query = self.__merge_extra_qs(query, extra_qs)

        response = self.__api_request(query)
        if not response:
            raise PanXapiError(self.status_detail)

        if not self.__set_response(response):
            raise PanXapiError(self.status_detail)

        if self.export_result:
            self.export_result['category'] = category
dataset/ETHPy150Open PaloAltoNetworks/SplunkforPaloAltoNetworks/bin/lib/pan-python/lib/pan/xapi.py/PanXapi.export