clapi

Clapi as in command line api

RTDOWNTIME

RTDOWNTIME = realtime downtime = live downtime != recurrent/scheduled downtime

Here's how to display and remove a Host's one

root@central:~# /usr/share/centreon/bin/centreon -u admin -p admin -o RTDOWNTIME -a show -v "Host;Centreon"
id;host_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed;url
636;Centreon;admin;2018/05/18 09:00;N/A;2018/05/18 09:00;2018/05/18 11:00;Downtime set by admin;7200;1;
root@central:~# /usr/share/centreon/bin/centreon -u admin -p admin -o RTDOWNTIME -a cancel -v "636"
root@central:~# /usr/share/centreon/bin/centreon -u admin -p admin -o RTDOWNTIME -a show -v "Host;Centreon"
id;host_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed;url

Here's the same for Service's

root@central:~# /usr/share/centreon/bin/centreon -u admin -p admin -o RTDOWNTIME -a show -v "Svc"
id;host_name;service_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed;url
629;Centreon;/tmp;admin;2018/05/18 08:53;N/A;2018/05/18 08:53;2018/05/31 10:53;Downtime set by admin;1130400;1;
630;Centreon;/usr/local/;admin;2018/05/18 08:53;N/A;2018/05/18 08:53;2018/05/31 10:53;Downtime set by admin;1130400;1;
root@central:~# /usr/share/centreon/bin/centreon -u admin -p admin -o RTDOWNTIME -a cancel -v "629"
root@central:~# /usr/share/centreon/bin/centreon -u admin -p admin -o RTDOWNTIME -a show -v "Svc"
id;host_name;service_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed;url
630;Centreon;/usr/local/;admin;2018/05/18 08:53;N/A;2018/05/18 08:53;2018/05/31 10:53;Downtime set by admin;1130400;1;

REST api

Here's the official doc : https://github.com/centreon/centreon/tree/master/doc/en/api/api_rest