【发布时间】:2019-03-21 14:11:57
【问题描述】:
我现在无法通过匹配 assignment_group 从服务中检索票证。我现在正在使用 pysnow 并使用 table api 从服务中检索票证。
下面是我的代码:
import pysnow
c = pysnow.Client(instance='myinstance', user='username', password='password')
incident = c.resource(api_path='/table/incident')
#getting the assignment group of a ticket
print ("tickets are")
response = incident.get(query={'number': 'INC0010020'}, stream=True)
a = response['assignment_group']
print (a)
#using the same assigment group above to fetch more tickets
response = incident.get(query={'assignment_group' : a}, stream=True)
print (response.one())
我得到以下结果:
【问题讨论】:
-
欢迎来到 StackOverflow!请在以后将错误消息添加为文本而不是图像
标签: python servicenow servicenow-rest-api