Splunk Search

How to get all fields of event with 'sid' via REST endpoint ?

shravankumarkus
New Member

/servicesNS/nobody/search/search/jobs/sid/results -- this endpoint is not giving all fields of events for the searchid and even in dashboard when i view results of triggered alert its returning the results in 'fast mode', so some fields are missing.

how to get all field of eventss via REST api with <sid> ?

Tags (1)
0 Karma

niketn
Legend

@shravankumarkusuma you have misunderstood the usage for /search/jobs/<sid>/results endpoint. Refer to documentation as to how this can be used. Using curl you can provide the list of fields for search and get the result. Just the rest api call using rest command in Splunk will not return anything as stated in the documentation: https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTsearch#search.2Fjobs.2F.7Bsearch_id....

For your usecase try loadjob command instead.

| loadjob <sid> events=false
| analyzefields classfield=is_activated
| fields field
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...