Splunk Search

Instead of using Job Manager, rest call to kill/stop all running current adhoc jobs for one user?

john_glasscock
Path Finder

Does anyone know of a rest call that can be used to kill all adhoc queries for a user?  I do not wish to all users searches, nor do I want to kill schedule searches for that user.

I have the following rest query to identify the current running query for Running_man.

| rest /services/search/jobs/
| search author=Running_man dispatchState=RUNNING
| search NOT id=*scheduler*
| table title id normalizedSearch runDuration

I just would like to be able to kill/stop the results found versus having to go into the job manager.

Labels (1)
0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @john_glasscock 

You can try following Rest API, action: cancel . Doc link - Search endpoint descriptions - Splunk Documentation

https://<host>:<mPort>/services/search/jobs/{search_id}/control
curl -k -u admin:pass https://localhost:8089/services/search/jobs/mysearch_02151949/control -d action=pause

 ----

An upvote would be appreciated if it helps!

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 ...