在REST API中的Python中获取请求中传递sysdate参数

时间:2019-10-25 10:50:53

标签: python rest api

"result": [
        {           
            "upon_reject": "cancel",
            "sys_updated_on": "2019-01-09 05:45:21",
            "approval_history": "",
            "skills": "",
            "number": "INC1000001"}

在Python中获取REST API请求, 如图所示,我有json的输出。这是基于票证跟踪URL的。 我的实际挑战是获取当天创建的事件列表,我想将sysdate作为参数传递,以便我对get请求请求的响应将成为事件列表。

如何用python编写

PARAMS={'sys_updated_on':'2019-01-09'}
response = requests.get(url,params=PARAMS,auth=(user,pwd),headers=headers)

这不起作用。

此外,无论时间戳如何,它都应获取。

0 个答案:

没有答案