Getting Data In

Sending HTTP DELETE request using splunk's 'rest' command

paramagurukarth
Builder

Please let me know if there any way to send a HTTP request to splunk REST end point using splunk's rest (http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Rest) command with HTTP DELETE method

Tags (2)
0 Karma

paramagurukarth
Builder

Splunk REST will return xml in ODATA format...
For example, https://localhost:8089/servicesNS/-/search/saved/searches

This search will return list of saved searches..
One **** tag for each saved searches
Each entry tag contains child tags **** (More than one) , these tag contains URLs related to that particular saved search and the relation is defined by the attribute "rel"..
Pick the one with "rel" as "remove" and send a ajax request with http_method DELETE or use any REST Clients (Post Man REST client plugin for chrome).. you can remove it

0 Karma

gwobben
Communicator

The rest command in Splunk can only do GET requests

Patient
Path Finder

Hi,
If I've understood what you need, I will like to let You know that you can set this stanza [:] in the restmap.conf.spec file. Applicable to all REST stanzas
Stanza definitions below may supply additional information for these.

   [<rest endpoint name>:<endpoint description string>]
 * match=<path> to  Specify the URI that calls the handler.
 * capability.<post|delete|get|put>=<capabilityName>
 * Depending on the HTTP method, check capabilitieson the authenticated session user.
 * If you use 'capability.post|delete|get|put,' then the associated
   method is checked

`

0 Karma

gwobben
Communicator

I downvoted this post because not related to the question

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...