Knowledge Management

How can I delete a KV Store Collection using Splunk API?

alonsocaio
Contributor

Hi,

I need to delete some KV Store Collections, and the only way I have to perform this kind of action is using the REST API, since I'm on Splunk Cloud.

When I create KV Store Collections, I use this request, following the docs on Use the Splunk REST API to manage KV Store collections and data in Splunk Cloud Platform or Splunk E... : 

 

curl -k -u USER -d name=KV-COLLECTION-NAME https://HOSTNAME.splunkcloud.com:8089/servicesNS/nobody/APP_NAME/storage/collections/config

 

What I would like to know is how can I delete the KV Store Collection using the same approach. 

Thanks

Labels (1)
Tags (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

According to the REST API Manual at https://docs.splunk.com/Documentation/Splunk/8.2.2/RESTREF/RESTkvstore#storage.2Fcollections.2Fconfi... you send a DELETE operation to a similar URL.

curl -k -u USER -X DELETE -d name=KV-COLLECTION-NAME https://HOSTNAME.splunkcloud.com:8089/servicesNS/nobody/APP_NAME/storage/collections/config/<<collection-name>>
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

According to the REST API Manual at https://docs.splunk.com/Documentation/Splunk/8.2.2/RESTREF/RESTkvstore#storage.2Fcollections.2Fconfi... you send a DELETE operation to a similar URL.

curl -k -u USER -X DELETE -d name=KV-COLLECTION-NAME https://HOSTNAME.splunkcloud.com:8089/servicesNS/nobody/APP_NAME/storage/collections/config/<<collection-name>>
---
If this reply helps you, Karma would be appreciated.

alonsocaio
Contributor

Hi,

It worked, thanks for you response!

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