Developing for Splunk Enterprise

Custom Command does not provide all fields from REST

Path Finder

I created a Custom Command to generate Events from a REST-API.



filename =
generating = true
chunked = true
supports_multivalues = true




Command runs. The problem is that there are different field sets per Host, where I'm looping through. 

But I only get the fields where all the hosts have an entry. 


HostField aField b


Field b will not show up in the Splunk Results List.

Code sample. I add the patch report only to those hosts, which have on.



if len(sorted_patch_report) > 0:
                     sorted_patch_report = (sorted_patch_report[0])

                     sorted_patch_report_renamed = {"Patching_" + str(key): val for key, val in sorted_patch_report.items()}


                     yield dict(i)

                 #except IndexError:
                      #sorted_patch_report = 'null'
            "No patch report for "+i['fullQualifiedDomainName'])

                      yield dict(i)



If I print the dict to logger I see all the fields.

Any Idea?

Labels (2)
0 Karma

Splunk Employee
Splunk Employee

Thanks for reporting this, we believe the issue has been addressed in version 1.6.18 of the Python SDK. After some discussion with the community on how to release the fix the consensus was to allow developers to opt-in to the fix (see

Here's more details on how to opt-in to the fix by calling


within the search command:

0 Karma
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!


Or Learn More in Our Blog >>