Beispiel #1
0
 def upload(self, client: DefaultApi):
     """
     Upload the job item to demisto_client
     Args:
         client: The demisto_client object of the desired XSOAR machine to upload to.
     Returns:
         The result of the upload command from demisto_client
     """
     return client.generic_request(method='POST',
                                   path='jobs/import',
                                   files={'file': str(self.path)},
                                   content_type='multipart/form-data')
Beispiel #2
0
    def upload(self, client: DefaultApi):
        """
        Upload the lists item to demisto_client
        Args:
            client: The demisto_client object of the desired XSOAR machine to upload to.

        Returns:
            The result of the upload command from demisto_client
        """
        response = client.generic_request(method='POST',
                                          path='lists/save',
                                          body=self.to_dict(),
                                          response_type='object')[0]

        return pprint.pformat(response)