Splunk SOAR

Rest api filtering

meshorer
Path Finder

Hello,

is there a way to use a rest api and search for containers that contain the word  computer or the word process in the container name? I only manage to filter for “contains” or the filter “in”, , but i failed to use both. 

Labels (1)
0 Karma

victor_menezes
Communicator

Yep, you'll have to have separated calls for that. Filters on SOAR REST can be appended but they will work as "AND" condition as "OR" is not supported in that sense as a limitation on Django querysets 😞

So the easiest way would be to combine the results of https://<your_soar_instance>/rest/container?_filter_name__icontains="computer" and the ones from https://<your_soar_instance>/rest/container?_filter_name__icontains="process" and finally process then accordingly.

 

0 Karma

meshorer
Path Finder

@phanTom  
ok so maybe there is a way to use IN operator on values in custom fields? For exmple custom field key is department, and i want to sort for values buisness, HR 

0 Karma

SOARt_of_Lost
Path Finder

What's your end goal with this? That would affect how I'd approach the problem. Do you want a playbook to take action based on this info, or is it some kind of audit?

0 Karma

phanTom
SplunkTrust
SplunkTrust

@meshorer 

The IN operator will only look for the entire entry in the list so won't work as you cant wildcard the entries. You may have to pull in containers within a date/time range and then do some post-processing in custom code to grab what you need from the returned values. 

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...