From 48a78cb11873a47f055bc67ffc0368e763a5ded3 Mon Sep 17 00:00:00 2001 From: loiclau Date: Wed, 15 Nov 2017 11:48:11 +0100 Subject: [PATCH 1/5] feat(clapi) add cancel downtime --- lib/Centreon/Object/Downtime/RtDowntime.php | 15 ++++++-- .../centreonRtDowntime.class.php | 36 +++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/lib/Centreon/Object/Downtime/RtDowntime.php b/lib/Centreon/Object/Downtime/RtDowntime.php index cfdbcd8f6d7..7de8329f678 100644 --- a/lib/Centreon/Object/Downtime/RtDowntime.php +++ b/lib/Centreon/Object/Downtime/RtDowntime.php @@ -66,7 +66,7 @@ public function getHostDowntimes($hostList = array()) $hostFilter = "AND h.name IN ('" . implode("','", $hostList) . "') "; } - $query = "SELECT name, author, actual_start_time , actual_end_time, " . + $query = "SELECT internal_id, name, author, actual_start_time , actual_end_time, " . "start_time, end_time, comment_data, duration, fixed " . "FROM downtimes d, hosts h " . "WHERE d.host_id = h.host_id " . @@ -99,7 +99,7 @@ public function getSvcDowntimes($svcList = array()) $serviceFilter .= implode(' AND ', $filterTab) . ') '; } - $query = "SELECT h.name, s.description, author, actual_start_time, actual_end_time, " . + $query = "SELECT d.internal_id, h.name, s.description, author, actual_start_time, actual_end_time, " . "start_time, end_time, comment_data, duration, fixed " . "FROM downtimes d, hosts h, services s " . "WHERE d.service_id = s.service_id " . @@ -113,4 +113,15 @@ public function getSvcDowntimes($svcList = array()) return $this->getResult($query); } + + /** + * @param $id + * @return array + */ + public function getCurrentDowntime($id) + { + $query = "SELECT * FROM downtimes WHERE ISNULL(actual_end_time) " . + " AND end_time > " . time() . " AND internal_id = " . $id; + return $this->getResult($query, array(), 'fetch'); + } } diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index e28f00c3bfd..0a41b73236d 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -229,6 +229,7 @@ public function show($parameters = null) public function showHost($hostList) { $fields = array( + 'id', 'host_name', 'author', 'actual_start_time', @@ -324,6 +325,7 @@ public function showSvc($svcList) $existingService = array(); $fields = array( + 'id', 'host_name', 'service_name', 'author', @@ -730,4 +732,38 @@ private function addInstanceDowntime( throw new CentreonClapiException(self::OBJECT_NOT_FOUND . ' INSTANCE : ' . implode('|', $unknownPoller)); } } + + /** + * @param null $parameters + * @throws CentreonClapiException + */ + public function cancel($parameters = null) + { + if (empty($parameters) || is_null($parameters)) { + throw new CentreonClapiException(self::MISSINGPARAMETER); + } + $listDowntime = explode('|', $parameters); + $unknownDowntime = array(); + + foreach ($listDowntime as $downtime) { + $infoDowntime = $this->object->getCurrentDowntime($downtime); + + if ($infoDowntime) { + $hostName = $this->hostObject->getHostName($infoDowntime['host_id']); + if (is_null($infoDowntime['service_id'])) { + $this->externalCmdObj->deleteDowntime('HOST', array($hostName . ';' . $downtime => 'on')); + } else { + $this->externalCmdObj->deleteDowntime('SVC', array($hostName . ';' . $downtime => 'on')); + } + } else { + $unknownDowntime[] = $downtime; + } + } + + if (count($unknownDowntime)) { + throw new CentreonClapiException( + self::OBJECT_NOT_FOUND . ' DOWNTIME ID : ' . implode('|', $unknownDowntime) + ); + } + } } From 1d071bcf5d44e5c047977100c7e66ccb9406b70a Mon Sep 17 00:00:00 2001 From: loiclau Date: Wed, 15 Nov 2017 11:58:31 +0100 Subject: [PATCH 2/5] update doc --- .../api/clapi/objects/realtime_downtimes.rst | 30 ++++++++++++++++--- .../api/clapi/objects/realtime_downtimes.rst | 30 ++++++++++++++++--- 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/doc/en/api/clapi/objects/realtime_downtimes.rst b/doc/en/api/clapi/objects/realtime_downtimes.rst index 1ccb5446963..de85d687713 100644 --- a/doc/en/api/clapi/objects/realtime_downtimes.rst +++ b/doc/en/api/clapi/objects/realtime_downtimes.rst @@ -14,14 +14,16 @@ In order to list available real time downtimes, use the **SHOW** action:: You can use the value "HOST" to display all the downtimes:: [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a show -v "HOST;generic-host" - host_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed - generic-host;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 + id;host_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed + 6;generic-host;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 Columns are the following : ================================= =========================================================================== Column Description ================================= =========================================================================== +id Name of the downtime + Host_name Name of the host Author Name of the author @@ -49,14 +51,16 @@ In order to list available real time downtimes, use the **SHOW** action:: You can use the value "SVC" to display all the downtimes:: [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a show -v "SVC;generic-host,generic-service" - host_name;service_name;author;start_time;end_time;comment_data;duration;fixed - generic-host;generic-service;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 + id;host_name;service_name;author;start_time;end_time;comment_data;duration;fixed + 42;generic-host;generic-service;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 Columns are the following : ================================= =========================================================================== Column Description ================================= =========================================================================== +id Name of the downtime + Host_name Name of the host Service_name Name of the service @@ -170,3 +174,21 @@ Order Description 7 Short description of the real time downtime ========= ============================================ + + +Cancel a real time downtime +------------------------------ + +In order to cancel a real time downtime, use the **CANCEL** action:: +To get the value of the id, use the **SHOW** action:: + + [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a CANCEL -v "6|42" + +The required parameters are the following : + +========= ============================================ +Order Description +========= ============================================ +1 Id of downtime + +========= ============================================ diff --git a/doc/fr/api/clapi/objects/realtime_downtimes.rst b/doc/fr/api/clapi/objects/realtime_downtimes.rst index 1ccb5446963..de85d687713 100644 --- a/doc/fr/api/clapi/objects/realtime_downtimes.rst +++ b/doc/fr/api/clapi/objects/realtime_downtimes.rst @@ -14,14 +14,16 @@ In order to list available real time downtimes, use the **SHOW** action:: You can use the value "HOST" to display all the downtimes:: [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a show -v "HOST;generic-host" - host_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed - generic-host;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 + id;host_name;author;actual_start_time;actual_end_time;start_time;end_time;comment_data;duration;fixed + 6;generic-host;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 Columns are the following : ================================= =========================================================================== Column Description ================================= =========================================================================== +id Name of the downtime + Host_name Name of the host Author Name of the author @@ -49,14 +51,16 @@ In order to list available real time downtimes, use the **SHOW** action:: You can use the value "SVC" to display all the downtimes:: [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a show -v "SVC;generic-host,generic-service" - host_name;service_name;author;start_time;end_time;comment_data;duration;fixed - generic-host;generic-service;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 + id;host_name;service_name;author;start_time;end_time;comment_data;duration;fixed + 42;generic-host;generic-service;admin;2017/09/28 14:21;N/A;2017/09/26 17:00;2017/09/30 19:00;'generic-comment';3600;1 Columns are the following : ================================= =========================================================================== Column Description ================================= =========================================================================== +id Name of the downtime + Host_name Name of the host Service_name Name of the service @@ -170,3 +174,21 @@ Order Description 7 Short description of the real time downtime ========= ============================================ + + +Cancel a real time downtime +------------------------------ + +In order to cancel a real time downtime, use the **CANCEL** action:: +To get the value of the id, use the **SHOW** action:: + + [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a CANCEL -v "6|42" + +The required parameters are the following : + +========= ============================================ +Order Description +========= ============================================ +1 Id of downtime + +========= ============================================ From b6506a1aab01d7c1ef9ab868edb00998a2f6a1be Mon Sep 17 00:00:00 2001 From: loiclau Date: Thu, 16 Nov 2017 15:15:16 +0100 Subject: [PATCH 3/5] add test --- features/RestApi.feature | 1 - .../realtime_rest_api.postman_collection.json | 3644 +++++++++-------- 2 files changed, 1966 insertions(+), 1679 deletions(-) diff --git a/features/RestApi.feature b/features/RestApi.feature index 95d19a38c00..f7220cf9494 100644 --- a/features/RestApi.feature +++ b/features/RestApi.feature @@ -3,7 +3,6 @@ Feature: REST API I want REST API in Centreon Web So that I can develop software interfacing with Centreon Web - @critical Scenario: Configuration REST API tests Given a Centreon server with REST API testing data When REST API are called diff --git a/tests/rest_api/realtime_rest_api.postman_collection.json b/tests/rest_api/realtime_rest_api.postman_collection.json index ef1e3add88b..ca47ce8a216 100644 --- a/tests/rest_api/realtime_rest_api.postman_collection.json +++ b/tests/rest_api/realtime_rest_api.postman_collection.json @@ -2,12 +2,14 @@ "variables": [], "info": { "name": "Centreon Web Rest API realtime", - "_postman_id": "a3390387-9951-1ff9-b164-5ac10459ac21", + "_postman_id": "0b45c175-8d46-e2cb-4356-c359888c6a00", + "description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ { "name": "00-Authenticate", + "description": "", "item": [ { "name": "Authenticate", @@ -138,11 +140,33 @@ } ], "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=authenticate", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "authenticate", + "equals": true, + "description": "" + } + ], + "variable": [] + }, "method": "POST", "header": [ { "key": "Content-Type", - "value": "application/x-www-form-urlencoded" + "value": "application/x-www-form-urlencoded", + "description": "" } ], "body": { @@ -160,25 +184,7 @@ } ] }, - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=authenticate", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "authenticate", - "equals": true - } - ] - } + "description": "" }, "response": [] } @@ -186,9 +192,11 @@ }, { "name": "01-Base configuration", + "description": "", "item": [ { "name": "10-Timeperiods", + "description": "", "item": [ { "name": "Add tp", @@ -204,21 +212,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{tp_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -241,8 +234,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{tp_alias}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -260,21 +270,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};sunday;{{tp_sunday}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -295,8 +290,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};sunday;{{tp_sunday}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -314,21 +326,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};monday;{{tp_monday}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -349,8 +346,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};monday;{{tp_monday}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -368,21 +382,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};tuesday;{{tp_tuesday}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -403,8 +402,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};tuesday;{{tp_tuesday}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -422,21 +438,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};wednesday;{{tp_wednesday}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -457,8 +458,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};wednesday;{{tp_wednesday}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -476,21 +494,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};thursday;{{tp_thursday}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -511,8 +514,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};thursday;{{tp_thursday}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -530,21 +550,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};friday;{{tp_friday}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -565,25 +570,9 @@ "key": "object", "value": "centreon_clapi" } - ] - } - }, - "response": [] - }, - { - "name": "Setparam saturday", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { + ], + "variable": [] + }, "method": "POST", "header": [ { @@ -597,8 +586,26 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};saturday;{{tp_saturday}}\"\n}" + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};friday;{{tp_friday}}\"\n}" }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam saturday", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -619,8 +626,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};saturday;{{tp_saturday}}\"\n}" + }, + "description": "" }, "response": [] } @@ -645,21 +669,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};{{command_type}};{{command_line}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -682,8 +691,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};{{command_type}};{{command_line}}\"\n}" + }, + "description": "" }, "response": [] } @@ -708,21 +734,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name}};{{contact_alias}};test@localhost;{{contact_pwd}};0;0;en_US;Idap\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -745,8 +756,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name}};{{contact_alias}};test@localhost;{{contact_pwd}};0;0;en_US;Idap\"\n}" + }, + "description": "" }, "response": [] }, @@ -764,21 +792,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -801,8 +814,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -820,21 +850,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -857,8 +872,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -876,21 +908,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -913,8 +930,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -932,21 +966,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -969,8 +988,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -988,21 +1024,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1023,8 +1044,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1042,21 +1080,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1077,8 +1100,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" + }, + "description": "" }, "response": [] } @@ -1103,21 +1143,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{cg_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1140,8 +1165,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{cg_alias}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1159,21 +1201,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1196,8 +1223,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" + }, + "description": "" }, "response": [] } @@ -1222,21 +1266,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{hg_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1259,8 +1288,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{hg_alias}}\"\n}" + }, + "description": "" }, "response": [] } @@ -1285,21 +1331,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1320,8 +1351,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_alias}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1339,21 +1387,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_severity_level}};{{hc_severity_icon}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1374,8 +1407,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_severity_level}};{{hc_severity_icon}}\"\n}" + }, + "description": "" }, "response": [] } @@ -1400,21 +1450,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1437,25 +1472,9 @@ "value": "centreon_clapi", "equals": true } - ] - } - }, - "response": [] - }, - { - "name": "Set sc severity", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { + ], + "variable": [] + }, "method": "POST", "header": [ { @@ -1469,8 +1488,26 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_severity_level}};{{sc_severity_image}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_alias}}\"\n}" }, + "description": "" + }, + "response": [] + }, + { + "name": "Set sc severity", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1493,8 +1530,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_severity_level}};{{sc_severity_image}}\"\n}" + }, + "description": "" }, "response": [] } @@ -1519,21 +1573,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{sg_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1556,8 +1595,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{sg_alias}}\"\n}" + }, + "description": "" }, "response": [] } @@ -1566,6 +1622,7 @@ }, { "name": "30-Hosts_Templates", + "description": "", "item": [ { "name": "Create host template", @@ -1581,21 +1638,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name}};{{host_address}};;central;\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1618,8 +1660,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name}};{{host_address}};;central;\"\n}" + }, + "description": "" }, "response": [] }, @@ -1637,21 +1696,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1674,8 +1718,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1693,21 +1754,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1730,8 +1776,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1749,21 +1812,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1786,8 +1834,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1805,21 +1870,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_community;{{host_snmp_community}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1842,8 +1892,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_community;{{host_snmp_community}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1861,21 +1928,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_version;{{host_snmp_version}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1898,10 +1950,27 @@ "key": "object", "value": "centreon_clapi" } - ] - } - }, - "response": [] + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_version;{{host_snmp_version}}\"\n}" + }, + "description": "" + }, + "response": [] }, { "name": "Addcontactgroup", @@ -1917,21 +1986,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1954,8 +2008,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -1973,21 +2044,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2010,8 +2066,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2029,21 +2102,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2066,8 +2124,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" + }, + "description": "" }, "response": [] } @@ -2092,21 +2167,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_alias}};{{host_address}};{{htpl_name}};Central;\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2129,8 +2189,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_alias}};{{host_address}};{{htpl_name}};Central;\"\n}" + }, + "description": "" }, "response": [] }, @@ -2148,21 +2225,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2185,8 +2247,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2204,21 +2283,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2241,8 +2305,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2260,21 +2341,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2295,8 +2361,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2314,21 +2397,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2351,8 +2419,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2370,21 +2455,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2407,8 +2477,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2426,21 +2513,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2463,8 +2535,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2482,21 +2571,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2519,8 +2593,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2538,21 +2629,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_alias}};0.0.0.0;{{htpl_name}};Central;\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2575,8 +2651,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_alias}};0.0.0.0;{{htpl_name}};Central;\"\n}" + }, + "description": "" }, "response": [] } @@ -2601,21 +2694,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_alias}};\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2638,8 +2716,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_alias}};\"\n}" + }, + "description": "" }, "response": [] }, @@ -2657,21 +2752,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_period;{{tp_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2694,25 +2774,9 @@ "value": "centreon_clapi", "equals": true } - ] - } - }, - "response": [] - }, - { - "name": "Setparam check_command", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { + ], + "variable": [] + }, "method": "POST", "header": [ { @@ -2723,11 +2787,29 @@ "key": "centreon-auth-token", "value": "{{token}}" } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" - }, + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2750,8 +2832,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2769,21 +2868,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};max_check_attempts;{{stpl_max_check}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2804,8 +2888,25 @@ "key": "object", "value": "centreon_clapi" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};max_check_attempts;{{stpl_max_check}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2823,21 +2924,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2860,8 +2946,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2879,21 +2982,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2916,8 +3004,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -2935,21 +3040,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2972,8 +3062,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" + }, + "description": "" }, "response": [] } @@ -2998,21 +3105,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{stpl_description}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3035,8 +3127,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{stpl_description}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -3054,21 +3163,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3091,8 +3185,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -3110,21 +3221,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3147,8 +3243,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -3166,21 +3279,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3203,8 +3301,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -3222,21 +3337,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3259,8 +3359,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -3278,21 +3395,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3315,8 +3417,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" }, "response": [] } @@ -3325,6 +3444,7 @@ }, { "name": "99-Generate", + "description": "", "item": [ { "name": "Generate configuration", @@ -3349,21 +3469,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"APPLYCFG\",\n \"values\": \"Central\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3386,8 +3491,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"APPLYCFG\",\n \"values\": \"Central\"\n}" + }, + "description": "" }, "response": [] } @@ -3398,9 +3520,11 @@ }, { "name": "10-Host", + "description": "", "item": [ { "name": "host list without parameters", + "description": "", "item": [ { "name": "host list", @@ -3417,21 +3541,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts", "protocol": "http", @@ -3454,8 +3563,25 @@ "value": "centreon_realtime_hosts", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -3464,6 +3590,7 @@ }, { "name": "Host list with limit parameter", + "description": "", "item": [ { "name": "Limit", @@ -3480,21 +3607,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}", "protocol": "http", @@ -3522,8 +3634,25 @@ "value": "{{my_limit}}", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -3542,21 +3671,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit=2&fields=name", "protocol": "http", @@ -3589,26 +3703,9 @@ "value": "name", "equals": true } - ] - } - }, - "response": [] - }, - { - "name": "Limit with all fields", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var helpers = eval(globals.loadHelpers);", - "helpers.checkHostList([\"id\", \"name\", \"alias\", \"address\", \"state\", \"state_type\", \"output\", \"max_check_attempts\", \"check_attempt\", \"last_check\", \"next_check\", \"last_state_change\", \"last_hard_state_change\", \"acknowledged\", \"instance_name\", \"instance_id\", \"criticality\", \"passive_checks\", \"active_checks\", \"notify\", \"action_url\", \"notes_url\", \"notes\", \"icon_image\", \"icon_image_alt\", \"scheduled_downtime_depth\", \"flapping\"]);" - ] - } - } - ], - "request": { + ], + "variable": [] + }, "method": "GET", "header": [ { @@ -3619,11 +3716,30 @@ "key": "centreon-auth-token", "value": "{{token}}" } - ], - "body": { - "mode": "raw", - "raw": "" - }, + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with all fields", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var helpers = eval(globals.loadHelpers);", + "helpers.checkHostList([\"id\", \"name\", \"alias\", \"address\", \"state\", \"state_type\", \"output\", \"max_check_attempts\", \"check_attempt\", \"last_check\", \"next_check\", \"last_state_change\", \"last_hard_state_change\", \"acknowledged\", \"instance_name\", \"instance_id\", \"criticality\", \"passive_checks\", \"active_checks\", \"notify\", \"action_url\", \"notes_url\", \"notes\", \"icon_image\", \"icon_image_alt\", \"scheduled_downtime_depth\", \"flapping\"]);" + ] + } + } + ], + "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit=2&fields=id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "protocol": "http", @@ -3656,8 +3772,25 @@ "value": "id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -3666,6 +3799,7 @@ }, { "name": "Host list with viewType parameter", + "description": "", "item": [ { "name": "list with viewType", @@ -3682,21 +3816,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=all,unhandled,problems", "protocol": "http", @@ -3724,8 +3843,25 @@ "value": "all,unhandled,problems", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -3744,21 +3880,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=all", "protocol": "http", @@ -3786,8 +3907,25 @@ "value": "all", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -3807,21 +3945,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=unhandled", "protocol": "http", @@ -3849,8 +3972,25 @@ "value": "unhandled", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -3870,21 +4010,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=problems", "protocol": "http", @@ -3912,8 +4037,25 @@ "value": "problems", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -3932,21 +4074,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all,unhandled,problems", "protocol": "http", @@ -3979,8 +4106,25 @@ "value": "all,unhandled,problems", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -3999,21 +4143,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all", "protocol": "http", @@ -4046,8 +4175,25 @@ "value": "all", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4067,21 +4213,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=unhandled", "protocol": "http", @@ -4114,8 +4245,25 @@ "value": "unhandled", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4135,21 +4283,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=problems", "protocol": "http", @@ -4182,8 +4315,25 @@ "value": "problems", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -4192,6 +4342,7 @@ }, { "name": "Host list with status filter", + "description": "", "item": [ { "name": "status up with state and name", @@ -4209,21 +4360,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=up&fields=name, state", "protocol": "http", @@ -4256,8 +4392,25 @@ "value": "name, state", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4277,21 +4430,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=down&fields=name, state", "protocol": "http", @@ -4324,8 +4462,25 @@ "value": "name, state", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4345,21 +4500,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=unreachable&fields=name, state", "protocol": "http", @@ -4392,8 +4532,25 @@ "value": "name, state", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4413,21 +4570,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=pending&fields=name, state", "protocol": "http", @@ -4460,8 +4602,25 @@ "value": "name, state", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4480,21 +4639,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&status=all&fields=name, state", "protocol": "http", @@ -4532,8 +4676,25 @@ "value": "name, state", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -4542,6 +4703,7 @@ }, { "name": "Host list by Host", + "description": "", "item": [ { "name": "search by host name", @@ -4558,21 +4720,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}", "protocol": "http", @@ -4600,27 +4747,9 @@ "value": "{{host_name}}", "equals": true } - ] - } - }, - "response": [] - }, - { - "name": "search by host name with status up", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var helpers = eval(globals.loadHelpers);", - "helpers.test200();", - "helpers.testJson();" - ] - } - } - ], - "request": { + ], + "variable": [] + }, "method": "GET", "header": [ { @@ -4631,11 +4760,31 @@ "key": "centreon-auth-token", "value": "{{token}}" } - ], - "body": { - "mode": "raw", - "raw": "" - }, + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status up", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var helpers = eval(globals.loadHelpers);", + "helpers.test200();", + "helpers.testJson();" + ] + } + } + ], + "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=up", "protocol": "http", @@ -4668,8 +4817,25 @@ "value": "up", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4689,21 +4855,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=down", "protocol": "http", @@ -4736,8 +4887,25 @@ "value": "down", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4757,21 +4925,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=pending", "protocol": "http", @@ -4804,8 +4957,25 @@ "value": "pending", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4825,21 +4995,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=unreachable", "protocol": "http", @@ -4872,8 +5027,25 @@ "value": "unreachable", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4892,21 +5064,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=id", "protocol": "http", @@ -4939,8 +5096,25 @@ "value": "id", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -4959,21 +5133,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "protocol": "http", @@ -5006,8 +5165,25 @@ "value": "id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -5018,9 +5194,11 @@ }, { "name": "20-Service", + "description": "", "item": [ { "name": "Service list without parameters", + "description": "", "item": [ { "name": "Service List", @@ -5037,21 +5215,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services", "protocol": "http", @@ -5074,8 +5237,25 @@ "value": "centreon_realtime_services", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -5084,6 +5264,7 @@ }, { "name": "Service list by host and service", + "description": "", "item": [ { "name": "Service List by host name", @@ -5100,21 +5281,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}", "protocol": "http", @@ -5142,8 +5308,25 @@ "value": "{{host_name}}", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -5162,21 +5345,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}&searchService={{service_description}}", "protocol": "http", @@ -5209,8 +5377,25 @@ "value": "{{service_description}}", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -5229,21 +5414,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}&searchService={{service_description}}", "protocol": "http", @@ -5276,8 +5446,25 @@ "value": "{{service_description}}", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -5286,6 +5473,7 @@ }, { "name": "Service list with limit parameter", + "description": "", "item": [ { "name": "Service List with limit", @@ -5302,21 +5490,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&limit={{my_limit}}", "protocol": "http", @@ -5344,8 +5517,25 @@ "value": "{{my_limit}}", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -5364,21 +5554,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&limit={{my_limit}}&fields=id", "protocol": "http", @@ -5411,8 +5586,25 @@ "value": "id", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -5474,21 +5666,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&limit={{my_limit}}&fields=host_id,host_name,host_alias,host_address,host_state,host_state_type,host_output,host_last_check,host_next_check,host_acknowledged,instance,instance_id,host_action_url,host_notes_url,host_icon_image,description,state,state_type,id,output,perfdata,current_attempt,last_update,last_state_change,last_hard_state_change,last_check,next_check,max_check_attempts,notes,notes_url,action_url,icon_image,display_name,notify,acknowledged,passive_checks,active_checks,event_handler_enabled,flapping,scheduled_downtime_depth,flap_detection,criticality", "protocol": "http", @@ -5521,8 +5698,25 @@ "value": "host_id,host_name,host_alias,host_address,host_state,host_state_type,host_output,host_last_check,host_next_check,host_acknowledged,instance,instance_id,host_action_url,host_notes_url,host_icon_image,description,state,state_type,id,output,perfdata,current_attempt,last_update,last_state_change,last_hard_state_change,last_check,next_check,max_check_attempts,notes,notes_url,action_url,icon_image,display_name,notify,acknowledged,passive_checks,active_checks,event_handler_enabled,flapping,scheduled_downtime_depth,flap_detection,criticality", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -5531,6 +5725,7 @@ }, { "name": "Service list with viewType parameter", + "description": "", "item": [ { "name": "Service List with viewType problems", @@ -5548,21 +5743,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&viewType=problems", "protocol": "http", @@ -5590,8 +5770,25 @@ "value": "problems", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] }, @@ -5611,21 +5808,6 @@ } ], "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&viewType=unhandled_critical", "protocol": "http", @@ -5653,8 +5835,25 @@ "value": "unhandled_critical", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" }, "response": [] } @@ -5665,6 +5864,7 @@ }, { "name": "50-Downtime Realtime", + "description": "", "item": [ { "name": "Addhost Realtime", @@ -5688,24 +5888,9 @@ "" ] } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;{{host_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}\n" - }, + } + ], + "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -5728,8 +5913,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;{{host_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}\n" + }, + "description": "" }, "response": [] }, @@ -5767,21 +5969,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -5804,8 +5991,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" + }, + "description": "" }, "response": [] }, @@ -5842,21 +6046,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;{{hg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -5879,8 +6068,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;{{hg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}" + }, + "description": "" }, "response": [] }, @@ -5917,21 +6123,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;{{sg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -5954,8 +6145,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;{{sg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" + }, + "description": "" }, "response": [] }, @@ -5992,21 +6200,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"INSTANCE;Central;{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6029,8 +6222,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"INSTANCE;Central;{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" + }, + "description": "" }, "response": [] }, @@ -6099,21 +6309,6 @@ } ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}}\"\n}" - }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6136,8 +6331,25 @@ "value": "centreon_clapi", "equals": true } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}}\"\n}" + }, + "description": "" }, "response": [] }, @@ -6156,11 +6368,16 @@ "var jsonData = JSON.parse(responseBody);", "var result = jsonData.result;", "", + "postman.setEnvironmentVariable(\"rtdowntime_id\",result[0].id);", + "", "var schema = {", " \"type\": \"array\",", " \"items\": {", " \"type\": \"object\",", " \"properties\": {", + " \"id\": {", + " \"type\": \"string\"", + " },", " \"host_name\": {", " \"type\": \"string\"", " },", @@ -6193,7 +6410,7 @@ " }", " },", " \"additionalProperties\": false,", - " \"required\": [\"host_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " \"required\": [\"id\", \"host_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", " }", "}", "", @@ -6203,21 +6420,71 @@ } ], "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true, + "description": "" + } + ], + "variable": [] + }, "method": "POST", "header": [ { "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;{{host_name}}\"\n}" }, + "description": "" + }, + "response": [] + }, + { + "name": "Cancel downtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "var contentType = postman.getResponseHeader(\"Content-Type\");", + "tests[\"Content-Type is application/json\"] = contentType === \"application/json\";", + "" + ] + } + } + ], + "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6233,15 +6500,36 @@ { "key": "action", "value": "action", - "equals": true + "equals": true, + "description": "" }, { "key": "object", "value": "centreon_clapi", - "equals": true + "equals": true, + "description": "" } - ] - } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"CANCEL\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"{{rtdowntime_id}}\"\n}" + }, + "description": "" }, "response": [] } From 699d2004207292f7a6f9793ffd490cf0cbc469b4 Mon Sep 17 00:00:00 2001 From: loiclau Date: Fri, 17 Nov 2017 09:21:45 +0100 Subject: [PATCH 4/5] Revert "add test" This reverts commit b6506a1aab01d7c1ef9ab868edb00998a2f6a1be. --- features/RestApi.feature | 1 + .../realtime_rest_api.postman_collection.json | 3740 ++++++++--------- 2 files changed, 1727 insertions(+), 2014 deletions(-) diff --git a/features/RestApi.feature b/features/RestApi.feature index f7220cf9494..95d19a38c00 100644 --- a/features/RestApi.feature +++ b/features/RestApi.feature @@ -3,6 +3,7 @@ Feature: REST API I want REST API in Centreon Web So that I can develop software interfacing with Centreon Web + @critical Scenario: Configuration REST API tests Given a Centreon server with REST API testing data When REST API are called diff --git a/tests/rest_api/realtime_rest_api.postman_collection.json b/tests/rest_api/realtime_rest_api.postman_collection.json index ca47ce8a216..ef1e3add88b 100644 --- a/tests/rest_api/realtime_rest_api.postman_collection.json +++ b/tests/rest_api/realtime_rest_api.postman_collection.json @@ -2,14 +2,12 @@ "variables": [], "info": { "name": "Centreon Web Rest API realtime", - "_postman_id": "0b45c175-8d46-e2cb-4356-c359888c6a00", - "description": "", + "_postman_id": "a3390387-9951-1ff9-b164-5ac10459ac21", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ { "name": "00-Authenticate", - "description": "", "item": [ { "name": "Authenticate", @@ -140,33 +138,11 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=authenticate", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "authenticate", - "equals": true, - "description": "" - } - ], - "variable": [] - }, "method": "POST", "header": [ { "key": "Content-Type", - "value": "application/x-www-form-urlencoded", - "description": "" + "value": "application/x-www-form-urlencoded" } ], "body": { @@ -184,7 +160,25 @@ } ] }, - "description": "" + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=authenticate", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "authenticate", + "equals": true + } + ] + } }, "response": [] } @@ -192,11 +186,9 @@ }, { "name": "01-Base configuration", - "description": "", "item": [ { "name": "10-Timeperiods", - "description": "", "item": [ { "name": "Add tp", @@ -212,6 +204,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{tp_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -234,25 +241,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{tp_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -270,6 +260,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};sunday;{{tp_sunday}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -290,25 +295,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};sunday;{{tp_sunday}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -326,6 +314,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};monday;{{tp_monday}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -346,25 +349,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};monday;{{tp_monday}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -382,6 +368,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};tuesday;{{tp_tuesday}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -402,25 +403,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};tuesday;{{tp_tuesday}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -438,6 +422,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};wednesday;{{tp_wednesday}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -458,25 +457,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};wednesday;{{tp_wednesday}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -494,6 +476,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};thursday;{{tp_thursday}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -514,25 +511,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};thursday;{{tp_thursday}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -550,6 +530,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};friday;{{tp_friday}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -570,25 +565,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};friday;{{tp_friday}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -606,6 +584,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};saturday;{{tp_saturday}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -626,25 +619,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};saturday;{{tp_saturday}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -669,31 +645,6 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action", - "equals": true - }, - { - "key": "object", - "value": "centreon_clapi", - "equals": true - } - ], - "variable": [] - }, "method": "POST", "header": [ { @@ -709,7 +660,30 @@ "mode": "raw", "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};{{command_type}};{{command_line}}\"\n}" }, - "description": "" + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true + } + ] + } }, "response": [] } @@ -734,6 +708,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name}};{{contact_alias}};test@localhost;{{contact_pwd}};0;0;en_US;Idap\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -756,25 +745,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name}};{{contact_alias}};test@localhost;{{contact_pwd}};0;0;en_US;Idap\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -792,6 +764,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -814,25 +801,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -850,6 +820,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -872,25 +857,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -908,6 +876,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -930,25 +913,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -966,6 +932,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -988,25 +969,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1024,6 +988,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1044,25 +1023,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1080,6 +1042,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1100,25 +1077,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -1140,9 +1100,24 @@ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } - } - ], - "request": { + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{cg_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1165,25 +1140,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{cg_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1201,6 +1159,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1223,25 +1196,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -1266,6 +1222,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{hg_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1288,25 +1259,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{hg_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -1331,6 +1285,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1351,25 +1320,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1387,6 +1339,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_severity_level}};{{hc_severity_icon}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1407,25 +1374,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{hc_severity_level}};{{hc_severity_icon}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -1450,6 +1400,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1472,25 +1437,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1508,6 +1456,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_severity_level}};{{sc_severity_image}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1530,25 +1493,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_severity_level}};{{sc_severity_image}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -1573,31 +1519,6 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action", - "equals": true - }, - { - "key": "object", - "value": "centreon_clapi", - "equals": true - } - ], - "variable": [] - }, "method": "POST", "header": [ { @@ -1613,7 +1534,30 @@ "mode": "raw", "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{sg_alias}}\"\n}" }, - "description": "" + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true + } + ] + } }, "response": [] } @@ -1622,7 +1566,6 @@ }, { "name": "30-Hosts_Templates", - "description": "", "item": [ { "name": "Create host template", @@ -1638,6 +1581,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name}};{{host_address}};;central;\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1660,25 +1618,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name}};{{host_address}};;central;\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1696,6 +1637,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1718,25 +1674,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1754,6 +1693,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1776,25 +1730,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1812,6 +1749,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1834,25 +1786,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1870,6 +1805,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_community;{{host_snmp_community}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1892,25 +1842,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_community;{{host_snmp_community}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1928,6 +1861,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_version;{{host_snmp_version}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -1950,25 +1898,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};snmp_version;{{host_snmp_version}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -1986,6 +1917,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2008,25 +1954,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2044,6 +1973,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2066,25 +2010,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2102,6 +2029,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2124,25 +2066,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -2167,6 +2092,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_alias}};{{host_address}};{{htpl_name}};Central;\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2189,25 +2129,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_alias}};{{host_address}};{{htpl_name}};Central;\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2225,6 +2148,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2247,25 +2185,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2283,6 +2204,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2305,25 +2241,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2341,6 +2260,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2361,25 +2295,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2397,6 +2314,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2419,25 +2351,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2455,31 +2370,6 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action", - "equals": true - }, - { - "key": "object", - "value": "centreon_clapi", - "equals": true - } - ], - "variable": [] - }, "method": "POST", "header": [ { @@ -2495,7 +2385,30 @@ "mode": "raw", "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" }, - "description": "" + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true + } + ] + } }, "response": [] }, @@ -2513,6 +2426,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2535,25 +2463,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2571,6 +2482,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2593,25 +2519,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2629,6 +2538,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_alias}};0.0.0.0;{{htpl_name}};Central;\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2651,25 +2575,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_alias}};0.0.0.0;{{htpl_name}};Central;\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -2694,6 +2601,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_alias}};\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2716,25 +2638,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_alias}};\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2752,6 +2657,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_period;{{tp_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2774,25 +2694,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_period;{{tp_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2810,6 +2713,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2832,25 +2750,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2868,6 +2769,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};max_check_attempts;{{stpl_max_check}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2888,25 +2804,8 @@ "key": "object", "value": "centreon_clapi" } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};max_check_attempts;{{stpl_max_check}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2921,9 +2820,24 @@ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } - } - ], - "request": { + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -2946,25 +2860,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -2982,6 +2879,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3004,25 +2916,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -3040,6 +2935,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3062,25 +2972,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -3105,6 +2998,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{stpl_description}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3127,25 +3035,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{stpl_description}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -3163,6 +3054,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3185,25 +3091,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -3221,6 +3110,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3243,25 +3147,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -3279,6 +3166,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3301,25 +3203,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -3337,31 +3222,6 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action", - "equals": true - }, - { - "key": "object", - "value": "centreon_clapi", - "equals": true - } - ], - "variable": [] - }, "method": "POST", "header": [ { @@ -3377,7 +3237,30 @@ "mode": "raw", "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" }, - "description": "" + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true + } + ] + } }, "response": [] }, @@ -3395,6 +3278,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3417,25 +3315,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -3444,7 +3325,6 @@ }, { "name": "99-Generate", - "description": "", "item": [ { "name": "Generate configuration", @@ -3469,6 +3349,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"APPLYCFG\",\n \"values\": \"Central\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -3491,25 +3386,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"APPLYCFG\",\n \"values\": \"Central\"\n}" - }, - "description": "" + ] + } }, "response": [] } @@ -3520,11 +3398,9 @@ }, { "name": "10-Host", - "description": "", "item": [ { "name": "host list without parameters", - "description": "", "item": [ { "name": "host list", @@ -3541,6 +3417,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts", "protocol": "http", @@ -3563,25 +3454,8 @@ "value": "centreon_realtime_hosts", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -3590,7 +3464,6 @@ }, { "name": "Host list with limit parameter", - "description": "", "item": [ { "name": "Limit", @@ -3607,6 +3480,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}", "protocol": "http", @@ -3634,25 +3522,8 @@ "value": "{{my_limit}}", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -3671,6 +3542,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit=2&fields=name", "protocol": "http", @@ -3703,25 +3589,8 @@ "value": "name", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -3740,6 +3609,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit=2&fields=id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "protocol": "http", @@ -3772,25 +3656,8 @@ "value": "id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -3799,7 +3666,6 @@ }, { "name": "Host list with viewType parameter", - "description": "", "item": [ { "name": "list with viewType", @@ -3816,36 +3682,6 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=all,unhandled,problems", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "list", - "equals": true - }, - { - "key": "object", - "value": "centreon_realtime_hosts", - "equals": true - }, - { - "key": "viewType", - "value": "all,unhandled,problems", - "equals": true - } - ], - "variable": [] - }, "method": "GET", "header": [ { @@ -3861,7 +3697,35 @@ "mode": "raw", "raw": "" }, - "description": "" + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=all,unhandled,problems", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true + }, + { + "key": "viewType", + "value": "all,unhandled,problems", + "equals": true + } + ] + } }, "response": [] }, @@ -3880,6 +3744,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=all", "protocol": "http", @@ -3907,25 +3786,8 @@ "value": "all", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -3945,6 +3807,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=unhandled", "protocol": "http", @@ -3972,25 +3849,8 @@ "value": "unhandled", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4010,6 +3870,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=problems", "protocol": "http", @@ -4037,25 +3912,8 @@ "value": "problems", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4074,6 +3932,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all,unhandled,problems", "protocol": "http", @@ -4106,25 +3979,8 @@ "value": "all,unhandled,problems", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4143,6 +3999,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all", "protocol": "http", @@ -4175,25 +4046,8 @@ "value": "all", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4213,6 +4067,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=unhandled", "protocol": "http", @@ -4245,25 +4114,8 @@ "value": "unhandled", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4283,6 +4135,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=problems", "protocol": "http", @@ -4303,37 +4170,20 @@ { "key": "object", "value": "centreon_realtime_hosts", - "equals": true - }, - { - "key": "limit", - "value": "{{my_limit}}", - "equals": true - }, - { - "key": "viewType", - "value": "problems", - "equals": true - } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + "equals": true + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true + }, + { + "key": "viewType", + "value": "problems", + "equals": true + } + ] + } }, "response": [] } @@ -4342,7 +4192,6 @@ }, { "name": "Host list with status filter", - "description": "", "item": [ { "name": "status up with state and name", @@ -4360,6 +4209,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=up&fields=name, state", "protocol": "http", @@ -4392,25 +4256,8 @@ "value": "name, state", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4430,6 +4277,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=down&fields=name, state", "protocol": "http", @@ -4462,25 +4324,8 @@ "value": "name, state", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4500,6 +4345,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=unreachable&fields=name, state", "protocol": "http", @@ -4532,25 +4392,8 @@ "value": "name, state", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4570,6 +4413,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=pending&fields=name, state", "protocol": "http", @@ -4602,25 +4460,8 @@ "value": "name, state", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4639,6 +4480,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&status=all&fields=name, state", "protocol": "http", @@ -4676,25 +4532,8 @@ "value": "name, state", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -4703,7 +4542,6 @@ }, { "name": "Host list by Host", - "description": "", "item": [ { "name": "search by host name", @@ -4720,6 +4558,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}", "protocol": "http", @@ -4747,25 +4600,8 @@ "value": "{{host_name}}", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4785,6 +4621,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=up", "protocol": "http", @@ -4804,38 +4655,21 @@ }, { "key": "object", - "value": "centreon_realtime_hosts", - "equals": true - }, - { - "key": "search", - "value": "{{host_name}}", - "equals": true - }, - { - "key": "status", - "value": "up", - "equals": true - } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + "value": "centreon_realtime_hosts", + "equals": true + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true + }, + { + "key": "status", + "value": "up", + "equals": true + } + ] + } }, "response": [] }, @@ -4855,6 +4689,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=down", "protocol": "http", @@ -4887,25 +4736,8 @@ "value": "down", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4925,6 +4757,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=pending", "protocol": "http", @@ -4957,25 +4804,8 @@ "value": "pending", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -4995,6 +4825,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=unreachable", "protocol": "http", @@ -5027,25 +4872,8 @@ "value": "unreachable", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -5064,6 +4892,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=id", "protocol": "http", @@ -5096,25 +4939,8 @@ "value": "id", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -5133,6 +4959,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "protocol": "http", @@ -5165,25 +5006,8 @@ "value": "id,name,alias,address,state,state_type,output,max_check_attempts,check_attempt,last_check,next_check,last_state_change,last_hard_state_change,acknowledged,instance,instance_id,criticality,passive_checks,active_checks,notify,action_url,notes_url,notes,icon_image,icon_image_alt,scheduled_downtime_depth,flapping", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -5194,11 +5018,9 @@ }, { "name": "20-Service", - "description": "", "item": [ { "name": "Service list without parameters", - "description": "", "item": [ { "name": "Service List", @@ -5215,6 +5037,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services", "protocol": "http", @@ -5237,25 +5074,8 @@ "value": "centreon_realtime_services", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -5264,7 +5084,6 @@ }, { "name": "Service list by host and service", - "description": "", "item": [ { "name": "Service List by host name", @@ -5281,36 +5100,6 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "list", - "equals": true - }, - { - "key": "object", - "value": "centreon_realtime_services", - "equals": true - }, - { - "key": "searchHost", - "value": "{{host_name}}", - "equals": true - } - ], - "variable": [] - }, "method": "GET", "header": [ { @@ -5326,7 +5115,35 @@ "mode": "raw", "raw": "" }, - "description": "" + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true + }, + { + "key": "object", + "value": "centreon_realtime_services", + "equals": true + }, + { + "key": "searchHost", + "value": "{{host_name}}", + "equals": true + } + ] + } }, "response": [] }, @@ -5345,6 +5162,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}&searchService={{service_description}}", "protocol": "http", @@ -5377,25 +5209,8 @@ "value": "{{service_description}}", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -5414,6 +5229,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}&searchService={{service_description}}", "protocol": "http", @@ -5446,25 +5276,8 @@ "value": "{{service_description}}", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -5473,7 +5286,6 @@ }, { "name": "Service list with limit parameter", - "description": "", "item": [ { "name": "Service List with limit", @@ -5490,6 +5302,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&limit={{my_limit}}", "protocol": "http", @@ -5517,25 +5344,8 @@ "value": "{{my_limit}}", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -5554,6 +5364,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&limit={{my_limit}}&fields=id", "protocol": "http", @@ -5586,25 +5411,8 @@ "value": "id", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -5666,6 +5474,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&limit={{my_limit}}&fields=host_id,host_name,host_alias,host_address,host_state,host_state_type,host_output,host_last_check,host_next_check,host_acknowledged,instance,instance_id,host_action_url,host_notes_url,host_icon_image,description,state,state_type,id,output,perfdata,current_attempt,last_update,last_state_change,last_hard_state_change,last_check,next_check,max_check_attempts,notes,notes_url,action_url,icon_image,display_name,notify,acknowledged,passive_checks,active_checks,event_handler_enabled,flapping,scheduled_downtime_depth,flap_detection,criticality", "protocol": "http", @@ -5698,25 +5521,8 @@ "value": "host_id,host_name,host_alias,host_address,host_state,host_state_type,host_output,host_last_check,host_next_check,host_acknowledged,instance,instance_id,host_action_url,host_notes_url,host_icon_image,description,state,state_type,id,output,perfdata,current_attempt,last_update,last_state_change,last_hard_state_change,last_check,next_check,max_check_attempts,notes,notes_url,action_url,icon_image,display_name,notify,acknowledged,passive_checks,active_checks,event_handler_enabled,flapping,scheduled_downtime_depth,flap_detection,criticality", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -5725,7 +5531,6 @@ }, { "name": "Service list with viewType parameter", - "description": "", "item": [ { "name": "Service List with viewType problems", @@ -5743,6 +5548,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&viewType=problems", "protocol": "http", @@ -5770,25 +5590,8 @@ "value": "problems", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] }, @@ -5808,6 +5611,21 @@ } ], "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&viewType=unhandled_critical", "protocol": "http", @@ -5835,25 +5653,8 @@ "value": "unhandled_critical", "equals": true } - ], - "variable": [] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" + ] + } }, "response": [] } @@ -5864,7 +5665,6 @@ }, { "name": "50-Downtime Realtime", - "description": "", "item": [ { "name": "Addhost Realtime", @@ -5891,6 +5691,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;{{host_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}\n" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -5913,25 +5728,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;{{host_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}\n" - }, - "description": "" + ] + } }, "response": [] }, @@ -5969,6 +5767,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -5991,25 +5804,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -6046,6 +5842,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;{{hg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6068,25 +5879,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;{{hg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;0\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -6123,6 +5917,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;{{sg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6145,25 +5954,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;{{sg_name}};{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -6200,6 +5992,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"INSTANCE;Central;{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6222,25 +6029,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"INSTANCE;Central;{{start_time}};{{end_time}};1;3600;Ceci est un commentaire;\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -6309,6 +6099,21 @@ } ], "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}}\"\n}" + }, "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6331,25 +6136,8 @@ "value": "centreon_clapi", "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;{{host_name}},{{service_description}}\"\n}" - }, - "description": "" + ] + } }, "response": [] }, @@ -6368,16 +6156,11 @@ "var jsonData = JSON.parse(responseBody);", "var result = jsonData.result;", "", - "postman.setEnvironmentVariable(\"rtdowntime_id\",result[0].id);", - "", "var schema = {", " \"type\": \"array\",", " \"items\": {", " \"type\": \"object\",", " \"properties\": {", - " \"id\": {", - " \"type\": \"string\"", - " },", " \"host_name\": {", " \"type\": \"string\"", " },", @@ -6410,7 +6193,7 @@ " }", " },", " \"additionalProperties\": false,", - " \"required\": [\"id\", \"host_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " \"required\": [\"host_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", " }", "}", "", @@ -6420,71 +6203,21 @@ } ], "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action", - "equals": true, - "description": "" - }, - { - "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" - } - ], - "variable": [] - }, "method": "POST", "header": [ { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;{{host_name}}\"\n}" }, - "description": "" - }, - "response": [] - }, - { - "name": "Cancel downtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;", - "var contentType = postman.getResponseHeader(\"Content-Type\");", - "tests[\"Content-Type is application/json\"] = contentType === \"application/json\";", - "" - ] - } - } - ], - "request": { "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", @@ -6500,36 +6233,15 @@ { "key": "action", "value": "action", - "equals": true, - "description": "" + "equals": true }, { "key": "object", "value": "centreon_clapi", - "equals": true, - "description": "" + "equals": true } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"CANCEL\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"{{rtdowntime_id}}\"\n}" - }, - "description": "" + ] + } }, "response": [] } From f29d3f249e3b6852ae90290ff36d6ad4f1cb364f Mon Sep 17 00:00:00 2001 From: loiclau Date: Fri, 17 Nov 2017 09:26:39 +0100 Subject: [PATCH 5/5] fix test --- .../rest_api/realtime_rest_api.postman_collection.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/rest_api/realtime_rest_api.postman_collection.json b/tests/rest_api/realtime_rest_api.postman_collection.json index ef1e3add88b..3cd537bc0ef 100644 --- a/tests/rest_api/realtime_rest_api.postman_collection.json +++ b/tests/rest_api/realtime_rest_api.postman_collection.json @@ -6054,6 +6054,9 @@ " \"items\": {", " \"type\": \"object\",", " \"properties\": {", + " \"id\": {", + " \"type\": \"string\"", + " },", " \"host_name\": {", " \"type\": \"string\"", " },", @@ -6089,7 +6092,7 @@ " }", " },", " \"additionalProperties\": false,", - " \"required\": [\"host_name\", \"service_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " \"required\": [\"id\", \"host_name\", \"service_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", " }", "}", "", @@ -6161,6 +6164,9 @@ " \"items\": {", " \"type\": \"object\",", " \"properties\": {", + " \"id\": {", + " \"type\": \"string\"", + " },", " \"host_name\": {", " \"type\": \"string\"", " },", @@ -6193,7 +6199,7 @@ " }", " },", " \"additionalProperties\": false,", - " \"required\": [\"host_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " \"required\": [\"id\", \"host_name\", \"author\", \"actual_start_time\", \"actual_end_time\", \"start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", " }", "}", "",