REST API - DELETE config/service config_name or host_name
Posted: Thu Oct 07, 2021 3:20 am
Hi,
There are 2 REST API calls for DELETE config/service under Config Reference in Help section ( Nagios XI 5.7.4 - older version).
1. DELETE .../config/service?host_name=testapihost&service_description=PING&applyconfig=1
2. DELETE .../config/service/<config_name>/<service_description>?applyconfig=1
Question is: which one is correct? Using host_name to delete service or using config_name in delete service? Because GET operation uses config_name as optional parameter and host_name is not mentioned.
DELETE config/service or config/service/<config_name>/<service_description>, because under required parameters mentions host_name and service_description. config_name is not mentioned, which is confusing.
Can I use name of host_name as case INsensitive? Admins are sometimes using upper case and sometimes lower case
Dejan
There are 2 REST API calls for DELETE config/service under Config Reference in Help section ( Nagios XI 5.7.4 - older version).
1. DELETE .../config/service?host_name=testapihost&service_description=PING&applyconfig=1
2. DELETE .../config/service/<config_name>/<service_description>?applyconfig=1
Question is: which one is correct? Using host_name to delete service or using config_name in delete service? Because GET operation uses config_name as optional parameter and host_name is not mentioned.
DELETE config/service or config/service/<config_name>/<service_description>, because under required parameters mentions host_name and service_description. config_name is not mentioned, which is confusing.
Can I use name of host_name as case INsensitive? Admins are sometimes using upper case and sometimes lower case
Dejan