All Apps and Add-ons

Change an existing index frozenTimePeriodInSecs Thru REST

dcroteau
Splunk Employee
Splunk Employee

I know you can create a new index through REST:

curl -k -u admin:changeme https://127.0.0.1:8089/servicesNS/admin/search/data/indexes -d name=mynewindex -d frozenTimePeriodInSecs=#######

Is there a way to change or update an existing indexes frozenTimePeriodInSecs though REST?

0 Karma

supabuck
Path Finder

Hi dcroteau,

Let me know if the suggestion below worked.

Thanks!

-supabuck

0 Karma

supabuck
Path Finder

Hello dcroteau,

This absolutely can be done.

Based upon your example here is what you would do for the case of your index named mynewindex wanted to be changed to a year of retention:

curl -k -u admin:changeme https://127.0.0.1:8089/servicesNS/admin/search/data/indexes/mynewindex -d frozenTimePeriodInSecs=31536000

Specifying it in the path will alter the settings on that index via the REST endpoint.

Regards,
supabuck

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...