简体   繁体   English

Five9 API python 包装器 - runReport

[英]Five9 API python wrapper - runReport

Has anyone used the python wrapper for the Five9 API ?有没有人使用过Five9 API的 python 包装器?

I'm trying to run one of our custom reports through the API but am unsure how to pass the time criteria.我正在尝试通过 API 运行我们的自定义报告之一,但不确定如何通过时间标准。

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?我能做些什么来解决这个问题?

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.如果报告完成,您可能会更喜欢使用 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)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM