Five9 API python 包装器 - runReport

问题描述 投票:0回答:1

有人使用过 Five9 API 的 python 包装器吗?

我正在尝试通过 API 运行我们的自定义报告之一,但不确定如何通过时间标准。

如果报告已构建:
有没有办法在不通过标准的情况下运行它?

看起来这应该足够了(因为报告已经构建好了):

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

但是并没有达到预期效果。
我可以做什么来解决这个问题?

python five9
1个回答
2
投票

这对我有用。您可能会更喜欢使用 while 循环检查报告是否完成,但这对时间不敏感。

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)
© www.soinside.com 2019 - 2024. All rights reserved.