Reporting

How to update all alert parameters via post api?

mosh
Explorer

I need to update many params in many saved searches via POST API from nodejs.

I  can create alerts, but cannot update all the params (including spl search) via POST to this endpoint

https://${HOST}:8089/servicesNS/${USERNAME}/${APP}/saved/searches/${ALERTNAME} 

Error message is: cannot create .. savedsearch by the name already exists.

Is there an  endpoint to update (POST/PUT) all the params (in GUI)?

I was able to update only some params using splunk javascript/python3 sdk, but it doesn't support many of the advanced params and is very slow compared to the POST API, and some of the params names are different?

Some examples (with all supported params by sdk (JS/Python3 and API) would be helpful.

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

mosh
Explorer

Figured out myself, had to delete params.name and then POST.

View solution in original post

0 Karma

mosh
Explorer

Figured out myself, had to delete params.name and then POST.

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hello @mosh ,

I'm a Splunk Community moderator here. I'm glad that you figured out the answer to your own question. You can accept your own answer by clicking "Accept as Solution". This may be helpful for other users visiting your question in the future.

 

Happy Splunking!!!

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...