BMC Remedy AR system API

961 Views Asked by At

I am trying to extract details from incident. I set:

entryListFields = [1000000161, 1000000217, 1000005781];
entry_result = arserver_user.getEntry (form,entry_info_list[0].getEntryID(entryListFields);

however,this entry_result returns not only the 3 data fields requested, but also with these fields: 1, 30376000, 303524200, 303524300.

and when I use value = entry_result.get (1000000161);

It returns “None”

1

There are 1 best solutions below

0
DavidXYZ On

You could use the Jython API, which is a Python wrapper for the AR Java API:

https://communities.bmc.com/docs/DOC-19318

Here is some sample query code from that doc:

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)