1

Has anyone used the python wrapper for the Five9 API?

I'm trying to run one of our custom reports through the API but am unsure how to pass the time criteria.

If the report is already built:
Is there a way to run it without passing criteria?

It seems like this should be enough (since the report is already built):

client.configuration.runReport(folderName='Shared Reports', reportName='Test report')

But it didn't work as expected.
What can I do to solve this?

zx485
  • 28,498
  • 28
  • 50
  • 59

1 Answers1

1

This works for me. You can probably get fancier with a while loop checking if the report is done but this isn't time sensitive.

from five9 import Five9
import time

client = Five9('username','password')
start = '2019-08-01T00:00:00.000'
end = '2019-08-29T00:00:00.000'
criteria = {'time':{'end':end, 'start':start}}
identifier = client.configuration.runReport(folderName='SharedReports',reportName='reportname',criteria=criteria)
time.sleep(15)
get_results = client.configuration.getReportResult(identifier)
Aaron Melgar
  • 332
  • 3
  • 6