您可以使用 Jython API,它是 AR Java API 的 Python 包装器:
https://communities.bmc.com/docs/DOC-19318
这是该文档中的一些示例查询代码:
def get_entry():
"""This is how to return a single entry using the getEntry method
"""
try:
schema = 'User' # We define our form here
entry_id = '000000000000001' # We define our target entry_id here
# How to return an entry with all fields
entry = ars.getEntry(schema, entry_id, None)
print(entry)
# How to return an entry with certain fields (Field ID 1,2,3,4,5 in this scenario)
entry = ars.getEntry(schema, entry_id, [1, 2, 3, 4, 5])
print(entry)
# How to loop through and print entry, accounting for null values w/ toString method
entry = ars.getEntry(schema, entry_id, None)
for i in entry:
print '%s: %s' % (i, entry[i].toString())
except ARException, e:
print(e)