Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Expert rankExpert
2 years ago

Can I update the SSL Cert Renewal thresholds through the API?

I have a group of Websites that I need to change the SSL Cert Expiration thresholds from 90/45/15 to some smaller numbers.  I don’t want to update 40+ websites by hand, so I was hoping to use the APi for this.

When I pull a website, I find this in the info:

"alertExpr""< 90 45 15",
 

I looked up the Patch command to just update the field in question, but the Patch pages says it can only be used for certain fields, and of course, this field isn’t in the list:

https://www.logicmonitor.com/support/rest-api-developers-guide/v1/services/update-services

So I’m guessing that means I have to do a Put, which I think means I have to re-specify every setting for the website as it overwrites the whole record?  I’m a bit hesitant so I don’t mess something up if I have to recreate all these sites.

Any other suggestions on a way to just update this one setting without doing it manually in the UI?

Thanks.

  • Anonymous's avatar
    Anonymous
    2 years ago

    If patch won’t work, put is your only option. Do a get, modify the payload, then put the whole thing back. that way you’re putting the entire thing as its given to you, except for your changes.

  • Anonymous's avatar
    Anonymous

    If patch won’t work, put is your only option. Do a get, modify the payload, then put the whole thing back. that way you’re putting the entire thing as its given to you, except for your changes.