Table API: DOT Walking on sysparm_query

getknk
Kilo Contributor

hi 

I've written a python code to collect data from ServiceNow Tables using API

This works in most cases, except when I try to use DOT walking in sysparm_query

The aim is to get ALL Linux Hosts, which are Operational & part of Service Offering

table/cmdb_rel_ci?sysparm_query=parent.sys_class_name=service_offering&child.sys_class_name=cmdb_ci_linux_server&child.operational_status=1&sysparm_limit=10

The above fails with ERROR 500

But If reduce this to

table/cmdb_rel_ci?sysparm_query=parent.sys_class_name=service_offering&sysparm_limit=10

It works.  (basically it works if I put any DOT walked sysparam_query and if it ONLY one of them. More than one, it fails

Any chance to make the DOT walked filters work with multiple filter conditions (using &) ?

 

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

You need to use '^' instead of &

parent.sys_class_name=cmdb_ci_acc^child.sys_class_name=cmdb_ci_lb_a10


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

You need to use '^' instead of &

parent.sys_class_name=cmdb_ci_acc^child.sys_class_name=cmdb_ci_lb_a10


Please mark this response as correct or helpful if it assisted you with your question.

thanks mate. it worked