Remove custom variable using API

I’ve a host with a passive service. The service has custom variable and I would like to remove them using API.

Please advise,
Thanks

1 Like

you can make one api call to fetch the service
convert json to object
remove the custom var
convert object to json
send the json back using PUT to remove the var

1 Like

Thanks.

So can I modify the “original_attributes” using that method?

Thanks

https://icinga.com/docs/icinga-2/latest/doc/12-icinga2-api/#modifying-objects

1 Like