我正在尝试使用附加生成器中的python代码使用Splunk的模块化输入。我有一个请求url,它以csv的形式提供我的数据(我们想减小数据的大小,因为json文件是csv的10倍)。网址的参数例如是开始时间和结束时间(为帖子的私密性对网址进行了一些更改):https://localhost/something/v1/detail/csv?startTime=2010-08-02%207%3A00&endTime=2010-08-02%208%3A00
我将如何在python代码中设置参数?
我的另一个问题是我正在使用OAuth2和客户端凭据。如何将其传递给我?
*我仍然是Python和Splunk的初学者,因此示例或资源也将有所帮助。如果需要更多信息,请告诉我*
以下是我到目前为止的内容:
url = 'https://localhost:8000/something/vi/etail/csv'
method = 'GET'
#start and end time dictionary
parameters =
# example on how to pass OAuth2 client credentials
# The following examples send rest requests to some endpoint.
response = helper.send_http_request(url, method, parameters=None, payload=None,
headers=None, cookies=None, verify=True, cert=None,
timeout=None, use_proxy=True)